@qwen-code/arena-agent 0.0.10-dev.1 → 0.0.10-dev.10

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.
Files changed (154) hide show
  1. package/.env.example +57 -14
  2. package/CHANGELOG.md +228 -0
  3. package/README.md +228 -50
  4. package/dist/agent.d.ts +28 -2
  5. package/dist/agent.js +341 -106
  6. package/dist/agent.js.map +1 -1
  7. package/dist/anthropic.js +23 -22
  8. package/dist/anthropic.js.map +1 -1
  9. package/dist/ask-user.js +2 -0
  10. package/dist/ask-user.js.map +1 -1
  11. package/dist/attachments.js +4 -3
  12. package/dist/attachments.js.map +1 -1
  13. package/dist/brave-search.js +1 -3
  14. package/dist/brave-search.js.map +1 -1
  15. package/dist/canonical-data.js +2 -2
  16. package/dist/canonical-data.js.map +1 -1
  17. package/dist/cli.js +184 -36
  18. package/dist/cli.js.map +1 -1
  19. package/dist/code-tools.d.ts +8 -2
  20. package/dist/code-tools.js +709 -117
  21. package/dist/code-tools.js.map +1 -1
  22. package/dist/compaction.d.ts +49 -3
  23. package/dist/compaction.js +382 -186
  24. package/dist/compaction.js.map +1 -1
  25. package/dist/config.d.ts +17 -2
  26. package/dist/config.js +47 -5
  27. package/dist/config.js.map +1 -1
  28. package/dist/fetch-page.js +9 -33
  29. package/dist/fetch-page.js.map +1 -1
  30. package/dist/file-edit.d.ts +8 -0
  31. package/dist/file-edit.js +63 -0
  32. package/dist/file-edit.js.map +1 -0
  33. package/dist/history.d.ts +16 -3
  34. package/dist/history.js +117 -19
  35. package/dist/history.js.map +1 -1
  36. package/dist/legacy-compaction.d.ts +20 -0
  37. package/dist/legacy-compaction.js +209 -0
  38. package/dist/legacy-compaction.js.map +1 -0
  39. package/dist/midturn-checkpoint-hook.d.ts +31 -0
  40. package/dist/midturn-checkpoint-hook.js +38 -0
  41. package/dist/midturn-checkpoint-hook.js.map +1 -0
  42. package/dist/mock.js +5 -0
  43. package/dist/mock.js.map +1 -1
  44. package/dist/mode.js +4 -2
  45. package/dist/mode.js.map +1 -1
  46. package/dist/model-router-media.d.ts +1 -0
  47. package/dist/model-router-media.js +71 -1
  48. package/dist/model-router-media.js.map +1 -1
  49. package/dist/openai-responses.js +2 -0
  50. package/dist/openai-responses.js.map +1 -1
  51. package/dist/process-manager.js +2 -1
  52. package/dist/process-manager.js.map +1 -1
  53. package/dist/prompts.d.ts +2 -0
  54. package/dist/prompts.js +6 -2
  55. package/dist/prompts.js.map +1 -1
  56. package/dist/protocol.d.ts +5 -1
  57. package/dist/protocol.js +24 -2
  58. package/dist/protocol.js.map +1 -1
  59. package/dist/provider.d.ts +12 -5
  60. package/dist/provider.js +60 -52
  61. package/dist/provider.js.map +1 -1
  62. package/dist/repetitive-output.d.ts +12 -0
  63. package/dist/repetitive-output.js +80 -0
  64. package/dist/repetitive-output.js.map +1 -0
  65. package/dist/replay-responses.d.ts +17 -0
  66. package/dist/replay-responses.js +100 -0
  67. package/dist/replay-responses.js.map +1 -0
  68. package/dist/routify-web-fetch.js +20 -7
  69. package/dist/routify-web-fetch.js.map +1 -1
  70. package/dist/sandbox-file-write.d.ts +10 -0
  71. package/dist/sandbox-file-write.js +58 -0
  72. package/dist/sandbox-file-write.js.map +1 -0
  73. package/dist/server.js +17 -5
  74. package/dist/server.js.map +1 -1
  75. package/dist/session-memory-prompts.d.ts +5 -0
  76. package/dist/session-memory-prompts.js +7 -0
  77. package/dist/session-memory-prompts.js.map +1 -0
  78. package/dist/snapshot-client.d.ts +10 -0
  79. package/dist/snapshot-client.js +39 -0
  80. package/dist/snapshot-client.js.map +1 -0
  81. package/dist/spec.js +18 -10
  82. package/dist/spec.js.map +1 -1
  83. package/dist/speech-audio.d.ts +9 -0
  84. package/dist/speech-audio.js +130 -0
  85. package/dist/speech-audio.js.map +1 -0
  86. package/dist/speech-model.d.ts +3 -0
  87. package/dist/speech-model.js +8 -0
  88. package/dist/speech-model.js.map +1 -0
  89. package/dist/tools.d.ts +5 -0
  90. package/dist/tools.js +378 -132
  91. package/dist/tools.js.map +1 -1
  92. package/dist/tui.js +13 -10
  93. package/dist/tui.js.map +1 -1
  94. package/dist/types.d.ts +28 -3
  95. package/dist/voice-registry.d.ts +2 -0
  96. package/dist/voice-registry.js +10 -2
  97. package/dist/voice-registry.js.map +1 -1
  98. package/dist/web-fetch-output.d.ts +9 -0
  99. package/dist/web-fetch-output.js +38 -0
  100. package/dist/web-fetch-output.js.map +1 -0
  101. package/dist/workspace.d.ts +2 -0
  102. package/dist/workspace.js +11 -6
  103. package/dist/workspace.js.map +1 -1
  104. package/docs/BINARY_DISTRIBUTION.md +27 -16
  105. package/docs/MODES_AND_RELEASES.md +28 -5
  106. package/docs/SDK.md +5 -0
  107. package/modes/code-arena/capture-provenance.json +57 -0
  108. package/modes/code-arena/full-stack/system-prompt.txt +1 -1
  109. package/modes/code-arena/full-stack/template/eslint.config.mjs +3 -4
  110. package/modes/code-arena/full-stack/template/postcss.config.mjs +2 -2
  111. package/modes/code-arena/full-stack/tools.json +186 -186
  112. package/modes/code-arena/html/system-prompt.txt +1 -1
  113. package/modes/code-arena/html/tools.json +123 -123
  114. package/modes/code-arena/react/system-prompt.txt +4 -3
  115. package/modes/code-arena/react/template/package.json +4 -4
  116. package/modes/code-arena/react/template/src/App.tsx +1 -1
  117. package/modes/code-arena/react/template/src/main.tsx +1 -1
  118. package/modes/code-arena/react/template/tsconfig.json +6 -0
  119. package/modes/code-arena/react/template/vite.config.ts +1 -0
  120. package/modes/code-arena/react/tools.json +178 -184
  121. package/package.json +14 -4
  122. package/scripts/README.md +62 -0
  123. package/scripts/check-changelog.mjs +66 -0
  124. package/vendor/audio/darwin-arm64/FFmpeg.LICENSE +502 -0
  125. package/vendor/audio/darwin-arm64/LAME.LICENSE +481 -0
  126. package/vendor/audio/darwin-arm64/Opus.LICENSE +44 -0
  127. package/vendor/audio/darwin-arm64/ffmpeg.gz +0 -0
  128. package/vendor/audio/darwin-arm64/manifest.json +39 -0
  129. package/vendor/audio/darwin-x64/FFmpeg.LICENSE +502 -0
  130. package/vendor/audio/darwin-x64/LAME.LICENSE +481 -0
  131. package/vendor/audio/darwin-x64/Opus.LICENSE +44 -0
  132. package/vendor/audio/darwin-x64/ffmpeg.gz +0 -0
  133. package/vendor/audio/darwin-x64/manifest.json +39 -0
  134. package/vendor/audio/linux-arm64/FFmpeg.LICENSE +502 -0
  135. package/vendor/audio/linux-arm64/LAME.LICENSE +481 -0
  136. package/vendor/audio/linux-arm64/Opus.LICENSE +44 -0
  137. package/vendor/audio/linux-arm64/ffmpeg.gz +0 -0
  138. package/vendor/audio/linux-arm64/manifest.json +39 -0
  139. package/vendor/audio/linux-x64/FFmpeg.LICENSE +502 -0
  140. package/vendor/audio/linux-x64/LAME.LICENSE +481 -0
  141. package/vendor/audio/linux-x64/Opus.LICENSE +44 -0
  142. package/vendor/audio/linux-x64/ffmpeg.gz +0 -0
  143. package/vendor/audio/linux-x64/manifest.json +39 -0
  144. package/vendor/audio/sources/build-audio-encoder.sh +76 -0
  145. package/vendor/audio/sources/ffmpeg-7.0.2.tar.xz +0 -0
  146. package/vendor/audio/sources/lame-3.100.tar.gz +0 -0
  147. package/vendor/audio/sources/opus-1.5.2.tar.gz +0 -0
  148. package/vendor/audio/sources/pkgconf-2.3.0.tar.xz +0 -0
  149. package/vendor/audio/sources/sources.lock.json +30 -0
  150. package/vendor/audio/win32-x64/FFmpeg.LICENSE +502 -0
  151. package/vendor/audio/win32-x64/LAME.LICENSE +481 -0
  152. package/vendor/audio/win32-x64/Opus.LICENSE +44 -0
  153. package/vendor/audio/win32-x64/ffmpeg.gz +0 -0
  154. package/vendor/audio/win32-x64/manifest.json +39 -0
