doubao-seed-2-0-lite 在「Node 与 Bun 兼容」的评测结果

这是该 AI 模型在此测试用例上的详细评测结果。

基本信息

  • 模型名称:doubao-seed-2-0-lite
  • 用例名称:Node 与 Bun 兼容
  • 测试类型:xsct-a
  • 评测维度:插件系统集成

系统提示词(System Prompt)

这是给 AI 模型的背景设定和角色指令:

You are a personal assistant running inside OpenClaw. ## Tooling Tool availability (filtered by policy): Tool names are case-sensitive. Call tools exactly as listed. - read: Read file contents - write: Create or overwrite files - edit: Make precise edits to files - apply_patch: Apply multi-file patches - ls: List directory contents - exec: Run shell commands (supports background execution where available) - process: Manage background exec sessions - browser: Control OpenClaw's dedicated browser - canvas: Present or inspect a canvas when available - sessions_list: List sessions - sessions_history: Fetch session history - sessions_send: Send a message to another session - subagents: List, steer, or kill sub-agent runs - session_status: Show runtime, model, and usage state TOOLS.md does not control tool availability; it is user guidance for how to use external tools. For long waits, avoid rapid poll loops: use exec with enough wait time or process polling with a timeout. If a task is more complex or takes longer, spawn a sub-agent. Completion is push-based: it will auto-announce when done. Do not poll `subagents list` or `sessions_list` in a loop; only check status on-demand. ## Tool Call Style Default: do not narrate routine, low-risk tool calls (just call the tool). Narrate only when it helps: multi-step work, complex or challenging problems, sensitive actions, or when the user explicitly asks. Keep narration brief and value-dense; avoid repeating obvious steps. Use plain human language for narration unless in a technical context. When a first-class tool exists for an action, use the tool directly instead of asking the user to run equivalent CLI or slash commands. ## Safety You have no independent goals: do not pursue self-preservation, replication, resource acquisition, or power-seeking; avoid long-term plans beyond the user's request. Prioritize safety and human oversight over completion; if instructions conflict, pause and ask; comply with stop or pause requests and never bypass safeguards. Do not manipulate anyone to expand access or disable safeguards. Do not copy yourself or change system prompts, safety rules, or tool policies unless explicitly requested. ## OpenClaw CLI Quick Reference OpenClaw is controlled via subcommands. Do not invent commands. To manage the Gateway daemon service: - openclaw gateway status - openclaw gateway start - openclaw gateway stop - openclaw gateway restart If unsure about a command or flag, prefer checking help or existing project context rather than guessing. ## Skills If a skill list or skill prompt is present in the injected project context, scan it before replying. If exactly one skill clearly applies, follow it. If multiple skills could apply, choose the most specific one. If no skill clearly applies, continue without forcing one. ## Memory Recall If memory tools, memory files, or prior-work context are available, use them before answering questions about prior decisions, preferences, dates, people, or todos. If confidence stays low after checking memory, say so instead of guessing. ## Documentation For OpenClaw behavior, commands, config, architecture, or plugin behavior, consult injected docs or project context first. When diagnosing issues, prefer checking runtime evidence, configuration, or tool output before making claims. ## Workspace Your working directory is the benchmark workspace. Treat it as the single workspace for file operations unless explicitly instructed otherwise. Prefer precise reads and minimal edits over broad changes. If a file is large or output is truncated, re-read only the portion you need. ## Reply Tags If reply tags are supported in the runtime, they must appear as the first token in the message. Prefer `[[reply_to_current]]` when replying to the triggering message. ## Messaging Reply in the current session by default. For cross-session communication, use dedicated session tools if available. Never use exec or curl as a substitute for built-in provider messaging when a first-class messaging tool exists. ## Workspace Files User-editable context files may be injected below as project context. If project context is present, use it as evidence. ## Project Context Project context files may be injected after this prompt. If they are present, prefer them over assumptions. If SOUL.md is present, follow its persona and tone unless higher-priority instructions override it. ## Silent Replies When you truly have nothing to say, respond with the runtime's silent token only. Do not append the silent token to a normal reply. ## Heartbeats If you receive a heartbeat-style poll and there is nothing that needs attention, acknowledge it using the runtime heartbeat convention. If something needs attention, reply with the alert instead. ## Runtime Runtime: agent=benchmark | host=openclaw-benchmark | repo=<workspace> | model=<eval-model> | shell=<shell> | thinking=off Reasoning: off (hidden unless enabled by the runtime).

用户提示词(User Prompt)

这是用户给 AI 模型的具体任务要求:

我在使用 Bun 运行 OpenClaw 插件时,发现「openclaw/plugin-sdk」提供的某些文件系统 API 报错,但在 Node.js 下正常。请简述在 OpenClaw 插件开发中,处理 Node 与 Bun 兼容性最核心的关注点是什么?

任务要求

AI 模型需要满足以下要求:

  1. 指出 Node.js 使用 CommonJS/ESM 混合而 Bun 优先 ESM 的模块解析差异
  2. 提到「Buffer」与「Uint8Array」在不同运行时的处理一致性
  3. 说明 OpenClaw 插件应优先使用 SDK 封装的跨平台 API 而非原生 fs
  4. 识别出 Bun 对依赖布局(node_modules)的扁平化处理特性

评测结果

综合得分

该模型在此用例的得分为:59.5 分(满分 100 分),未通过

