@qwen-code/arena-agent 0.0.1

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 (64) hide show
  1. package/.env.example +52 -0
  2. package/README.md +436 -0
  3. package/dist/agent.d.ts +33 -0
  4. package/dist/agent.js +366 -0
  5. package/dist/agent.js.map +1 -0
  6. package/dist/attachments.d.ts +29 -0
  7. package/dist/attachments.js +222 -0
  8. package/dist/attachments.js.map +1 -0
  9. package/dist/cli.d.ts +2 -0
  10. package/dist/cli.js +256 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/compaction.d.ts +15 -0
  13. package/dist/compaction.js +176 -0
  14. package/dist/compaction.js.map +1 -0
  15. package/dist/config.d.ts +23 -0
  16. package/dist/config.js +61 -0
  17. package/dist/config.js.map +1 -0
  18. package/dist/document-reader.d.ts +18 -0
  19. package/dist/document-reader.js +423 -0
  20. package/dist/document-reader.js.map +1 -0
  21. package/dist/fetch-page.d.ts +25 -0
  22. package/dist/fetch-page.js +428 -0
  23. package/dist/fetch-page.js.map +1 -0
  24. package/dist/history.d.ts +5 -0
  25. package/dist/history.js +31 -0
  26. package/dist/history.js.map +1 -0
  27. package/dist/mock.d.ts +4 -0
  28. package/dist/mock.js +151 -0
  29. package/dist/mock.js.map +1 -0
  30. package/dist/protocol.d.ts +23 -0
  31. package/dist/protocol.js +84 -0
  32. package/dist/protocol.js.map +1 -0
  33. package/dist/provider.d.ts +31 -0
  34. package/dist/provider.js +308 -0
  35. package/dist/provider.js.map +1 -0
  36. package/dist/sdk.d.ts +181 -0
  37. package/dist/sdk.js +674 -0
  38. package/dist/sdk.js.map +1 -0
  39. package/dist/server.d.ts +15 -0
  40. package/dist/server.js +1433 -0
  41. package/dist/server.js.map +1 -0
  42. package/dist/spec.d.ts +11 -0
  43. package/dist/spec.js +198 -0
  44. package/dist/spec.js.map +1 -0
  45. package/dist/tools.d.ts +38 -0
  46. package/dist/tools.js +992 -0
  47. package/dist/tools.js.map +1 -0
  48. package/dist/tui.d.ts +10 -0
  49. package/dist/tui.js +350 -0
  50. package/dist/tui.js.map +1 -0
  51. package/dist/types.d.ts +146 -0
  52. package/dist/types.js +2 -0
  53. package/dist/types.js.map +1 -0
  54. package/dist/web/app.d.ts +1 -0
  55. package/dist/web/app.js +1082 -0
  56. package/dist/web/app.js.map +1 -0
  57. package/docs/SDK.md +521 -0
  58. package/package.json +59 -0
  59. package/spec/message.json +150 -0
  60. package/spec/tools.json +418 -0
  61. package/web/arena-logo.svg +11 -0
  62. package/web/fonts.css +67 -0
  63. package/web/index.html +285 -0
  64. package/web/styles.css +1798 -0