@@ -1,25 +1,24 @@
1
1
  [
2
2
  {
3
- "type": "function",
4
3
  "function": {
4
+ "description": "Read the content of an existing file with line numbers. For large files, use `offset` (1-indexed start line) and `limit` (max lines, default 2000) to read specific ranges. If the path is a PNG or JPEG image, the tool returns the image so you can view it; a model without image input gets an error instead. Other binary files (fonts, audio, video, archives, etc.) are not supported.\n",
5
5
  "name": "read_file",
6
- "description": "Read the content of an existing file with line numbers. For large files, use `offset` (1-indexed start line) and `limit` (max lines, default 2000) to read specific ranges. Cannot read binary files (images, fonts, audio, video, archives, etc.) — only text files are supported.\n",
7
6
  "parameters": {
8
- "type": "object",
7
+ "additionalProperties": false,
9
8
  "properties": {
10
- "path": {
11
- "type": "string",
12
- "description": "File path relative to project root (for example, 'index.html')"
9
+ "limit": {
10
+ "description": "Maximum number of lines to read (default: 2000)",
11
+ "minimum": 1,
12
+ "type": "integer"
13
13
  },
14
14
  "offset": {
15
- "type": "integer",
15
+ "description": "Line number to start reading from (1-indexed, default: 1)",
16
16
  "minimum": 1,
17
- "description": "Line number to start reading from (1-indexed, default: 1)"
17
+ "type": "integer"
18
18
  },
19
- "limit": {
20
- "type": "integer",
21
- "minimum": 1,
22
- "description": "Maximum number of lines to read (default: 2000)"
19
+ "path": {
20
+ "description": "File path relative to project root (for example, 'index.html')",
21
+ "type": "string"
23
22
  }
24
23
  },
25
24
  "required": [
@@ -27,54 +26,54 @@
27
26
  "offset",
28
27
  "limit"
29
28
  ],
30
- "additionalProperties": false
29
+ "type": "object"
31
30
  }
32
- }
31
+ },
32
+ "type": "function"
33
33
  },
34
34
  {
35
- "type": "function",
36
35
  "function": {
37
- "name": "create_file",
38
36
  "description": "Create a new file or overwrite an existing file in the project with the provided content. The file extension should match the type of file you want to create (e.g., 'index.html' for HTML files). If the file already exists, its content will be completely replaced.\n",
37
+ "name": "create_file",
39
38
  "parameters": {
40
- "type": "object",
39
+ "additionalProperties": false,
41
40
  "properties": {
42
- "path": {
43
- "type": "string",
44
- "description": "File path relative to project root (for example, 'index.html')"
45
- },
46
41
  "content": {
47
- "type": "string",
48
- "description": "The complete content of the file"
42
+ "description": "The complete content of the file",
43
+ "type": "string"
44
+ },
45
+ "path": {
46
+ "description": "File path relative to project root (for example, 'index.html')",
47
+ "type": "string"
49
48
  }
50
49
  },
51
50
  "required": [
52
51
  "path",
53
52
  "content"
54
53
  ],
55
- "additionalProperties": false
54
+ "type": "object"
56
55
  }
57
- }
56
+ },
57
+ "type": "function"
58
58
  },
59
59
  {
60
- "type": "function",
61
60
  "function": {
62
- "name": "edit_file",
63
61
  "description": "Replace a section of content in a file. Uses fuzzy matching that ignores whitespace and indentation differences, so the context doesn't need to match exactly. This will fail if 'context' matches multiple sections in the file.\n",
62
+ "name": "edit_file",
64
63
  "parameters": {
65
- "type": "object",
64
+ "additionalProperties": false,
66
65
  "properties": {
67
- "path": {
68
- "type": "string",
69
- "description": "File path relative to project root (for example, 'index.html')"
70
- },
71
66
  "context": {
72
- "type": "string",
73
- "description": "The text in the file to replace. Uses fuzzy matching that ignores whitespace and indentation differences, so it doesn't need to match exactly. Only the first occurrence will be replaced."
67
+ "description": "The text in the file to replace. Uses fuzzy matching that ignores whitespace and indentation differences, so it doesn't need to match exactly. Only the first occurrence will be replaced.",
68
+ "type": "string"
69
+ },
70
+ "path": {
71
+ "description": "File path relative to project root (for example, 'index.html')",
72
+ "type": "string"
74
73
  },
75
74
  "replacement": {
76
- "type": "string",
77
- "description": "The new text to replace the matched context with. This will be inserted exactly where the context was found."
75
+ "description": "The new text to replace the matched context with. This will be inserted exactly where the context was found.",
76
+ "type": "string"
78
77
  }
79
78
  },
80
79
  "required": [
@@ -82,102 +81,102 @@
82
81
  "context",
83
82
  "replacement"
84
83
  ],
85
- "additionalProperties": false
84
+ "type": "object"
86
85
  }
87
- }
86
+ },
87
+ "type": "function"
88
88
  },