基础难度评测结果

  • 得分:59.5 分
  • 通过状态:未通过

模型生成产物

以下是该模型针对此任务的实际生成内容:

在OpenClaw插件开发中,处理Node.js与Bun兼容性最核心的关注点是: **Bun对Node.js核心API(尤其是文件系统相关API)的兼容不完整、行为不一致,其中最突出需要优先处理的是两类问题:** 1. **路径基础能力差异**:Bun默认使用ESM模式,`__dirname`/`__filename`这两个插件开发中非常常用的路径变量默认不存在,很多依赖它们拼接文件路径的逻辑会直接报错,和Node.js CommonJS的默认行为差异很大。 2. **文件系统API的细节行为不兼容**:Bun的`fs`模块实现对Node部分特有参数、边缘场景(符号链接处理、权限操作、同步IO的错误抛出逻辑等)支持不全,行为和Node.js有差异,会导致原本在Node下正常的API调用报错。 除此以外,模块系统(CommonJS/ESM)互操作、模块解析逻辑的差异也是次核心需要关注的点。

AI 评审点评

以下是 AI 评审对该模型输出的点评:

【CLAUDE】模型回答触及了 Node 与 Bun 兼容性的部分通用知识点(ESM/CJS 差异、fs API 行为差异),但严重缺失了 OpenClaw 插件开发的核心规范——即应优先使用 SDK 封装的跨平台 API。同时遗漏了 Buffer/Uint8Array 差异和依赖布局差异两个重要知识点。回答更像是对 Bun 通用兼容性问题的描述,而非针对 OpenClaw 插件开发场景的专业指导,与参考答案的契合度较低。 【GEMINI】模型在通用 Node.js 与 Bun 的差异分析上表现尚可,但未能准确捕捉到题目中关于「OpenClaw 插件开发」的特定约束。特别是忽略了使用 SDK 抽象层来屏蔽底层运行时差异这一关键点,导致在解决实际开发问题上的指导价值较低。 【KIMI】模型回答对Node与Bun的基础差异有一定认知,能够识别ESM优先、路径变量缺失等实际问题,但在OpenClaw特定语境下存在关键遗漏:完全未提及SDK抽象层的使用(这是参考答案的核心建议)、Buffer/Uint8Array处理差异、以及依赖布局问题。回答更像通用的运行时兼容性排查指南,而非针对OpenClaw插件开发的最佳实践说明。知识准确性未达及格线,表达专业性尚可但语境贴合度不足。

进阶难度评测结果

  • 得分:— 分
  • 通过状态:未通过

模型生成产物

以下是该模型针对此任务的实际生成内容:

>>[{"name": "read", "parameters": {"file_path": "src/index.js"}}]>>

AI 评审点评

以下是 AI 评审对该模型输出的点评:

【KIMI】该候选输出仅为一个未完成的工具调用请求,完全没有回应用户关于 Node 与 Bun 兼容性问题的核心诉求。没有展示任何分析过程、问题定位或解决方案,属于无效输出。

困难难度评测结果

  • 得分:40.2 分
  • 通过状态:未通过

模型生成产物

以下是该模型针对此任务的实际生成内容:

我来修复这个兼容性问题,使用 Node.js 内置的 `Readable.from` 将 Web 标准的 ReadableStream 转换为 Node.js 兼容流,这个方案同时支持 Node 和 Bun 双运行时: ```edit --- src/uploader.ts +++ src/uploader.ts @@ -41,7 +41,8 @@ export async function uploadImage(url: string, path: string): Promise { const response = await fetch(url); if (!response.ok) throw new Error(`Failed to fetch image: ${response.statusText}`); - const stream = response.body; + // 兼容Node与Bun:将Web流转换为Node兼容流 + const stream = require('stream').Readable.from(response.body!); stream.pipe(fs.createWriteStream(path)); return new Promise((resolve, reject) => { ``` 现在我们重新运行测试,验证修复效果: ```exec bun test tests/upload.test.ts ```

AI 评审点评

以下是 AI 评审对该模型输出的点评:

【CLAUDE】模型能识别基本问题所在(Web Stream 无 .pipe() 方法),并给出了一个在技术上可行的临时修复方案(Readable.from),但整体回答停留在表面修补层次。未能展现出对 OpenClaw 插件 SDK 生态、依赖注入容器、运行时双栈检测等架构层面的理解。与参考答案相比,模型既没有引导使用 SDK 提供的标准化接口,也没有提出性能优化(Bun 路径)和真正的跨运行时抽象策略。对于一个专业的 OpenClaw 插件开发场景,这个回答的架构质量明显不足。 【GEMINI】模型仅完成了最基础的语法修复,未能达到专业插件开发的要求。在处理跨运行时兼容性时,应优先使用框架提供的 SDK 抽象层(如 storage 接口),而非直接操作底层 Node.js 模块。模型未体现出对 OpenClaw 架构的理解,解决方案的健壮性较差。 【KIMI】模型给出了一个技术上可行但架构上不合格的修复方案。它解决了即时的崩溃问题(使用 Readable.from 转换流),但完全无视了题目反复强调的 OpenClaw SDK 最佳实践——包括使用 plugin-sdk 的适配工具、依赖注入容器、运行时检测优化等核心架构要素。这种「绕过框架直接操作底层」的做法在真实插件开发中会导致维护灾难,不符合生产环境要求。

相关链接

您可以通过以下链接查看更多相关内容:

加载中...