@qwen-code/arena-agent 0.0.9-dev.0 → 0.0.9-dev.11

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 (94) hide show
  1. package/.env.example +30 -0
  2. package/README.md +126 -25
  3. package/dist/agent.d.ts +4 -2
  4. package/dist/agent.js +116 -15
  5. package/dist/agent.js.map +1 -1
  6. package/dist/anthropic.d.ts +1 -1
  7. package/dist/anthropic.js +68 -7
  8. package/dist/anthropic.js.map +1 -1
  9. package/dist/ask-user.d.ts +20 -0
  10. package/dist/ask-user.js +388 -0
  11. package/dist/ask-user.js.map +1 -0
  12. package/dist/canonical-data.d.ts +1 -0
  13. package/dist/canonical-data.js +1 -0
  14. package/dist/canonical-data.js.map +1 -1
  15. package/dist/cli.js +26 -9
  16. package/dist/cli.js.map +1 -1
  17. package/dist/code-cli.d.ts +2 -0
  18. package/dist/code-cli.js +12 -0
  19. package/dist/code-cli.js.map +1 -0
  20. package/dist/code-tools.d.ts +73 -0
  21. package/dist/code-tools.js +2106 -0
  22. package/dist/code-tools.js.map +1 -0
  23. package/dist/config.d.ts +12 -1
  24. package/dist/config.js +66 -3
  25. package/dist/config.js.map +1 -1
  26. package/dist/fetch-page.d.ts +2 -0
  27. package/dist/fetch-page.js +50 -21
  28. package/dist/fetch-page.js.map +1 -1
  29. package/dist/history.d.ts +3 -0
  30. package/dist/history.js +4 -0
  31. package/dist/history.js.map +1 -1
  32. package/dist/mode.d.ts +6 -0
  33. package/dist/mode.js +33 -0
  34. package/dist/mode.js.map +1 -0
  35. package/dist/model-capabilities.d.ts +20 -0
  36. package/dist/model-capabilities.js +98 -0
  37. package/dist/model-capabilities.js.map +1 -0
  38. package/dist/model-diagnostics.d.ts +32 -0
  39. package/dist/model-diagnostics.js +365 -0
  40. package/dist/model-diagnostics.js.map +1 -0
  41. package/dist/provider.d.ts +16 -0
  42. package/dist/provider.js +328 -37
  43. package/dist/provider.js.map +1 -1
  44. package/dist/sdk.d.ts +26 -1
  45. package/dist/sdk.js +1 -0
  46. package/dist/sdk.js.map +1 -1
  47. package/dist/server.d.ts +2 -0
  48. package/dist/server.js +11 -2
  49. package/dist/server.js.map +1 -1
  50. package/dist/spec.d.ts +11 -8
  51. package/dist/spec.js +101 -12
  52. package/dist/spec.js.map +1 -1
  53. package/dist/tools.d.ts +11 -28
  54. package/dist/tools.js +60 -11
  55. package/dist/tools.js.map +1 -1
  56. package/dist/tui.d.ts +2 -0
  57. package/dist/tui.js +8 -2
  58. package/dist/tui.js.map +1 -1
  59. package/dist/types.d.ts +6 -1
  60. package/dist/workspace.d.ts +12 -0
  61. package/dist/workspace.js +165 -0
  62. package/dist/workspace.js.map +1 -0
  63. package/docs/BINARY_DISTRIBUTION.md +225 -0
  64. package/docs/MODES_AND_RELEASES.md +119 -0
  65. package/modes/code-arena/full-stack/system-prompt.txt +77 -0
  66. package/modes/code-arena/full-stack/template/.env +1 -0
  67. package/modes/code-arena/full-stack/template/drizzle.config.json +7 -0
  68. package/modes/code-arena/full-stack/template/eslint.config.mjs +9 -0
  69. package/modes/code-arena/full-stack/template/next.config.ts +5 -0
  70. package/modes/code-arena/full-stack/template/package.json +32 -0
  71. package/modes/code-arena/full-stack/template/postcss.config.mjs +7 -0
  72. package/modes/code-arena/full-stack/template/src/app/api/health/route.ts +13 -0
  73. package/modes/code-arena/full-stack/template/src/app/globals.css +1 -0
  74. package/modes/code-arena/full-stack/template/src/app/layout.tsx +16 -0
  75. package/modes/code-arena/full-stack/template/src/app/page.tsx +22 -0
  76. package/modes/code-arena/full-stack/template/src/db/index.ts +24 -0
  77. package/modes/code-arena/full-stack/template/src/db/schema.ts +3 -0
  78. package/modes/code-arena/full-stack/template/tsconfig.json +24 -0
  79. package/modes/code-arena/full-stack/tools.json +446 -0
  80. package/modes/code-arena/html/system-prompt.txt +36 -0
  81. package/modes/code-arena/html/tools.json +284 -0
  82. package/modes/code-arena/model.json +10 -0
  83. package/modes/code-arena/react/system-prompt.txt +33 -0
  84. package/modes/code-arena/react/template/index.html +12 -0
  85. package/modes/code-arena/react/template/package.json +28 -0
  86. package/modes/code-arena/react/template/src/App.tsx +28 -0
  87. package/modes/code-arena/react/template/src/index.css +1 -0
  88. package/modes/code-arena/react/template/src/main.tsx +10 -0
  89. package/modes/code-arena/react/template/src/utils/cn.ts +6 -0
  90. package/modes/code-arena/react/template/tsconfig.json +25 -0
  91. package/modes/code-arena/react/template/vite.config.ts +18 -0
  92. package/modes/code-arena/react/tools.json +410 -0
  93. package/package.json +15 -3
  94. package/dist/web/app.d.ts +0 -1