89
89
  {
90
- "type": "function",
91
90
  "function": {
92
- "name": "delete_file",
93
91
  "description": "Delete a file from the project.\n",
92
+ "name": "delete_file",
94
93
  "parameters": {
95
- "type": "object",
94
+ "additionalProperties": false,
96
95
  "properties": {
97
96
  "path": {
98
- "type": "string",
99
- "description": "File path relative to project root (for example, 'index.html')"
97
+ "description": "File path relative to project root (for example, 'index.html')",
98
+ "type": "string"
100
99
  }
101
100
  },
102
101
  "required": [
103
102
  "path"
104
103
  ],
105
- "additionalProperties": false
104
+ "type": "object"
106
105
  }
107
- }
106
+ },
107
+ "type": "function"
108
108
  },
109
109
  {
110
- "type": "function",
111
110
  "function": {
112
- "name": "list_files",
113
111
  "description": "List file paths in the project. If no path is provided, lists all files from the project root. You can optionally provide a relative path to list files within a specific directory. You should generally prefer the glob_files and grep_files tools if you know which directories or patterns to search for.\n",
112
+ "name": "list_files",
114
113
  "parameters": {
115
- "type": "object",
114
+ "additionalProperties": false,
116
115
  "properties": {
117
116
  "path": {
118
- "type": "string",
119
- "description": "The directory to list, relative to project root. Defaults to the project root."
117
+ "description": "The directory to list, relative to project root. Defaults to the project root.",
118
+ "type": "string"
120
119
  }
121
120
  },
122
- "additionalProperties": false,
123
121
  "required": [
124
122
  "path"
125
- ]
123
+ ],
124
+ "type": "object"
126
125
  }
127
- }
126
+ },
127
+ "type": "function"
128
128
  },
