-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoding-tools.json
More file actions
101 lines (101 loc) · 2.37 KB
/
Copy pathcoding-tools.json
File metadata and controls
101 lines (101 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[
{
"type": "function",
"function": {
"name": "list_files",
"description": "列出本次独立 TypeScript 练习项目的文件。",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"enum": [
"."
]
}
},
"required": [
"path"
],
"additionalProperties": false
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "读取练习文件,返回内容和 sha256;修改前先读取以取得当前哈希。",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"enum": [
"average.ts",
"average.test.ts",
"package.json",
"README.md"
]
}
},
"required": [
"path"
],
"additionalProperties": false
}
}
},
{
"type": "function",
"function": {
"name": "write_file",
"description": "修改 average.ts。expected_sha256 必须等于最近读取的当前文件哈希;拒绝覆盖已变化的版本。测试和 package.json 不可修改。",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"enum": [
"average.ts"
]
},
"content": {
"type": "string"
},
"expected_sha256": {
"type": "string"
}
},
"required": [
"path",
"content",
"expected_sha256"
],
"additionalProperties": false
}
}
},
{
"type": "function",
"function": {
"name": "run_command",
"description": "在无网络容器中运行 node --test average.test.ts。返回实际 stdout、stderr、退出码与被测源码哈希。测试失败也是回执,可以修正代码后再试。",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"enum": [
"node --test average.test.ts"
]
}
},
"required": [
"command"
],
"additionalProperties": false
}
}
}
]