@zhin.js/plugin-code-runner 4.0.1 → 4.0.3

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.
@@ -3,6 +3,7 @@ import { defineCommand } from '@zhin.js/command';
3
3
  import { formatResult, runCode } from "../../lib/run-code.js";
4
4
  export default defineCommand({
5
5
  description: '在沙箱中运行代码片段(/code-runner run <语言> <代码>)',
6
+ params: { language: { type: 'string' } },
6
7
  async execute({ params, args }) {
7
8
  const language = String(params.language ?? '');
8
9
  // code 原来是第二动态段,约定式命令只支持单动态文件参数,改从 args 取
@@ -3,6 +3,7 @@ import { formatResult, runCode } from '../../src/run-code.js';
3
3
 
4
4
  export default defineCommand({
5
5
  description: '在沙箱中运行代码片段(/code-runner run <语言> <代码>)',
6
+ params: { language: { type: 'string' } },
6
7
  async execute({ params, args }) {
7
8
  const language = String(params.language ?? '');
8
9
  // code 原来是第二动态段,约定式命令只支持单动态文件参数,改从 args 取
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/plugin-code-runner",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Sandboxed code execution plugin for Zhin.js (Plugin Runtime)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -38,18 +38,18 @@
38
38
  },
39
39
  "license": "MIT",
40
40
  "dependencies": {
41
- "@zhin.js/command": "1.0.6",
42
- "@zhin.js/plugin-runtime": "1.1.2"
41
+ "@zhin.js/command": "1.0.7",
42
+ "@zhin.js/plugin-runtime": "1.1.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "typescript": "^6.0.3",
46
46
  "vitest": "^4.1.10",
47
47
  "zod": "^4.4.3",
48
- "@zhin.js/agent": "1.1.1"
48
+ "@zhin.js/agent": "1.1.3"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "zod": "^4.0.0",
52
- "@zhin.js/agent": "1.1.1"
52
+ "@zhin.js/agent": "1.1.3"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@zhin.js/agent": {