129
129
  {
130
- "type": "function",
131
130
  "function": {
132
- "name": "grep_files",
133
131
  "description": "Fast content search tool that searches file contents using regular expressions. Supports full regex syntax (e.g., \"log.*Error\", \"function\\s+\\w+\"). Filter files with the glob parameter (e.g., \"*.js\", \"*.{ts,tsx}\"). Returns matching lines with file paths and line numbers. Results are limited to 100 matches.",
132
+ "name": "grep_files",
134
133
  "parameters": {
135
- "type": "object",
134
+ "additionalProperties": false,
136
135
  "properties": {
137
- "pattern": {
138
- "type": "string",
139
- "description": "The regex pattern to search for in file contents"
136
+ "-A": {
137
+ "description": "Number of lines to show after each match",
138
+ "minimum": 0,
139
+ "type": "integer"
140
140
  },
141
- "path": {
142
- "type": "string",
143
- "description": "The directory to search in, relative to project root. Defaults to the project root."
141
+ "-B": {
142
+ "description": "Number of lines to show before each match",
143
+ "minimum": 0,
144
+ "type": "integer"
145
+ },
146
+ "-C": {
147
+ "description": "Number of lines to show before and after each match",
148
+ "minimum": 0,
149
+ "type": "integer"
150
+ },
151
+ "-i": {
152
+ "description": "Case insensitive search",
153
+ "type": "boolean"
154
+ },
155
+ "context": {
156
+ "description": "Alias for -C (context lines before and after)",
157
+ "minimum": 0,
158
+ "type": "integer"
144
159
  },
145
160
  "glob": {
146
- "type": "string",
147
- "description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\")"
161
+ "description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\")",
162
+ "type": "string"
148
163
  },
149
164
  "output_mode": {
150
- "type": "string",
165
+ "description": "Output mode: \"content\" shows matching lines (default), \"files_with_matches\" shows only file paths, \"count\" shows match counts per file.",
151
166
  "enum": [
152
167
  "content",
153
168
  "files_with_matches",
154
169
  "count"
155
170
  ],
156
- "description": "Output mode: \"content\" shows matching lines (default), \"files_with_matches\" shows only file paths, \"count\" shows match counts per file."
157
- },
158
- "-i": {
159
- "type": "boolean",
160
- "description": "Case insensitive search"
161
- },
162
- "-B": {
163
- "type": "integer",
164
- "minimum": 0,
165
- "description": "Number of lines to show before each match"
166
- },
167
- "-A": {
168
- "type": "integer",
169
- "minimum": 0,
170
- "description": "Number of lines to show after each match"
171
+ "type": "string"
171
172
  },
172
- "-C": {
173
- "type": "integer",
174
- "minimum": 0,
175
- "description": "Number of lines to show before and after each match"
173
+ "path": {
174
+ "description": "The directory to search in, relative to project root. Defaults to the project root.",
175
+ "type": "string"
176
176
  },
177
- "context": {
178
- "type": "integer",
179
- "minimum": 0,
180
- "description": "Alias for -C (context lines before and after)"
177
+ "pattern": {
178
+ "description": "The regex pattern to search for in file contents",
179
+ "type": "string"
181
180
  }
182
181
  },
183
182
  "required": [
@@ -191,183 +190,177 @@
191
190
  "-C",
192
191
  "context"
193
192
  ],
194
- "additionalProperties": false
193
+ "type": "object"
195
194
  }
196
- }
195
+ },
196
+ "type": "function"
197
197
  },
198
198
  {
199
- "type": "function",
200
199
  "function": {
201
- "name": "glob_files",
202
200
  "description": "Fast file pattern matching tool. Supports glob patterns like \"**/*.js\" or \"src/**/*.ts\". Returns matching file paths. Use this tool when you need to find files by name or extension patterns. Results are limited to 100 files.",
201
+ "name": "glob_files",
203
202
  "parameters": {
204
- "type": "object",
203
+ "additionalProperties": false,
205
204
  "properties": {
206
- "pattern": {
207
- "type": "string",
208
- "description": "The glob pattern to match files against"
209
- },
210
205
  "path": {
211
- "type": "string",
212
- "description": "The directory to search in, relative to project root. Defaults to the project root."
206
+ "description": "The directory to search in, relative to project root. Defaults to the project root.",
207
+ "type": "string"
208
+ },
209
+ "pattern": {
210
+ "description": "The glob pattern to match files against",
211
+ "type": "string"
213
212
  }
214
213
  },
215
214
  "required": [
216
215
  "pattern",
217
216
  "path"
218
217
  ],
219
- "additionalProperties": false
218
+ "type": "object"
220
219
  }
221
- }
220
+ },
221
+ "type": "function"
222
222
  },
223
223
  {
224
- "type": "function",
225
224
  "function": {
226
- "name": "install_npm_packages",
227
- "description": "Install npm packages as dependencies. Takes an array of package names and runs 'npm install -S' with those packages.\n",
225
+ "description": "Execute a bash command in the sandbox. The command runs in a sandboxed environment with Node.js and common CLI tools available.\n\nGuidelines:\n- The working directory defaults to the project root. Only pass `workdir` for subdirectories within the project (e.g. `src/`). Never pass an absolute path.\n- Prefer specialized tools (create_file, edit_file, read_file) for file operations when possible.\n- Include a short `description` summarizing what the command does in 5-10 words.\n- The command runs with `/bin/bash -c` and captures both stdout and stderr.\n",
226
+ "name": "bash",
228
227
  "parameters": {
229
- "type": "object",
228
+ "additionalProperties": false,
230
229
  "properties": {
231
- "packages": {
232
- "type": "array",
233
- "items": {
234
- "type": "string",
235
- "description": "Package name (e.g., 'react', 'lodash', 'axios@1.0.0')"
236
- }
230
+ "command": {
231
+ "description": "The bash command to execute",
232
+ "type": "string"
233
+ },
234
+ "description": {
235
+ "description": "Short (5-10 word) description of what the command does",
236
+ "type": "string"
237
+ },
238
+ "workdir": {
239
+ "description": "Working directory for the command (defaults to project root)",
240
+ "type": "string"
237
241
  }
238
242
  },
239
243
  "required": [
240
- "packages"
244
+ "command",
245
+ "workdir",
246
+ "description"
241
247
  ],
242
- "additionalProperties": false
248
+ "type": "object"
243
249
  }
244
- }
250
+ },
251
+ "type": "function"
245
252
  },
246
253
  {
247
- "type": "function",
248
254
  "function": {
249
- "name": "build_project",
250
- "description": "Build the project using 'npm run build'. Use this to confirm that the project builds successfully.\n",
251
- "parameters": {
252
- "type": "object",
253
- "properties": {},
254
- "additionalProperties": false,
255
- "required": []
256
- }
257
- }
258
- },
259
- {
260
- "type": "function",
261
- "function": {
262
- "name": "web_search",
263
255
  "description": "Search the web for current information. Use when you need documentation, API references, examples, or facts beyond your training data. Returns results with titles, URLs, and content snippets. The current year is 2026 — use it when searching for recent information.",
256
+ "name": "web_search",
264
257
  "parameters": {
265
- "type": "object",
258
+ "additionalProperties": false,
266
259
  "properties": {
267
- "query": {
268
- "type": "string",
269
- "description": "The search query"
270
- },
271
260
  "depth": {
272
- "type": "string",
261
+ "description": "The search tool accepts a depth parameter (1, 2, or 3) that controls how many results are fetched and how much content is extracted from each. At depth 1, fewer results are retrieved with shorter excerpts. At depth 3, more results are retrieved with longer, more detailed excerpts per source. Depth 2 falls between the two. Higher depth consumes more of the context window.",
273
262
  "enum": [
274
263
  "1",
275
264
  "2",
276
265
  "3"
277
266
  ],
278
- "description": "The search tool accepts a depth parameter (1, 2, or 3) that controls how many results are fetched and how much content is extracted from each. At depth 1, fewer results are retrieved with shorter excerpts. At depth 3, more results are retrieved with longer, more detailed excerpts per source. Depth 2 falls between the two. Higher depth consumes more of the context window."
267
+ "type": "string"
268
+ },
269
+ "query": {
270
+ "description": "The search query",
271
+ "type": "string"
279
272
  }
280
273
  },
281
274
  "required": [
282
275
  "query",
283
276
  "depth"
284
277
  ],
285
- "additionalProperties": false
278
+ "type": "object"
286
279
  }
287
- }
280
+ },
281
+ "type": "function"
288
282
  },
289
283
  {
290
- "type": "function",
291
284
  "function": {
292
- "name": "web_fetch",
293
285
  "description": "Fetch and read the content of a web page. Use to read documentation, API references, or examples found via web_search. Returns content as markdown by default. Supports format options: \"markdown\" (default), \"text\", or \"html\".",
286
+ "name": "web_fetch",
294
287
  "parameters": {
295
- "type": "object",
288
+ "additionalProperties": false,
296
289
  "properties": {
297
- "url": {
298
- "type": "string",
299
- "description": "The URL to fetch content from"
300
- },
301
290
  "format": {
302
- "type": "string",
291
+ "description": "Output format: \"markdown\" (default), \"text\", or \"html\"",
303
292
  "enum": [
304
293
  "markdown",
305
294
  "text",
306
295
  "html"
307
296
  ],
308
- "description": "Output format: \"markdown\" (default), \"text\", or \"html\""
297
+ "type": "string"
298
+ },
299
+ "url": {
300
+ "description": "The URL to fetch content from",
301
+ "type": "string"
309
302
  }
310
303
  },
311
304
  "required": [
312
305
  "url",
313
306
  "format"
314
307
  ],
315
- "additionalProperties": false
308
+ "type": "object"
316
309
  }
317
- }
310
+ },
311
+ "type": "function"
318
312
  },
