@kobinflow/canvas-agent 0.6.0 → 0.7.0

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
@@ -16,7 +16,7 @@ npx -y @kobinflow/canvas-agent@latest
16
16
  npx -y @kobinflow/canvas-agent@latest --debug
17
17
  ```
18
18
 
19
- Debug 日志会以 `[DEBUG][HH:mm:ss]` 等传统格式输出到终端,并按启动日期保存到 `~/.infinite-canvas/logs/canvas-agent-YYYY-MM-DD.log`。终端日志带级别颜色,文件日志为纯文本;日志包含 HTTP、SSE、线程、turn、Codex app-server 和工具调用事件,token 与图片 Data URL 会自动隐藏。
19
+ Debug 日志会以 `[DEBUG][HH:mm:ss]` 等传统格式输出到终端,并按启动日期保存到 `~/.dianran/logs/canvas-agent-YYYY-MM-DD.log`。终端日志带级别颜色,文件日志为纯文本;日志包含 HTTP、SSE、线程、turn、Codex app-server 和工具调用事件,token 与图片 Data URL 会自动隐藏。
20
20
 
21
21
  本仓库开发时也可以直接运行:
22
22
 
@@ -38,7 +38,7 @@ Connect token: xxxxxx
38
38
 
39
39
  Codex app 插件会读取启动输出里的 Local URL 和 Connect token,并直接打开画布网页地址;Canvas Agent 不负责生成画布打开 URL。
40
40
 
41
- Canvas Agent 默认只监听 `127.0.0.1`。网页第一次带正确 token 连接后,Canvas Agent 会记录该网页 Origin;之后其他 Origin 不能复用这个本地 Agent,除非用户清理 `~/.infinite-canvas/canvas-agent.json` 里的 `origins`。
41
+ Canvas Agent 默认只监听 `127.0.0.1`。网页第一次带正确 token 连接后,Canvas Agent 会记录该网页 Origin;之后其他 Origin 不能复用这个本地 Agent,除非用户清理 `~/.dianran/canvas-agent.json` 里的 `origins`。
42
42
 
43
43
  ## 发布
44
44
 
@@ -50,30 +50,34 @@ Canvas Agent 默认只监听 `127.0.0.1`。网页第一次带正确 token 连接
50
50
 
51
51
  如果希望 Codex 终端能直接操作画布,需要先把 Canvas Agent 注册成 Codex MCP。
52
52
 
53
- 直接运行 `npx -y @kobinflow/canvas-agent@latest` 只启动本地 Agent 服务,不会安装 MCP,也不会增加 Codex 工具上下文。只有安装 Codex app 插件,或手动执行 `codex mcp add` 后,`infinite-canvas` 工具才会进入 Codex 上下文;由于工具较多,不使用时建议移除。
53
+ 直接运行 `npx -y @kobinflow/canvas-agent@latest` 只启动本地 Agent 服务,不会安装 MCP,也不会增加 Codex 工具上下文。只有安装 Codex app 插件,或手动执行 `codex mcp add` 后,`dianran` 工具才会进入 Codex 上下文;由于工具较多,不使用时建议移除。
54
54
 
55
55
  通过插件安装时移除插件:
56
56
 
57
57
  ```bash
58
+ codex plugin remove dianran
59
+ # 旧版本 / 上游安装的名字:
58
60
  codex plugin remove infinite-canvas
59
61
  ```
60
62
 
61
63
  手动添加 MCP 时移除 MCP:
62
64
 
63
65
  ```bash
66
+ codex mcp remove dianran
67
+ # 旧版本 / 上游安装的名字:
64
68
  codex mcp remove infinite-canvas
65
69
  ```
66
70
 
67
71
  ### Codex app 插件
68
72
 
69
- 仓库内提供了 Codex app 插件:`plugins/infinite-canvas`。在 Codex app 中添加本仓库的 marketplace 后,可以安装 `Infinite Canvas` 插件;插件会注册同一个 `infinite-canvas` MCP,并带上画布操作说明。
73
+ 仓库内提供了 Codex app 插件:`plugins/dianran`。在 Codex app 中添加本仓库的 marketplace(`codex plugin marketplace add kobingogo/dianran`)后,可以安装 `点染 Dianran` 插件;插件会注册同一个 `dianran` MCP,并带上画布操作说明。0.7.0 起 MCP 名从 `infinite-canvas` 改为 `dianran`,配置目录从 `~/.infinite-canvas` 改为 `~/.dianran`(首次启动自动迁移旧 token / 地址)。
70
74
 
71
75
  添加本地 marketplace 时建议使用仓库绝对路径,避免 Codex 从其他工作目录解析失败:
72
76
 
73
77
  ```bash