package/web/fonts.css ADDED
@@ -0,0 +1,67 @@
1
+ @font-face {
2
+ font-family: "baselGrotesk";
3
+ src: url("https://arena.ai/_next/static/media/121b8959500e2dbb-s.p.woff2?dpl=dpl_3aE593xcnXMtK9Q457zoyLSXpsZA") format("woff2");
4
+ font-style: normal;
5
+ font-weight: 400;
6
+ font-display: swap;
7
+ }
8
+
9
+ @font-face {
10
+ font-family: "baselGrotesk";
11
+ src: url("https://arena.ai/_next/static/media/814dad51953cb2f1-s.p.woff2?dpl=dpl_3aE593xcnXMtK9Q457zoyLSXpsZA") format("woff2");
12
+ font-style: normal;
13
+ font-weight: 450;
14
+ font-display: swap;
15
+ }
16
+
17
+ @font-face {
18
+ font-family: "baselGrotesk";
19
+ src: url("https://arena.ai/_next/static/media/9dcef913907d177d-s.p.woff2?dpl=dpl_3aE593xcnXMtK9Q457zoyLSXpsZA") format("woff2");
20
+ font-style: normal;
21
+ font-weight: 500;
22
+ font-display: swap;
23
+ }
24
+
25
+ @font-face {
26
+ font-family: "baselGrotesk";
27
+ src: url("https://arena.ai/_next/static/media/0a7dccb9ebe20c72-s.p.woff2?dpl=dpl_3aE593xcnXMtK9Q457zoyLSXpsZA") format("woff2");
28
+ font-style: normal;
29
+ font-weight: 700;
30
+ font-display: swap;
31
+ }
32
+
33
+ @font-face {
34
+ font-family: "martinaPlantijn";
35
+ src: url("https://arena.ai/_next/static/media/129456645e506c76-s.p.woff2?dpl=dpl_3aE593xcnXMtK9Q457zoyLSXpsZA") format("woff2");
36
+ font-style: normal;
37
+ font-weight: 300;
38
+ font-display: swap;
39
+ }
40
+
41
+ @font-face {
42
+ font-family: "martinaPlantijn";
43
+ src: url("https://arena.ai/_next/static/media/d00ac9cf364fead5-s.p.woff2?dpl=dpl_3aE593xcnXMtK9Q457zoyLSXpsZA") format("woff2");
44
+ font-style: italic;
45
+ font-weight: 300;
46
+ font-display: swap;
47
+ }
48
+
49
+ @font-face {
50
+ font-family: "baselGrotesk Fallback";
51
+ src: local("Arial");
52
+ ascent-override: 95.37%;
53
+ descent-override: 25.86%;
54
+ line-gap-override: 0%;
55
+ size-adjust: 98.98%;
56
+ font-display: swap;
57
+ }
58
+
59
+ @font-face {
60
+ font-family: "martinaPlantijn Fallback";
61
+ src: local("Arial");
62
+ ascent-override: 121.11%;
63
+ descent-override: 43.93%;
64
+ line-gap-override: 0%;
65
+ size-adjust: 94.46%;
66
+ font-display: swap;
67
+ }
package/web/index.html ADDED
@@ -0,0 +1,285 @@
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" />
6
+ <meta
7
+ name="description"
8
+ content="Arena CodeAgent — experience a local coding agent at the frontier."
9
+ />
10
+ <title>Arena CodeAgent</title>
11
+ <link rel="icon" href="https://arena.ai/images/favicon-rebrand.svg" />
12
+ <link rel="stylesheet" href="/fonts.css?v=arena-ai" />
13
+ <link rel="stylesheet" href="/styles.css?v=arena-ai" />
14
+ </head>
15
+ <body>
16
+ <div class="app-shell" id="app-shell">
17
+ <aside class="sidebar" id="sidebar" aria-label="Primary navigation">
18
+ <div class="sidebar-brand">
19
+ <a class="brand" href="/" aria-label="Arena CodeAgent home">
20
+ <img class="brand-logo" src="/arena-logo.svg" alt="Arena" />
21
+ </a>
22
+ <button
23
+ class="sidebar-toggle"
24
+ id="sidebar-toggle"
25
+ type="button"
26
+ aria-label="Toggle sidebar"
27
+ aria-expanded="false"
28
+ >
29
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true">
30
+ <path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
31
+ <path d="M9.5 21V3M5.5 10l1.75 2-1.75 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
32
+ </svg>
33
+ </button>
34
+ </div>
35
+
36
+ <nav class="sidebar-nav" aria-label="Workspace">
37
+ <button class="nav-item" id="new-chat" type="button">
38
+ <span class="nav-icon" aria-hidden="true">◌</span>
39
+ <span class="nav-label">New Chat</span>
40
+ <kbd>⌘ K</kbd>
41
+ </button>
42
+ <button class="nav-item" type="button">
43
+ <span class="nav-icon" aria-hidden="true">☷</span>
44
+ <span class="nav-label">Leaderboard</span>
45
+ </button>
46
+ <button class="nav-item" type="button">
47
+ <span class="nav-icon" aria-hidden="true">◯</span>
48
+ <span class="nav-label">Search</span>
49
+ </button>
50
+ </nav>
51
+
52
+ <section class="agent-promo">
53
+ <video autoplay muted loop playsinline aria-label="Arena agent mode preview">
54
+ <source src="https://arena.ai/videos/cta/agents-cta.mp4" type="video/mp4" />
55
+ </video>
56
+ <h2>Get More Done With Agents</h2>
57
+ <p>Start evaluating agentic AI on Arena today. <a href="https://arena.ai/blog/agent-mode/" target="_blank" rel="noreferrer">Learn more</a></p>
58
+ <button type="button" data-prompt="Inspect this workspace and summarize the architecture">
59
+ Try it now
60
+ </button>
61
+ <button class="hide-promo" type="button">⌄ Hide this</button>
62
+ </section>
63
+
64
+ <div class="sidebar-session">
65
+ <button class="login-button" type="button">Log In</button>
66
+ <div class="legal-links">
67
+ <a href="https://arena.ai/terms-of-use" target="_blank" rel="noreferrer">Terms of Use</a>
68
+ <a href="https://arena.ai/privacy-policy" target="_blank" rel="noreferrer">Privacy Policy</a>
69
+ <button type="button">Cookies</button>
70
+ </div>
71
+ <span class="runtime-data" aria-hidden="true">
72
+ <small id="task-id">New chat</small>
73
+ <strong id="model-name">Loading…</strong>
74
+ </span>
75
+ </div>
76
+ </aside>
77
+
78
+ <div class="workspace-shell">
79
+ <header class="topbar">
80
+ <button
81
+ class="mobile-sidebar-toggle"
82
+ id="mobile-sidebar-toggle"
83
+ type="button"
84
+ aria-label="Open sidebar"
85
+ >
86
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true">
87
+ <path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
88
+ <path d="M9.5 21V3M5.5 10l1.75 2-1.75 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
89
+ </svg>
90
+ </button>
91
+
92
+ <div class="mode-picker">
93
+ <button
94
+ class="mode-toggle"
95
+ id="mode-toggle"
96
+ type="button"
97
+ aria-haspopup="menu"
98
+ aria-expanded="false"
99
+ >
100
+ <svg class="mode-icon" width="18" height="18" viewBox="0 0 18 18" fill="none" aria-hidden="true">
101
+ <path d="M4.5 1.6875c.149 0 .292.059.398.165l8.625 8.625a.563.563 0 0 1-.796.796L4.267 2.812H2.812v1.455l8.46 8.46a.563.563 0 0 1-.795.796L1.852 4.898a.562.562 0 0 1-.165-.398V2.25c0-.31.252-.563.563-.563H4.5Z" fill="currentColor" />
102
+ <path d="M13.852 9.352a.563.563 0 0 1 .796.796l-4.5 4.5a.563.563 0 0 1-.796-.796l4.5-4.5Zm1.5 4.5a.563.563 0 0 1 .796.796l-1.5 1.5a.563.563 0 0 1-.796-.796l1.5-1.5ZM15.75 1.687c.31 0 .563.252.563.563V4.5a.562.562 0 0 1-.165.398l-2.625 2.625a.563.563 0 0 1-.796-.796l2.46-2.46V2.812h-1.454l-2.46 2.46a.563.563 0 0 1-.796-.795l2.625-2.625a.562.562 0 0 1 .398-.165h2.25ZM4.102 10.102a.563.563 0 0 1 .796 0l3 3a.563.563 0 0 1-.796.796l-3-3a.563.563 0 0 1 0-.796Zm1.5 1.5a.563.563 0 0 1 .796.796l-3 3a.563.563 0 0 1-.796-.796l3-3Zm-3.75 2.25a.563.563 0 0 1 .796 0l1.5 1.5a.563.563 0 0 1-.796.796l-1.5-1.5a.563.563 0 0 1 0-.796Z" fill="currentColor" />
103
+ </svg>
104
+ <span id="mode-label">Battle Mode</span>
105
+ <span class="chevron" aria-hidden="true">⌄</span>
106
+ </button>
107
+ <div class="mode-menu" id="mode-menu" role="menu" hidden>
108
+ <button class="mode-option is-selected" type="button" role="menuitem" data-mode="Battle Mode">
109
+ <span aria-hidden="true">⚔</span>
110
+ <span><strong>Battle Mode</strong><small>Battle 2 anonymous models</small></span>
111
+ </button>
112
+ <button class="mode-option" type="button" role="menuitem" data-mode="Agent Mode">
113
+ <span aria-hidden="true">✣</span>
114
+ <span><strong>Agent Mode</strong><small>Built for complex tasks</small></span>
115
+ </button>
116
+ <button class="mode-option" type="button" role="menuitem" data-mode="Side by Side">
117
+ <span aria-hidden="true">◒</span>
118
+ <span><strong>Side by Side</strong><small>Compare 2 models of your choice</small></span>
119
+ </button>
120
+ <button class="mode-option" type="button" role="menuitem" data-mode="Direct">
121
+ <span aria-hidden="true">◯</span>
122
+ <span><strong>Direct</strong><small>Chat with 1 model at a time</small></span>
123
+ </button>
124
+ </div>
125
+ </div>
126
+
127
+ <div class="connection" id="connection" data-state="connecting">
128
+ <span></span>
129
+ <strong id="connection-label">Loading</strong>
130
+ </div>
131
+ </header>
132
+
133
+ <div class="announcement" id="announcement">
134
+ <button id="dismiss-banner" type="button" aria-label="Dismiss banner">×</button>
135
+ <span class="announcement-copy">
136
+ <span class="announcement-desktop">Follow us for the latest in AI news and advancements</span>
137
+ <span class="announcement-mobile">For the latest in AI news</span>
138
+ </span>
139
+ <span class="announcement-links" aria-label="Community links">
140
+ <span>𝕏</span><span>in</span><span>▶</span>
141
+ </span>
142
+ </div>
143
+
144
+ <main class="main">
145
+ <section
146
+ class="conversation"
147
+ id="conversation"
148
+ aria-label="Conversation"
149
+ aria-live="polite"
150
+ >
151
+ <div class="empty-state" id="empty-state">
152
+ <img class="hero-logo" src="/arena-logo.svg" alt="Arena" />
153
+ <h1>Experience the <em>frontier</em></h1>
154
+ </div>
155
+ <div class="messages" id="messages"></div>
156
+ </section>
157
+
158
+ <footer class="composer-wrap">
159
+ <form class="composer" id="composer">
160
+ <textarea
161
+ id="prompt"
162
+ rows="2"
163
+ aria-label="Ask Arena anything"
164
+ placeholder="Ask anything…"
165
+ maxlength="32000"
166
+ ></textarea>
167
+ <input id="file-input" type="file" multiple hidden />
168
+ <div class="attachment-list" id="attachment-list" hidden></div>
169
+ <div class="composer-bar">
170
+ <button class="add-files" id="add-files" type="button" aria-label="Add files">
171
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
172
+ <path d="M13.234 20.252 21 12.3" />
173
+ <path d="m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486" />
174
+ </svg>
175
+ <span>Add files</span>
176
+ </button>
177
+ <div class="composer-tools" aria-label="Tools">
178
+ <button type="button" title="Agent mode" aria-label="Agent mode">ϟ</button>
179
+ <button type="button" title="Code" aria-label="Code">
180
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true">
181
+ <path d="M13.5 6 10 18.5M6.5 8.5 3 12l3.5 3.5M17.5 8.5 21 12l-3.5 3.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
182
+ </svg>
183
+ </button>
184
+ <button type="button" title="Search" aria-label="Search">◎</button>
185
+ <button type="button" title="Image" aria-label="Image">▧</button>
186
+ <button type="button" title="Preview" aria-label="Preview">▣</button>
187
+ </div>
188
+ <button
189
+ class="artifact-toggle"
190
+ id="artifact-toggle"
191
+ type="button"
192
+ aria-label="Show workspace files"
193
+ >
194
+ ◫ <span id="artifact-count">0</span>
195
+ </button>
196
+ <button class="stop-button" id="stop" type="button" hidden>
197
+ <span></span> Stop
198
+ </button>
199
+ <button class="send-button" id="send" type="submit" aria-label="Send message">
200
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true">
201
+ <path d="M3 12h18m0 0-8.5-8.5M21 12l-8.5 8.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
202
+ </svg>
203
+ </button>
204
+ </div>
205
+ </form>
206
+
207
+ <section class="suggestion-panel" aria-labelledby="get-started-title">
208
+ <p id="get-started-title">Get started</p>
209
+ <div class="suggestions">
210
+ <button type="button" data-prompt="Create a sleek, modern landing page">
211
+ <span aria-hidden="true">▰</span>
212
+ <span><strong>Create a landing page</strong><small>Create a sleek, modern landing page</small></span>
213
+ </button>
214
+ <button type="button" data-prompt="Build a dashboard that turns data into interactive charts">
215
+ <span aria-hidden="true">▧</span>
216
+ <span><strong>Build a dashboard</strong><small>Turn data into interactive charts</small></span>
217
+ </button>
218
+ <button type="button" data-prompt="Make a playable browser game">
219
+ <span aria-hidden="true">♙</span>
220
+ <span><strong>Make a game</strong><small>Build a playable browser game</small></span>
221
+ </button>
222
+ <button type="button" data-prompt="Turn a product design into working frontend code">
223
+ <span aria-hidden="true">⌗</span>
224
+ <span><strong>Design to Code</strong><small>Upload an image and have AI build it</small></span>
225
+ </button>
226
+ <button type="button" data-prompt="Build a templated full-stack app">
227
+ <span aria-hidden="true">▤</span>
228
+ <span><strong>Build a fullstack app</strong><small>Create a templated full-stack app</small></span>
229
+ </button>
230
+ <button type="button" data-prompt="Create a beautiful online storefront">
231
+ <span aria-hidden="true">▥</span>
232
+ <span><strong>Launch a storefront</strong><small>Create a beautiful online shop</small></span>
233
+ </button>
234
+ </div>
235
+ </section>
236
+ <p class="disclaimer">
237
+ The agent can edit and run files in this workspace. Review important changes.
238
+ </p>
239
+ </footer>
240
+ </main>
241
+ </div>
242
+
243
+ <section class="artifacts" id="artifact-panel" aria-label="Workspace files" hidden>
244
+ <div class="artifacts-header">
245
+ <div>
246
+ <p>Workspace</p>
247
+ <h2 id="artifact-title">Artifacts</h2>
248
+ </div>
249
+ <button id="artifact-close" type="button" aria-label="Close workspace files">×</button>
250
+ </div>
251
+ <div class="artifact-preview" id="artifact-preview" hidden>
252
+ <div class="artifact-preview-toolbar">
253
+ <span id="artifact-preview-path"></span>
254
+ <a
255
+ id="artifact-open"
256
+ href="#"
257
+ target="_blank"
258
+ rel="noreferrer"
259
+ aria-label="Open presented file in a new tab"
260
+ >Open ↗</a>
261
+ </div>
262
+ <div class="artifact-preview-body" id="artifact-preview-body"></div>
263
+ </div>
264
+ <div class="artifact-empty" id="artifact-empty">
265
+ <span aria-hidden="true">◇</span>
266
+ <strong>No artifacts yet</strong>
267
+ <p>Files created by the agent will appear here.</p>
268
+ </div>
269
+ <div class="artifact-list" id="artifact-list"></div>
270
+ </section>
271
+ </div>
272
+
273
+ <template id="message-template">
274
+ <article class="message">
275
+ <div class="avatar"></div>
276
+ <div class="message-body">
277
+ <div class="message-label"></div>
278
+ <div class="message-content"></div>
279
+ </div>
280
+ </article>
281
+ </template>
282
+
283
+ <script type="module" src="/app.js?v=arena-sdk-client"></script>
284
+ </body>
285
+ </html>