319
313
  {
320
- "type": "function",
321
314
  "function": {
322
- "name": "fetch_media",
323
315
  "description": "Search for stock photos and videos and return URL-based media assets. Use this when real photography or video is better than AI-generated imagery. Use `recommendedUrl`.\n",
316
+ "name": "fetch_media",
324
317
  "parameters": {
325
- "type": "object",
318
+ "additionalProperties": false,
326
319
  "properties": {
327
- "query": {
328
- "type": "string",
329
- "description": "Search query for stock media, such as 'modern office interior' or 'ocean waves'."
320
+ "count": {
321
+ "default": 6,
322
+ "description": "Number of assets to return (1-10). Defaults to 6.",
323
+ "type": "number"
324
+ },
325
+ "locale": {
326
+ "description": "Search locale, such as \"en-US\". Defaults to \"en-US\".",
327
+ "type": "string"
330
328
  },
331
329
  "media_type": {
332
- "type": "string",
330
+ "default": "both",
331
+ "description": "Type of media: \"image\", \"video\", or \"both\". Defaults to \"both\".",
333
332
  "enum": [
334
333
  "image",
335
334
  "video",
336
335
  "both"
337
336
  ],
338
- "default": "both",
339
- "description": "Type of media: \"image\", \"video\", or \"both\". Defaults to \"both\"."
340
- },
341
- "count": {
342
- "type": "number",
343
- "default": 6,
344
- "description": "Number of assets to return (1-10). Defaults to 6."
337
+ "type": "string"
345
338
  },
346
339
  "orientation": {
347
- "type": "string",
340
+ "default": "any",
341
+ "description": "Desired orientation. Defaults to \"any\".",
348
342
  "enum": [
349
343
  "any",
350
344
  "landscape",
351
345
  "portrait",
352
346
  "square"
353
347
  ],
354
- "default": "any",
355
- "description": "Desired orientation. Defaults to \"any\"."
348
+ "type": "string"
349
+ },
350
+ "query": {
351
+ "description": "Search query for stock media, such as 'modern office interior' or 'ocean waves'.",
352
+ "type": "string"
356
353
  },
357
354
  "size": {
358
- "type": "string",
355
+ "default": "any",
356
+ "description": "Minimum media size. Defaults to \"any\".",
359
357
  "enum": [
360
358
  "any",
361
359
  "large",
362
360
  "medium",
363
361
  "small"
364
362
  ],
365
- "default": "any",
366
- "description": "Minimum media size. Defaults to \"any\"."
367
- },
368
- "locale": {
369
- "type": "string",
370
- "description": "Search locale, such as \"en-US\". Defaults to \"en-US\"."
363
+ "type": "string"
371
364
  }
372
365
  },
373
366
  "required": [
@@ -378,33 +371,34 @@
378
371
  "size",
379
372
  "locale"
380
373
  ],
381
- "additionalProperties": false
374
+ "type": "object"
382
375
  }
383
- }
376
+ },
377
+ "type": "function"
384
378
  },