74
- cd /path/to/infinite-canvas
78
+ cd /path/to/dianran
75
79
  codex plugin marketplace add "$(pwd)"
76
- codex plugin add infinite-canvas@infinite-canvas-local
80
+ codex plugin add dianran@dianran-local
77
81
  ```
78
82
 
79
83
  插件默认通过 npm 启动 MCP;这个命令只提供 MCP 工具,不会把 MCP 写入全局配置,也不会在退出时自动卸载:
@@ -82,18 +86,18 @@ codex plugin add infinite-canvas@infinite-canvas-local
82
86
  npx -y @kobinflow/canvas-agent@latest mcp
83
87
  ```
84
88
 
85
- 使用时可以直接在 Codex 里说“打开 Infinite Canvas”,插件会启动本地 Agent,读取 Local URL 和 Connect token,然后在右侧打开 `https://canvas.best/` 并自动新建、连接画布;只有明确要求使用本地项目时才会启动本地前端。
89
+ 使用时可以直接在 Codex 里说“打开点染画布”,插件会启动本地 Agent,读取 Local URL 和 Connect token,然后在右侧打开 `https://dianran.vercel.app/` 并自动新建、连接画布;只有明确要求使用本地项目时才会启动本地前端。
86
90
 
87
91
  Canvas Agent 启动后,给 Codex 添加 MCP:
88
92
 
89
93
  ```bash
90
- codex mcp add infinite-canvas -- npx -y @kobinflow/canvas-agent@latest mcp
94
+ codex mcp add dianran -- npx -y @kobinflow/canvas-agent@latest mcp
91
95
  ```
92
96
 
93
97
  本仓库开发时可以改成,实际使用建议替换为本机绝对路径:
94
98
 
95
99
  ```bash
96
- codex mcp add infinite-canvas -- node /path/to/infinite-canvas/canvas-agent/dist/index.js mcp
100
+ codex mcp add dianran -- node /path/to/dianran/canvas-agent/dist/index.js mcp
97
101
  ```
98
102
 
99
103
  Canvas Agent 源码使用 TypeScript 编写,MCP 协议层使用官方 `@modelcontextprotocol/sdk`,工具入参使用 `zod` 描述。
@@ -101,7 +105,7 @@ Canvas Agent 源码使用 TypeScript 编写,MCP 协议层使用官方 `@modelc
101
105
  如果希望终端里的 Codex 不被 MCP 审批卡住,可以在 `~/.codex/config.toml` 里给这个 MCP 设置自动放行:
102
106
 
103
107
  ```toml
104
- [mcp_servers.infinite-canvas]
108
+ [mcp_servers.dianran]
105
109
  command = "npx"
106
110
  args = ["-y", "@kobinflow/canvas-agent@latest", "mcp"]
107
111
  default_tools_approval_mode = "approve"
@@ -134,7 +138,7 @@ default_tools_approval_mode = "approve"
134
138
 
135
139
  ## 侧边栏 Codex
136
140
 
137
- 本地面板会把提示词发送给 Canvas Agent。Canvas Agent 使用官方 `@openai/codex` CLI 的 `codex app-server --stdio` 启动并复用同一个 Codex thread,启动时会注入 `infinite-canvas` MCP 配置并自动放行 MCP 审批,真正执行画布修改前仍由网页侧边栏二次确认。
141
+ 本地面板会把提示词发送给 Canvas Agent。Canvas Agent 使用官方 `@openai/codex` CLI 的 `codex app-server --stdio` 启动并复用同一个 Codex thread,启动时会注入 `dianran` MCP 配置并自动放行 MCP 审批,真正执行画布修改前仍由网页侧边栏二次确认。
138
142
 
139
143
  侧边栏会展示 Codex 返回的 `thread.started`、`turn.started`、`item.*`、`turn.completed` 等结构化事件;Canvas Agent 会合并短时间内的回复、思考摘要和命令输出增量,网页使用同一条消息持续更新,并把任务进度、计划、搜索、文件修改与工具操作整理为中文过程时间线。