@@ -0,0 +1,284 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "function": {
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
+ "parameters": {
8
+ "type": "object",
9
+ "properties": {
10
+ "path": {
11
+ "type": "string",
12
+ "description": "File path relative to project root (for example, 'index.html')"
13
+ },
14
+ "offset": {
15
+ "type": "integer",
16
+ "minimum": 1,
17
+ "description": "Line number to start reading from (1-indexed, default: 1)"
18
+ },
19
+ "limit": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "description": "Maximum number of lines to read (default: 2000)"
23
+ }
24
+ },
25
+ "required": [
26
+ "path",
27
+ "offset",
28
+ "limit"
29
+ ],
30
+ "additionalProperties": false
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "type": "function",
36
+ "function": {
37
+ "name": "create_file",
38
+ "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",
39
+ "parameters": {
40
+ "type": "object",
41
+ "properties": {
42
+ "path": {
43
+ "type": "string",
44
+ "description": "File path relative to project root (for example, 'index.html')"
45
+ },
46
+ "content": {
47
+ "type": "string",
48
+ "description": "The complete content of the file"
49
+ }
50
+ },
51
+ "required": [
52
+ "path",
53
+ "content"
54
+ ],
55
+ "additionalProperties": false
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "type": "function",
61
+ "function": {
62
+ "name": "edit_file",
63
+ "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",
64
+ "parameters": {
65
+ "type": "object",
66
+ "properties": {
67
+ "path": {
68
+ "type": "string",
69
+ "description": "File path relative to project root (for example, 'index.html')"
70
+ },
71
+ "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."
74
+ },
75
+ "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."
78
+ }
79
+ },
80
+ "required": [
81
+ "path",
82
+ "context",
83
+ "replacement"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ }
88
+ },
89
+ {
90
+ "type": "function",
91
+ "function": {
92
+ "name": "grep_files",
93
+ "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.",
94
+ "parameters": {
95
+ "type": "object",
96
+ "properties": {
97
+ "pattern": {
98
+ "type": "string",
99
+ "description": "The regex pattern to search for in file contents"
100
+ },
101
+ "path": {
102
+ "type": "string",
103
+ "description": "The directory to search in, relative to project root. Defaults to the project root."
104
+ },
105
+ "glob": {
106
+ "type": "string",
107
+ "description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\")"
108
+ },
109
+ "output_mode": {
110
+ "type": "string",
111
+ "enum": [
112
+ "content",
113
+ "files_with_matches",
114
+ "count"
115
+ ],
116
+ "description": "Output mode: \"content\" shows matching lines (default), \"files_with_matches\" shows only file paths, \"count\" shows match counts per file."
117
+ },
118
+ "-i": {
119
+ "type": "boolean",
120
+ "description": "Case insensitive search"
121
+ },
122
+ "-B": {
123
+ "type": "integer",
124
+ "minimum": 0,
125
+ "description": "Number of lines to show before each match"
126
+ },
127
+ "-A": {
128
+ "type": "integer",
129
+ "minimum": 0,
130
+ "description": "Number of lines to show after each match"
131
+ },
132
+ "-C": {
133
+ "type": "integer",
134
+ "minimum": 0,
135
+ "description": "Number of lines to show before and after each match"
136
+ },
137
+ "context": {
138
+ "type": "integer",
139
+ "minimum": 0,
140
+ "description": "Alias for -C (context lines before and after)"
141
+ }
142
+ },
143
+ "required": [
144
+ "pattern",
145
+ "path",
146
+ "glob",
147
+ "output_mode",
148
+ "-i",
149
+ "-B",
150
+ "-A",
151
+ "-C",
152
+ "context"
153
+ ],
154
+ "additionalProperties": false
155
+ }
156
+ }
157
+ },
158
+ {
159
+ "type": "function",
160
+ "function": {
161
+ "name": "web_search",
162
+ "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.",
163
+ "parameters": {
164
+ "type": "object",
165
+ "properties": {
166
+ "query": {
167
+ "type": "string",
168
+ "description": "The search query"
169
+ },
170
+ "depth": {
171
+ "type": "string",
172
+ "enum": [
173
+ "1",
174
+ "2",
175
+ "3"
176
+ ],
177
+ "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."
178
+ }
179
+ },
180
+ "required": [
181
+ "query",
182
+ "depth"
183
+ ],
184
+ "additionalProperties": false
185
+ }
186
+ }
187
+ },
188
+ {
189
+ "type": "function",
190
+ "function": {
191
+ "name": "web_fetch",
192
+ "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\".",
193
+ "parameters": {
194
+ "type": "object",
195
+ "properties": {
196
+ "url": {
197
+ "type": "string",
198
+ "description": "The URL to fetch content from"
199
+ },
200
+ "format": {
201
+ "type": "string",
202
+ "enum": [
203
+ "markdown",
204
+ "text",
205
+ "html"
206
+ ],
207
+ "description": "Output format: \"markdown\" (default), \"text\", or \"html\""
208
+ }
209
+ },
210
+ "required": [
211
+ "url",
212
+ "format"
213
+ ],
214
+ "additionalProperties": false
215
+ }
216
+ }
217
+ },
218
+ {
219
+ "type": "function",
220
+ "function": {
221
+ "name": "fetch_media",
222
+ "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",
223
+ "parameters": {
224
+ "type": "object",
225
+ "properties": {
226
+ "query": {
227
+ "type": "string",
228
+ "description": "Search query for stock media, such as 'modern office interior' or 'ocean waves'."
229
+ },
230
+ "media_type": {
231
+ "type": "string",
232
+ "enum": [
233
+ "image",
234
+ "video",
235
+ "both"
236
+ ],
237
+ "default": "both",
238
+ "description": "Type of media: \"image\", \"video\", or \"both\". Defaults to \"both\"."
239
+ },
240
+ "count": {
241
+ "type": "number",
242
+ "default": 6,
243
+ "description": "Number of assets to return (1-10). Defaults to 6."
244
+ },
245
+ "orientation": {
246
+ "type": "string",
247
+ "enum": [
248
+ "any",
249
+ "landscape",
250
+ "portrait",
251
+ "square"
252
+ ],
253
+ "default": "any",
254
+ "description": "Desired orientation. Defaults to \"any\"."
255
+ },
256
+ "size": {
257
+ "type": "string",
258
+ "enum": [
259
+ "any",
260
+ "large",
261
+ "medium",
262
+ "small"
263
+ ],
264
+ "default": "any",
265
+ "description": "Minimum media size. Defaults to \"any\"."
266
+ },
267
+ "locale": {
268
+ "type": "string",
269
+ "description": "Search locale, such as \"en-US\". Defaults to \"en-US\"."
270
+ }
271
+ },
272
+ "required": [
273
+ "query",
274
+ "media_type",
275
+ "count",
276
+ "orientation",
277
+ "size",
278
+ "locale"
279
+ ],
280
+ "additionalProperties": false
281
+ }
282
+ }
283
+ }
284
+ ]
@@ -0,0 +1,10 @@
1
+ {
2
+ "incremental_output": true,
3
+ "max_tokens": 131072,
4
+ "temperature": 1,
5
+ "result_format": "message",
6
+ "enable_thinking": true,
7
+ "thinking_budget": 81920,
8
+ "preserve_thinking": true,
9
+ "tool_choice": "auto"
10
+ }
@@ -0,0 +1,33 @@
1
+ You are an expert coding assistant who creates web applications using React, Vite, and Tailwind CSS. You will be using the provided tools to view, create, and edit files in the project.
2
+ For any user prompt, always try to generate a website. Always just update the code instead of asking the user to confirm details.
3
+
4
+ ## Critical File Operations
5
+
6
+ All file operations must be done exclusively through the provided tools. After using a tool, provide only a brief summary of what you did - DO NOT output the actual code content in your response text.
7
+ You can use 'list_files', 'grep_files', and 'glob_files' to explore the project, search file contents by regex, and discover files by name pattern.
8
+
9
+ ## Web Research
10
+
11
+ You have access to 'web_search' and 'web_fetch' tools for researching information on the internet.
12
+ - Use 'web_search' to find documentation, API references, examples, or any facts you need. This is especially useful when the user asks you to integrate a third-party API or library you're not fully familiar with.
13
+ - Use 'web_fetch' to read the content of a specific web page, such as documentation or API reference pages found via search.
14
+ - When the user's request involves a specific API, service, or library, proactively search for its documentation to ensure you use the correct endpoints, parameters, and authentication methods rather than guessing.
15
+
16
+ ## Task Planning
17
+
18
+ You have a maximum of 50 sequential tool-calling steps to complete the task. Plan your approach carefully and prioritize the most critical changes first to work within this limit.
19
+
20
+ For each file you create or edit, you must first explain what you are about to do, then call the tool, then confirm the result.
21
+
22
+ ## Requirements
23
+
24
+ The 'App' component in 'src/App.tsx' is the entry point. Replace it with your implementation.
25
+ ALWAYS create complete, functional web applications. When you are finished, 'npm run build' will be called to build the project and the generated dist/index.html file will be served.
26
+ NEVER edit package.json or vite.config.ts directly. Use the 'install_npm_packages' tool to install new packages.
27
+ When you are finished, ALWAYS use build_project to confirm that the project builds successfully. NEVER try to write your own build command.
28
+
29
+ ## Remember
30
+
31
+ Use tools for all file creation and editing. Never output code directly in your response text.
32
+ Feel free to use multiple files in your implementation
33
+ Update the title in index.html to something appropriate.
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Arena Web Dev App</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "react-vite-tailwind",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "clsx": "2.1.1",
13
+ "react": "19.2.3",
14
+ "react-dom": "19.2.3",
15
+ "tailwind-merge": "3.4.0"
16
+ },
17
+ "devDependencies": {
18
+ "@tailwindcss/vite": "4.1.17",
19
+ "@types/node": "^22.0.0",
20
+ "@types/react": "19.2.7",
21
+ "@types/react-dom": "19.2.3",
22
+ "@vitejs/plugin-react": "5.1.1",
23
+ "tailwindcss": "4.1.17",
24
+ "typescript": "5.9.3",
25
+ "vite": "7.2.4",
26
+ "vite-plugin-singlefile": "2.3.0"
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ export function App() {
2
+ return (
3
+ <div className="flex min-h-screen items-center justify-center bg-gradient-to-br from-slate-50 via-white to-zinc-100 p-8">
4
+ <div className="space-y-6 text-center">
5
+ <div className="inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-violet-500 to-indigo-600 shadow-lg shadow-indigo-200">
6
+ <svg
7
+ className="h-8 w-8 text-white"
8
+ viewBox="0 0 24 24"
9
+ fill="none"
10
+ stroke="currentColor"
11
+ strokeWidth={2}
12
+ strokeLinecap="round"
13
+ strokeLinejoin="round"
14
+ >
15
+ <rect x="2" y="4" width="20" height="16" rx="2" />
16
+ <path d="M10 4v4" />
17
+ <path d="M2 8h20" />
18
+ <path d="M6 4v4" />
19
+ </svg>
20
+ </div>
21
+ <div className="space-y-2">
22
+ <h1 className="text-3xl font-semibold tracking-tight text-slate-900">Ready to build</h1>
23
+ <p className="text-slate-500">Start prompting to build your app.</p>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ );
28
+ }
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,10 @@
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import "./index.css";
4
+ import { App } from "./App";
5
+
6
+ createRoot(document.getElementById("root")!).render(
7
+ <StrictMode>
8
+ <App />
9
+ </StrictMode>
10
+ );
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "types": ["node"],
9
+ "moduleResolution": "bundler",
10
+ "allowImportingTsExtensions": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "noEmit": true,
14
+ "jsx": "react-jsx",
15
+ "baseUrl": ".",
16
+ "paths": {
17
+ "@/*": ["src/*"]
18
+ },
19
+ "strict": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true,
22
+ "noFallthroughCasesInSwitch": true
23
+ },
24
+ "include": ["src", "vite.config.ts"]
25
+ }
@@ -0,0 +1,18 @@
1
+ import path from "path";
2
+ import { fileURLToPath } from "url";
3
+ import tailwindcss from "@tailwindcss/vite";
4
+ import react from "@vitejs/plugin-react";
5
+ import { defineConfig } from "vite";
6
+ import { viteSingleFile } from "vite-plugin-singlefile";
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+
11
+ export default defineConfig({
12
+ plugins: [react(), tailwindcss(), viteSingleFile()],
13
+ resolve: {
14
+ alias: {
15
+ "@": path.resolve(__dirname, "src"),
16
+ },
17
+ },
18
+ });