385
379
  {
386
- "type": "function",
387
380
  "function": {
388
- "name": "generate_image",
389
381
  "description": "Generate a custom image using AI and save it to the project. Use this tool when you need to create images for the website such as hero backgrounds, icons, illustrations, or any visual content. The image will be saved at the specified path. Place web-accessible images in the 'public/' directory (e.g., 'public/images/hero.jpg'). Provide a detailed, descriptive prompt for best results. Supported formats: JPG, JPEG, and PNG. You can generate at most 10 images per session — plan your image usage carefully and prefer CSS gradients, SVG, or emoji for decorative elements.\n",
382
+ "name": "generate_image",
390
383
  "parameters": {
391
- "type": "object",
384
+ "additionalProperties": false,
392
385
  "properties": {
393
386
  "file_path": {
394
- "type": "string",
395
- "description": "Relative path to save the generated image (e.g., 'public/images/hero.jpg'). Must end in .jpg, .jpeg, or .png."
387
+ "description": "Relative path to save the generated image (e.g., 'public/images/hero.jpg'). Must end in .jpg, .jpeg, or .png.",
388
+ "type": "string"
396
389
  },
397
390
  "prompt": {
398
- "type": "string",
399
- "description": "Text prompt describing the image to generate"
391
+ "description": "Text prompt describing the image to generate",
392
+ "type": "string"
400
393
  }
401
394
  },
402
395
  "required": [
403
396
  "file_path",
404
397
  "prompt"
405
398
  ],
406
- "additionalProperties": false
399
+ "type": "object"
407
400
  }
408
- }
401
+ },
402
+ "type": "function"
409
403
  }