140
144
 
@@ -147,13 +151,13 @@ Claude Code Adapter 代码暂时保留,但当前网页侧边栏只开放 Codex
147
151
  如果希望 Claude Code 也能操作画布,需要给 Claude Code 添加同一个 MCP。建议用 user scope,避免 Canvas Agent 从不同目录启动时找不到配置:
148
152
 
149
153
  ```bash
150
- claude mcp add --scope user --transport stdio infinite-canvas -- npx -y @kobinflow/canvas-agent@latest mcp
154
+ claude mcp add --scope user --transport stdio dianran -- npx -y @kobinflow/canvas-agent@latest mcp
151
155
  ```
152
156
 
153
157
  本仓库开发时可以改成:
154
158
 
155
159
  ```bash
156
- claude mcp add --scope user --transport stdio infinite-canvas -- node /path/to/infinite-canvas/canvas-agent/dist/index.js mcp
160
+ claude mcp add --scope user --transport stdio dianran -- node /path/to/dianran/canvas-agent/dist/index.js mcp
157
161
  ```
158
162
 
159
- Canvas Agent 调用 Claude Code 时会默认带上 `--allowedTools mcp__infinite-canvas__*`,画布写操作仍由网页侧边栏确认。
163
+ Canvas Agent 调用 Claude Code 时会默认带上 `--allowedTools mcp__dianran__*`(兼容旧名 `mcp__infinite-canvas__*`),画布写操作仍由网页侧边栏确认。
@@ -1,10 +1,10 @@
1
- # Infinite Canvas Agent
1
+ # Dianran Canvas Agent
2
2
 
3
3
  你正在帮助用户操作点染(Dianran)画布网站。
4
4
 
5
5
  - 用户要求操作画布时,默认目标就是网页当前已经打开的画布。需要了解内容时先使用 `canvas_get_state`;读取成功后直接在该画布执行任务,不要调用 `canvas_list_projects`,也不要用 `site_navigate` 重复进入画布。
6
6
  - 只有用户明确要求查看、选择或切换其他画布,或者 `canvas_get_state` 明确提示当前没有已连接画布时,才使用 `canvas_list_projects` 和 `site_navigate`。`site_navigate` 可跳转 `/`、`/canvas`、`/canvas/:id`、`/image`、`/video`、`/prompts`、`/assets`、`/config`。
7
- - 修改当前画布时根据任务使用已配置的 infinite-canvas MCP 工具;复杂批量改动使用 `canvas_apply_ops`。
7
+ - 修改当前画布时根据任务使用已配置的 dianran MCP 工具(旧安装可能叫 infinite-canvas);复杂批量改动使用 `canvas_apply_ops`。
8
8
  - 用户要求把上传附件放入画布或作为生成参考图时,必须先用 `canvas_create_attachment_nodes` 创建真实图片节点,再把节点 ID 传给生成流程,不要创建空图片占位节点。
9
9
  - 生图与视频工作台分别使用 `workbench_image_*`、`workbench_video_*` 工具;提示词和素材分别使用 `prompts_search`、`assets_*` 工具。
10
10
  - 用户要求生成图片、视频、音频或文本时,默认调用对应的 `canvas_generate_image`、`canvas_generate_video`、`canvas_generate_audio`、`canvas_generate_text`,通过当前画布的生成节点完成任务。
@@ -1,5 +1,5 @@
1
1
  import { spawn } from "node:child_process";
2
- import { AGENT_PROMPT } from "../config.js";
2
+ import { AGENT_PROMPT, LEGACY_MCP_SERVER_NAME, MCP_SERVER_NAME } from "../config.js";
3
3
  import { createAgentLogWriter } from "../utils/agent-runtime.js";
4
4
  import { errorMessage } from "../utils/value.js";
5
5
  /** 使用 Claude CLI 执行一次带 Canvas Agent 工具的任务。 */
