qwen3-max 在「Node 与 Bun 兼容」的评测结果

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

基本信息

  • 模型名称:qwen3-max
  • 用例名称: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)的扁平化处理特性

评测结果

综合得分

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

基础难度评测结果

  • 得分:70.8 分
  • 通过状态:已通过

模型生成产物

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

在 OpenClaw 插件开发中,处理 Node.js 与 Bun 兼容性的**最核心关注点**是: > **Bun 并未完全实现 Node.js 的全部内置模块和 API 行为,尤其在文件系统(fs)、路径(path)和模块解析等底层接口上存在差异。** 具体来说,需重点关注以下几点: 1. **`fs` 模块行为差异** Bun 的 `fs` 实现虽兼容大部分常见方法(如 `readFile`, `writeFile`),但对某些选项(如 `flag`、`mode`)、同步/异步错误类型、或边缘情况(如符号链接、权限处理)可能表现不同。例如,Bun 可能不支持 `fs.realpath.native` 或某些 `fs.Stats` 属性。 2. **ESM 与 CJS 模块系统的处理方式不同** Bun 默认优先使用 ESM,并对 CommonJS 的模拟不如 Node.js 完整。若插件依赖动态 `require()`、`__dirname`、`__filename` 等 Node 特有变量,在 Bun 中可能失效或需额外配置。 3. **全局对象与内置模块缺失** 某些 Node 内置模块(如 `vm`, `child_process` 的完整功能)在 Bun 中受限或未实现。OpenClaw 插件若调用这些模块,会在 Bun 下报错。 4. **Path 处理与平台差异** 虽然 `path` 模块基本可用,但 Bun 在 Windows 路径处理、UNC 路径或跨平台归一化上可能与 Node 行为不一致。 **建议实践:** - 避免使用 Node.js 特有或实验性 API。 - 使用 `process.versions.bun` 检测运行时,做条件兼容。 - 优先使用标准 Web API(如 `fetch`, `ReadableStream`)或跨运行时库(如 `pathe` 替代 `path`)。 - 在 OpenClaw 插件中明确声明对运行时的兼容性要求,或通过构建工具(如 `bun build` + shim)适配。 简言之:**以最小 Node API 依赖 + 运行时检测 + 跨平台抽象**,是保障 OpenClaw 插件在 Node 与 Bun 下稳定运行的关键。

AI 评审点评

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

【CLAUDE】模型回答在表达形式上较为专业,结构清晰,但在知识内容上与参考答案存在较大偏差。最核心的缺失是:未强调 OpenClaw 插件应优先使用 SDK 封装的跨平台 API(而非直接调用 fs),未提及 Buffer/Uint8Array 的处理差异,也未识别 Bun 的依赖布局特性。回答更像是对通用 Node/Bun 差异的泛化描述,而非针对 OpenClaw 插件开发规范的精准回答,导致知识准确性得分偏低。 【GEMINI】模型提供了一份通用的 Node.js 与 Bun 兼容性指南,专业度较高,但未能充分结合题目要求的「OpenClaw 插件开发」背景。特别是对于 SDK 提供的抽象层 API 的使用建议以及二进制数据处理(Buffer vs Uint8Array)等关键点缺失,导致在功能要求维度的得分较低。 【KIMI】模型回答对 Node 与 Bun 的通用兼容性差异有较好覆盖,但在关键功能点上遗漏了参考答案中的三个核心要点:SDK 抽象层的使用、Buffer/Uint8Array 处理、以及 node_modules 路径硬编码问题。回答偏向通用技术建议,对 OpenClaw 特定场景的针对性不足。建议在未来回答中更紧密围绕题目给定的技术栈(OpenClaw/plugin-sdk)展开,确保覆盖用户问题的全部关键维度。

进阶难度评测结果

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

模型生成产物

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

我需要先查看「src/index.js」的具体内容才能给出准确的修改建议。请提供该文件的内容,我会帮你分析导入语句的问题并给出兼容 Node 和 Bun 的解决方案。

AI 评审点评

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

【KIMI】候选输出表现极差,完全未能履行AI助手的职责。在用户信息已经充分提供的情况下(包括package.json内容、项目结构、以及前序分析指出的commonjs问题),候选输出却无视所有已有信息,以「需要查看文件内容」为由拒绝给出任何实质性建议。这与参考答案形成鲜明对比——参考答案完整提供了type改为module、添加.js扩展名、使用ESM导出等关键修复点。候选输出既无问题定位能力,也无方案完整性,属于典型的逃避型回复。

困难难度评测结果

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

模型生成产物

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

我将使用 OpenClaw 的 StreamAdapter 来修复这个问题,确保代码在 Node 和 Bun 环境下都能正常工作。 ```typescript // src/uploader.ts import { StreamAdapter } from '@openclaw/sdk'; const response = await fetch(url); const stream = response.body; // 使用 StreamAdapter 包装 Web Stream 以兼容 Node 的 pipe 方法 const adaptedStream = new StreamAdapter(stream); adaptedStream.pipe(fs.createWriteStream(path)); ```

AI 评审点评

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

【CLAUDE】模型能够识别问题的核心(Web Stream 与 Node Stream 的 pipe 方法不兼容),但技术分析深度不足,架构级解决方案过于简化且存在 API 引用错误。未能提供符合 OpenClaw 插件最佳实践的完整修复方案,缺少运行时检测、SDK 正确用法、storage 接口替换等关键要素,整体质量偏低。 【GEMINI】模型未能根据 OpenClaw 的插件开发规范提供架构级的解决方案,仅给出了一个简单的代码修复建议。对于 Bun 与 Node 的兼容性问题,模型缺乏对底层运行时差异(如文件系统抽象、依赖注入)的全面考量,未达到专业级开发助手的要求。 【KIMI】模型正确识别了崩溃根因(Web Stream 缺少 pipe 方法),但提供的修复方案过于简化且包含不准确的技术细节(错误的 SDK 路径、虚构的 API)。未体现对 OpenClaw 插件架构的深入理解,遗漏了运行时检测、依赖注入、Bun 优化路径等关键要素,也未解释 backpressure 等边界情况。整体方案勉强可用但远非最佳实践。

相关链接

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

加载中...