410
404
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/arena-agent",
3
- "version": "0.0.10-dev.1",
3
+ "version": "0.0.10-dev.10",
4
4
  "description": "A four-mode TypeScript agent harness for Arena and Code Arena traces.",
5
5
  "type": "module",
6
6
  "types": "./dist/sdk.d.ts",
@@ -29,7 +29,10 @@
29
29
  "docs/BINARY_DISTRIBUTION.md",
30
30
  "modes",
31
31
  "web",
32
+ "vendor/audio",
32
33
  "README.md",
34
+ "CHANGELOG.md",
35
+ "scripts/check-changelog.mjs",
33
36
  ".env.example"
34
37
  ],
35
38
  "engines": {
@@ -37,24 +40,30 @@
37
40
  },
38
41
  "scripts": {
39
42
  "generate:canonical-data": "node scripts/generate-canonical-data.mjs",
43
+ "generate:session-memory-prompts": "node scripts/generate-session-memory-prompts.mjs",
40
44
  "refresh:arena-v2-contract": "node scripts/refresh-arena-v2-contract.mjs && npm run generate:canonical-data",
41
- "prebuild": "npm run generate:canonical-data",
45
+ "prebuild": "npm run generate:canonical-data && npm run generate:session-memory-prompts",
42
46
  "build": "tsc -p tsconfig.json && tsc -p tsconfig.web.json",
43
47
  "build:binary": "npm run build && node scripts/build-binary.mjs",
44
48
  "package:binary": "npm run build:binary && node scripts/package-binaries.mjs",
45
49
  "package:binary:platform": "npm run build:binary && node scripts/package-binaries.mjs --skip-cli",
46
50
  "package:binary:cli": "node scripts/package-binaries.mjs --cli-only",
47
51
  "publish:binaries": "node scripts/publish-binaries.mjs",
52
+ "check:changelog": "node scripts/check-changelog.mjs",
53
+ "prepublishOnly": "npm run check:changelog",
48
54
  "dev": "tsx src/cli.ts serve",
49
55
  "tui": "tsx src/cli.ts tui",
50
- "prepack": "npm run build",
56
+ "prepare:audio": "node scripts/prepare-audio.mjs",
57
+ "prepack": "npm run build && node scripts/prepare-audio.mjs --all",
51
58
  "start": "node dist/cli.js serve",
52
- "pretest": "npm run build",
59
+ "pretest": "npm run build && npm run prepare:audio",
53
60
  "test": "tsx --test test/*.test.ts",
54
61
  "test:tool-replay": "ARENA_TOOL_REPLAY_TESTS=1 tsx --test test/tool-replay.test.ts",
55
62
  "scaffolds:validate-inputs": "tsx scripts/validate-scaffold-inputs.ts",
56
63
  "replay:tools": "tsx scripts/replay-code-tools.ts",
57
64
  "replay:arena-v2-tools": "tsx scripts/replay-arena-v2-tools.ts",
65
+ "replay:arena-v2-stateful": "tsx scripts/replay-arena-v2-stateful.ts",
66
+ "replay:arena-v2-docker": "tsx scripts/replay-arena-v2-docker.ts",
58
67
  "replay:arena-v2-history": "tsx scripts/replay-arena-v2-history.ts",
59
68
  "experiment:behavior": "tsx scripts/run-code-behavior-experiment.ts",
60
69
  "experiment:probes": "tsx scripts/run-code-behavior-probes.ts",
@@ -74,6 +83,7 @@
74
83
  "fflate": "^0.8.3",
75
84
  "iconv-lite": "^0.6.3",
76
85
  "jpeg-js": "^0.4.4",
86
+ "js-tiktoken": "1.0.21",
77
87
  "linkedom": "^0.18.13",
78
88
  "mime": "4.0.7",
79
89
  "omggif": "^1.0.10",