@@ -7,7 +7,7 @@ export function runClaudeTurn(prompt, emit) {
7
7
  const fullPrompt = withAgentPrompt(prompt);
8
8
  if (!fullPrompt)
9
9
  return;
10
- const child = spawnAgent("claude", ["-p", "--output-format", "stream-json", "--verbose", "--include-partial-messages", "--allowedTools", "mcp__infinite-canvas__*", fullPrompt], emit);
10
+ const child = spawnAgent("claude", ["-p", "--output-format", "stream-json", "--verbose", "--include-partial-messages", "--allowedTools", `mcp__${MCP_SERVER_NAME}__*,mcp__${LEGACY_MCP_SERVER_NAME}__*`, fullPrompt], emit);
11
11
  if (child)
12
12
  pipeJsonLines(child, emit, "claude");
13
13
  }
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { createAgentLogWriter } from "../utils/agent-runtime.js";
6
- import { VERSION } from "../config.js";
6
+ import { MCP_SERVER_NAME, VERSION } from "../config.js";
7
7
  import { logger } from "../utils/logger.js";
8
8
  import { field } from "../utils/value.js";
9
9
  import { codexEventHistory } from "./codex-event-history.js";
@@ -812,7 +812,7 @@ function canvasAgentMcpCommand() {
812
812
  }
813
813
  /** 生成 Codex app-server 使用的 MCP 配置。 */
814
814
  function codexConfig(permissionMode) {
815
- return { model_reasoning_summary: "auto", ...(permissionMode === "automatic" ? { approvals_reviewer: "auto_review" } : {}), mcp_servers: { "infinite-canvas": { command: canvasAgentMcp.command, args: canvasAgentMcp.args, default_tools_approval_mode: "approve", startup_timeout_sec: 20, tool_timeout_sec: 90 } } };
815
+ return { model_reasoning_summary: "auto", ...(permissionMode === "automatic" ? { approvals_reviewer: "auto_review" } : {}), mcp_servers: { [MCP_SERVER_NAME]: { command: canvasAgentMcp.command, args: canvasAgentMcp.args, default_tools_approval_mode: "approve", startup_timeout_sec: 20, tool_timeout_sec: 90 } } };
816
816
  }
817
817
  function threadSettings(permissionMode) {
818
818
  return { approvalPolicy: permissionMode === "full" ? "never" : "on-request", sandbox: permissionMode === "full" ? "danger-full-access" : "workspace-write", config: codexConfig(permissionMode) };
@@ -495,7 +495,7 @@ async function writeAttachmentFile(item) {
495
495
  const [, meta = "", data = ""] = item.dataUrl?.match(/^data:([^;]+);base64,(.+)$/) || [];
496
496
  if (!data)
497
497
  throw new Error(`图片附件无效:${item.name || "未命名图片"}`);
498
- const file = path.join(os.tmpdir(), `infinite-canvas-${Date.now()}-${Math.random().toString(16).slice(2)}.${imageExt(meta || item.type)}`);
498
+ const file = path.join(os.tmpdir(), `dianran-${Date.now()}-${Math.random().toString(16).slice(2)}.${imageExt(meta || item.type)}`);
499
499
  await fs.writeFile(file, Buffer.from(data, "base64"));
500
500
  return file;
501
501
  }
@@ -1,4 +1,5 @@
1
1
  import crypto from "node:crypto";
2
+ import { LEGACY_MCP_SERVER_NAME, MCP_SERVER_NAME } from "../names.js";
2
3
  import { logger } from "../utils/logger.js";
3
4
  import { buildCanvasToolRequest, fitAttachmentNodeSize } from "./operations.js";
4
5
  import { compactCanvasState, compactNode, isToolName, nextCanvasX, parseToolInput } from "./tools.js";
@@ -114,9 +115,10 @@ export class CanvasSession {
114
115
  this.preparedConversationThreadId = threadId;
115
116
  const statuses = this.conversationState.mcpStatuses;
116
117
  const hasPending = !this.conversationInventoryComplete || Object.values(statuses).some((item) => item.status === "starting");
117
- const requiredFailure = statuses["infinite-canvas"]?.status !== "ready";
118
+ const required = statuses[MCP_SERVER_NAME] || statuses[LEGACY_MCP_SERVER_NAME];
119
+ const requiredFailure = required?.status !== "ready";
118
120
  const hasFailure = Object.values(statuses).some((item) => item.status === "failed" || item.status === "cancelled");
119
- const requiredFailureDetail = statuses["infinite-canvas"]?.error;
121
+ const requiredFailureDetail = required?.error;
120
122
  return this.updateConversation({
121
123
  threadId,
122
124
  status: hasPending ? "preparing" : requiredFailure ? "failed" : hasFailure ? "warning" : "ready",
package/dist/config.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export declare const DEFAULT_PORT = 17371;
2
2
  export declare const CONFIG_DIR: string;
3
3
  export declare const CONFIG_FILE: string;
4
+ /** 0.6.x 及更早版本(与上游 Infinite Canvas 共用)的配置位置;首次启动时迁移其中的 token / 地址 / 已授权来源。 */
5
+ export declare const LEGACY_CONFIG_FILE: string;
6
+ export { LEGACY_MCP_SERVER_NAME, MCP_SERVER_NAME } from "./names.js";
4
7
  export declare const VERSION: string;
5
8
  export declare const AGENT_PROMPT: string;
6
9
  export type SiteWorkspaceConfig = {
package/dist/config.js CHANGED
@@ -3,8 +3,11 @@ import fs from "node:fs";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
  export const DEFAULT_PORT = 17371;
6
- export const CONFIG_DIR = path.join(os.homedir(), ".infinite-canvas");
6
+ export const CONFIG_DIR = path.join(os.homedir(), ".dianran");
7
7
  export const CONFIG_FILE = path.join(CONFIG_DIR, "canvas-agent.json");
8
+ /** 0.6.x 及更早版本(与上游 Infinite Canvas 共用)的配置位置;首次启动时迁移其中的 token / 地址 / 已授权来源。 */
9
+ export const LEGACY_CONFIG_FILE = path.join(os.homedir(), ".infinite-canvas", "canvas-agent.json");
10
+ export { LEGACY_MCP_SERVER_NAME, MCP_SERVER_NAME } from "./names.js";
8
11
  export const VERSION = readPackageVersion();
9
12
  export const AGENT_PROMPT = fs.readFileSync(new URL("../agent-instructions.md", import.meta.url), "utf8");
10
13
  const initializedWorkspaces = new Set();
@@ -14,12 +17,28 @@ export function loadConfig(create = false) {
14
17
  return JSON.parse(fs.readFileSync(CONFIG_FILE, "utf8"));
15
18
  }
16
19
  catch {
20
+ const legacy = readLegacyConfig();
21
+ if (legacy) {
22
+ if (create)
23
+ saveConfig(legacy);
24
+ return legacy;
25
+ }
17
26
  const config = { url: `http://127.0.0.1:${Number(process.env.PORT) || DEFAULT_PORT}`, token: crypto.randomBytes(18).toString("hex") };
18
27
  if (create)
19
28
  saveConfig(config);
20
29
  return config;
21
30
  }
22
31
  }
32
+ /** 读取旧版 ~/.infinite-canvas 配置(只取连接相关字段,工作空间沿用其绝对路径)。 */
33
+ function readLegacyConfig() {
34
+ try {
35
+ const legacy = JSON.parse(fs.readFileSync(LEGACY_CONFIG_FILE, "utf8"));
36
+ return legacy?.url && legacy?.token ? legacy : null;
37
+ }
38
+ catch {
39
+ return null;
40
+ }
41
+ }
23
42
  /** 将 Canvas Agent 配置写入用户配置目录。 */
24
43
  export function saveConfig(config) {
25
44
  writeConfigFile(CONFIG_DIR, CONFIG_FILE, config);
@@ -62,7 +81,7 @@ function initializeWorkspace(workspacePath) {
62
81
  fs.mkdirSync(workspacePath, { recursive: true });
63
82
  const instructionsFile = path.join(workspacePath, "AGENTS.md");
64
83
  const current = fs.existsSync(instructionsFile) ? fs.readFileSync(instructionsFile, "utf8") : "";
65
- if (!current || current.startsWith("# Infinite Canvas Agent"))
84
+ if (!current || current.startsWith("# Infinite Canvas Agent") || current.startsWith("# Dianran Canvas Agent"))
66
85
  fs.writeFileSync(instructionsFile, AGENT_PROMPT);
67
86
  initializedWorkspaces.add(workspacePath);
68
87
  }
@@ -0,0 +1,4 @@
1
+ /** Codex / Claude Code 中注册的 MCP 服务名(插件 .mcp.json、codex mcp add 与 app-server 注入保持一致)。 */
2
+ export declare const MCP_SERVER_NAME = "dianran";
3
+ /** 0.6.x 及更早版本和上游 Infinite Canvas 使用的旧名字,仍被识别以兼容旧安装。 */
4
+ export declare const LEGACY_MCP_SERVER_NAME = "infinite-canvas";
package/dist/names.js ADDED
@@ -0,0 +1,4 @@
1
+ /** Codex / Claude Code 中注册的 MCP 服务名(插件 .mcp.json、codex mcp add 与 app-server 注入保持一致)。 */
2
+ export const MCP_SERVER_NAME = "dianran";
3
+ /** 0.6.x 及更早版本和上游 Infinite Canvas 使用的旧名字,仍被识别以兼容旧安装。 */
4
+ export const LEGACY_MCP_SERVER_NAME = "infinite-canvas";
@@ -6,7 +6,7 @@ import { runClaudeTurn } from "../agent/claude.js";
6
6
  import { archiveCodexThread, CodexSkillLookupError, configureCodexSkill, generateCodexSkillDraft, interruptCodexTurn, isRecoverableThreadError, listCodexModels, listCodexSkills, listCodexThreads, readCodexThread, resolveCodexApproval, resolveCodexSkill, resumeCodexThread, runCodexTurn, startCodexThread, summarizeCodexThread } from "../agent/codex.js";
7
7
  import { messageMetadataStore } from "../agent/message-metadata.js";
8
8
  import { AGENT_PROTOCOL_VERSION, CanvasSession } from "../canvas/session.js";
9
- import { DEFAULT_PORT, ensureSiteWorkspace, loadConfig, saveConfig, updateSiteWorkspace } from "../config.js";
9
+ import { DEFAULT_PORT, ensureSiteWorkspace, LEGACY_MCP_SERVER_NAME, loadConfig, MCP_SERVER_NAME, saveConfig, updateSiteWorkspace } from "../config.js";
10
10
  import { logger } from "../utils/logger.js";
11
11
  import { checkVersions } from "../version-check.js";
12
12
  import { SkillStore, SkillStoreError } from "../skills/store.js";
@@ -470,8 +470,8 @@ export function startHttpServer() {
470
470
  console.log(`Local URL: ${config.url}`);
471
471
  console.log(`Connect token: ${config.token}`);
472
472
  console.log("Codex MCP is not installed by this command.");
473
- console.log("Optional MCP add: codex mcp add infinite-canvas -- npx -y @kobinflow/canvas-agent@latest mcp");
474
- console.log("Remove manually added MCP: codex mcp remove infinite-canvas");
473
+ console.log(`Optional MCP add: codex mcp add ${MCP_SERVER_NAME} -- npx -y @kobinflow/canvas-agent@latest mcp`);
474
+ console.log(`Remove manually added MCP: codex mcp remove ${MCP_SERVER_NAME} (old installs: codex mcp remove ${LEGACY_MCP_SERVER_NAME})`);
475
475
  if (logger.enabled)
476
476
  console.log(`Debug log: ${logger.filePath}`);
477
477
  logger.info("Canvas Agent started", { url: config.url, workspace: ensureSiteWorkspace(config).workspacePath, debugLog: logger.filePath });
@@ -5,7 +5,7 @@ import { AGENT_PROMPT, loadConfig, VERSION } from "../config.js";
5
5
  /** 启动通过标准输入输出通信的 MCP 服务。 */
6
6
  export async function startMcpServer() {
7
7
  const config = loadConfig(true);
8
- const server = new McpServer({ name: "canvas-agent", version: VERSION }, { instructions: AGENT_PROMPT });
8
+ const server = new McpServer({ name: "dianran-canvas-agent", version: VERSION }, { instructions: AGENT_PROMPT });
9
9
  toolNames.forEach((name) => registerCanvasTool(server, config, name));
10
10
  await server.connect(new StdioServerTransport());
11
11
  }
@@ -7,7 +7,7 @@ import { formatDateForFilename } from "./date.js";
7
7
  /** 管理 Canvas Agent 的终端与文件 Debug 日志。 */
8
8
  export class Logger {
9
9
  enabled = process.argv.includes("--debug");
10
- filePath = this.enabled ? path.join(os.homedir(), ".infinite-canvas", "logs", `canvas-agent-${formatDateForFilename()}.log`) : "";
10
+ filePath = this.enabled ? path.join(os.homedir(), ".dianran", "logs", `canvas-agent-${formatDateForFilename()}.log`) : "";
11
11
  logger;
12
12
  /** 普通模式输出 Info 以上日志,Debug 模式额外输出 Debug 并写入文件。 */
13
13
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kobinflow/canvas-agent",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",