apex-dev 2.0.0 → 3.0.0

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 (77) hide show
  1. package/.local/share/amp/history.jsonl +33 -0
  2. package/.local/share/amp/session.json +3 -3
  3. package/.local/share/amp/threads/T-019c9761-858c-719b-911f-bc2e4c8cbdde.json +188 -0
  4. package/.local/share/amp/threads/T-019c9761-f5f3-7606-a900-ebe7f10d6e37.json +121 -0
  5. package/.local/share/amp/threads/T-019c9763-b1ae-729d-90aa-f59938ce912e.json +799 -0
  6. package/.local/share/amp/threads/T-019c9769-4a8a-77b8-beab-f48973276f9a.json +1541 -0
  7. package/.local/share/amp/threads/T-019c9772-edac-7075-b26e-0ada1f8697d2.json +7 -0
  8. package/.local/share/amp/threads/T-019c97e8-a9ab-71a1-a8f9-109c540c98bf.json +111 -0
  9. package/.local/share/amp/threads/T-019c97e9-2277-753c-8c5d-df745fa6cfff.json +7 -0
  10. package/.local/share/amp/threads/T-019c97e9-f28e-758d-9663-e37047a8ed95.json +111 -0
  11. package/.local/share/amp/threads/T-019c97ea-17c7-77b8-92b2-f641c069bcc9.json +71 -0
  12. package/.local/share/amp/threads/T-019c97ea-44c6-75b8-88bc-d88113194f6a.json +1611 -0
  13. package/.local/share/amp/threads/T-019c97ec-abae-7251-a5f6-693adf496a1c.json +7 -0
  14. package/.local/share/amp/threads/T-019c97f5-8e61-73ad-8c5d-2637abedcde6.json +1341 -0
  15. package/.local/share/amp/threads/T-019c989d-4f4e-7249-bde0-21d19455ccae.json +163 -0
  16. package/.local/share/amp/threads/T-019c989d-9024-73c4-bee8-e2ae45028a39.json +124 -0
  17. package/.local/share/amp/threads/T-019c989e-1394-74ad-8234-ac573fcdb4c7.json +1260 -0
  18. package/.local/share/amp/threads/T-019c989f-e3dd-772e-85ac-525d0fc88fda.json +403 -0
  19. package/.local/share/amp/threads/T-019c98a1-7b0c-778a-b311-2e1cff85d710.json +3422 -0
  20. package/.local/share/amp/threads/T-019c98c5-4b7f-7284-99e9-88aa8c18ba66.json +1830 -0
  21. package/.local/share/amp/threads/T-019c98d0-f27f-76ec-be10-6df96f22be99.json +4061 -0
  22. package/.local/share/amp/threads/T-019c98f9-d031-704d-a0c2-f2f395f68f2b.json +509 -0
  23. package/.local/share/amp/threads/T-019c9919-f9ee-766c-90be-af7a07f6a4c6.json +2075 -0
  24. package/.local/share/amp/threads/T-019c991c-b98b-7158-9083-cc52408beb13.json +7 -0
  25. package/.local/share/amp/threads/T-019c991d-66d6-72aa-a9a1-105f7df0ea06.json +7 -0
  26. package/.local/share/amp/threads/T-019c9c2e-71a4-77ff-bd7f-b053da7f9000.json +1637 -0
  27. package/.local/share/amp/threads/T-019c9c45-27ca-728b-ba77-835115dfa9b2.json +3893 -0
  28. package/.local/share/amp/threads/T-019c9c48-45dc-736a-9752-e4119fe698f9.json +7 -0
  29. package/.local/share/amp/threads/T-019c9c4d-266b-72d0-b56e-74a5777e6583.json +7 -0
  30. package/.local/share/amp/threads/T-019c9c52-ab89-758f-9178-bda99c39d10b.json +7 -0
  31. package/.local/share/opencode/opencode.db +0 -0
  32. package/.local/share/opencode/opencode.db-shm +0 -0
  33. package/.local/share/opencode/opencode.db-wal +0 -0
  34. package/.local/share/opencode/storage/agent-usage-reminder/ses_36870ea98ffe8S5ZOCE4F11yFh.json +6 -0
  35. package/.local/share/opencode/storage/agent-usage-reminder/ses_3687a3e9affewUnHBzvpiPR6df.json +6 -0
  36. package/.local/share/opencode/storage/agent-usage-reminder/ses_36886e68dffeKVgUWf6lzXdEEt.json +6 -0
  37. package/.local/share/opencode/storage/session_diff/ses_36870ea98ffe8S5ZOCE4F11yFh.json +1 -0
  38. package/.local/share/opencode/storage/session_diff/ses_3687a3e9affewUnHBzvpiPR6df.json +1 -0
  39. package/.local/share/opencode/storage/session_diff/ses_36886e68dffeKVgUWf6lzXdEEt.json +1 -0
  40. package/.local/state/replit/log-query.db +0 -0
  41. package/.local/state/replit/log-query.db-shm +0 -0
  42. package/.local/state/replit/log-query.db-wal +0 -0
  43. package/.upm/store.json +1 -1
  44. package/AGENTS.md +32 -0
  45. package/bun.lock +137 -103
  46. package/index.jsx +24 -0
  47. package/package.json +9 -9
  48. package/src/agent.js +252 -169
  49. package/src/app.jsx +96 -0
  50. package/src/commands.js +66 -38
  51. package/src/components/AssistantMessage.jsx +83 -0
  52. package/src/components/ChatArea.jsx +84 -0
  53. package/src/components/DiffView.jsx +26 -0
  54. package/src/components/Divider.jsx +8 -0
  55. package/src/components/Header.jsx +44 -0
  56. package/src/components/HelpModal.jsx +81 -0
  57. package/src/components/InputBar.jsx +32 -0
  58. package/src/components/Spinner.jsx +23 -0
  59. package/src/components/StatusBar.jsx +44 -0
  60. package/src/components/SystemMessage.jsx +31 -0
  61. package/src/components/ThinkBlock.jsx +29 -0
  62. package/src/components/ToolCallItem.jsx +43 -0
  63. package/src/components/UserMessage.jsx +11 -0
  64. package/src/components/Welcome.jsx +14 -0
  65. package/src/config.js +118 -2
  66. package/src/hooks/useLayout.js +15 -0
  67. package/src/hooks/useStore.js +6 -0
  68. package/src/prompt.js +67 -48
  69. package/src/store.js +99 -0
  70. package/src/theme.js +19 -0
  71. package/src/thinking.js +0 -24
  72. package/src/toolExecutors.js +580 -23
  73. package/src/tools.js +146 -4
  74. package/src/utils.js +32 -0
  75. package/tsconfig.json +10 -0
  76. package/index.js +0 -92
  77. package/src/ui.js +0 -269
@@ -0,0 +1,403 @@
1
+ {
2
+ "v": 321,
3
+ "id": "T-019c989f-e3dd-772e-85ac-525d0fc88fda",
4
+ "created": 1772087141347,
5
+ "messages": [
6
+ {
7
+ "role": "user",
8
+ "messageId": 0,
9
+ "content": [
10
+ {
11
+ "type": "text",
12
+ "text": "make sure the CLI tool can start"
13
+ }
14
+ ],
15
+ "userState": {
16
+ "currentlyVisibleFiles": []
17
+ },
18
+ "agentMode": "smart",
19
+ "meta": {
20
+ "sentAt": 1772087157008
21
+ }
22
+ },
23
+ {
24
+ "role": "assistant",
25
+ "messageId": 1,
26
+ "content": [
27
+ {
28
+ "type": "text",
29
+ "text": "\n\n"
30
+ },
31
+ {
32
+ "type": "thinking",
33
+ "thinking": "Let me first understand the project structure and what CLI tool we're dealing with.",
34
+ "signature": "Ev0BCkgICxACGAIqQEfy6htJGLz66vqRUx2Zy4j3yHgYH40K0rZTPoIspeyVWPYRd0tMecP+f1k5Q9bUuqNx1zSjyagL2EO9RmhOQGcSDFmPgnt80Z0/d/gWBxoMvV4on0CTAfOWSQu1IjCStvVqyrNDMfp66FH0fsfstv+7nF0A8g5j0zbzd13P0XlKZNj7/jYPWmEUuEHB3N0qY+REVCx5zf6UHC9bJSfTYhqQJVoXjOj4chkKd3qtqDtxg4bjUYx1f/w5KBddhmjYtIRtHJpK6G7f9LeC61qT2KYq97z7NkMo5IQ+Tw0tNgWIGhl8IItlTM3SWorkAYD3hMH7+BgB",
35
+ "provider": "anthropic"
36
+ },
37
+ {
38
+ "type": "tool_use",
39
+ "complete": true,
40
+ "id": "toolu_vrtx_01RU6EfEWde4JqXQapf8kJLR",
41
+ "name": "Read",
42
+ "input": {
43
+ "path": "/home/runner/workspace/package.json"
44
+ }
45
+ },
46
+ {
47
+ "type": "tool_use",
48
+ "complete": true,
49
+ "id": "toolu_vrtx_012VSnoZ8AntvaCGaUeoXxhM",
50
+ "name": "Read",
51
+ "input": {
52
+ "path": "/home/runner/workspace/index.jsx"
53
+ }
54
+ },
55
+ {
56
+ "type": "tool_use",
57
+ "complete": true,
58
+ "id": "toolu_vrtx_01Cfs5aXEu5gE2ANDvNFdyGu",
59
+ "name": "Read",
60
+ "input": {
61
+ "path": "/home/runner/workspace/src"
62
+ }
63
+ }
64
+ ],
65
+ "state": {
66
+ "type": "complete",
67
+ "stopReason": "tool_use"
68
+ },
69
+ "usage": {
70
+ "model": "claude-opus-4-6",
71
+ "maxInputTokens": 168000,
72
+ "inputTokens": 3,
73
+ "outputTokens": 176,
74
+ "cacheCreationInputTokens": 1207,
75
+ "cacheReadInputTokens": 13127,
76
+ "totalInputTokens": 14337,
77
+ "timestamp": "2026-02-26T06:26:00.852Z"
78
+ }
79
+ },
80
+ {
81
+ "role": "user",
82
+ "messageId": 2,
83
+ "content": [
84
+ {
85
+ "type": "tool_result",
86
+ "toolUseID": "toolu_vrtx_01RU6EfEWde4JqXQapf8kJLR",
87
+ "run": {
88
+ "status": "done",
89
+ "progress": {},
90
+ "result": {
91
+ "absolutePath": "/home/runner/workspace/package.json",
92
+ "content": "1: {\n2: \"name\": \"apex-dev\",\n3: \"version\": \"2.1.3\",\n4: \"description\": \"Apex AI - a friendly agentic coding assistant for the terminal\",\n5: \"main\": \"index.jsx\",\n6: \"bin\": {\n7: \"apex\": \"./index.jsx\"\n8: },\n9: \"scripts\": {\n10: \"start\": \"bun index.jsx\",\n11: \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n12: },\n13: \"keywords\": [],\n14: \"author\": \"\",\n15: \"license\": \"ISC\",\n16: \"dependencies\": {\n17: \"@opentui/core\": \"^0.1.83\",\n18: \"@opentui/react\": \"^0.1.83\",\n19: \"@sourcegraph/amp\": \"^0.0.1772067340-g53cd9b\",\n20: \"openai\": \"^6.25.0\",\n21: \"opencode-ai\": \"1.2.14\",\n22: \"react\": \"^19.2.4\"\n23: }\n24: }"
93
+ },
94
+ "trackFiles": [
95
+ "file:///home/runner/workspace/package.json"
96
+ ]
97
+ }
98
+ },
99
+ {
100
+ "type": "tool_result",
101
+ "toolUseID": "toolu_vrtx_012VSnoZ8AntvaCGaUeoXxhM",
102
+ "run": {
103
+ "status": "done",
104
+ "progress": {},
105
+ "result": {
106
+ "absolutePath": "/home/runner/workspace/index.jsx",
107
+ "content": "1: #!/usr/bin/env bun\n2: import { createCliRenderer } from '@opentui/core';\n3: import { createRoot } from '@opentui/react';\n4: import { setRenderer } from './src/store.js';\n5: import App from './src/app.jsx';\n6: \n7: async function main() {\n8: const renderer = await createCliRenderer({\n9: useAlternateScreen: true,\n10: exitOnCtrlC: false,\n11: useMouse: true,\n12: });\n13: \n14: setRenderer(renderer);\n15: \n16: const root = createRoot(renderer);\n17: root.render(<App />);\n18: renderer.start();\n19: }\n20: \n21: main().catch(err => {\n22: console.error('Failed to start Apex:', err);\n23: process.exit(1);\n24: });"
108
+ },
109
+ "trackFiles": [
110
+ "file:///home/runner/workspace/index.jsx"
111
+ ]
112
+ }
113
+ },
114
+ {
115
+ "type": "tool_result",
116
+ "toolUseID": "toolu_vrtx_01Cfs5aXEu5gE2ANDvNFdyGu",
117
+ "run": {
118
+ "status": "done",
119
+ "progress": {},
120
+ "result": {
121
+ "absolutePath": "/home/runner/workspace/src",
122
+ "content": "components/\nhooks/\nagent.js\napp.jsx\ncommands.js\nconfig.js\nprompt.js\nstore.js\ntheme.js\nthinking.js\ntoolExecutors.js\ntools.js\nutils.js",
123
+ "isDirectory": true,
124
+ "directoryEntries": [
125
+ "components/",
126
+ "hooks/",
127
+ "agent.js",
128
+ "app.jsx",
129
+ "commands.js",
130
+ "config.js",
131
+ "prompt.js",
132
+ "store.js",
133
+ "theme.js",
134
+ "thinking.js",
135
+ "toolExecutors.js",
136
+ "tools.js",
137
+ "utils.js"
138
+ ]
139
+ },
140
+ "trackFiles": [
141
+ "file:///home/runner/workspace/src"
142
+ ]
143
+ }
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "role": "assistant",
149
+ "messageId": 3,
150
+ "content": [
151
+ {
152
+ "type": "tool_use",
153
+ "complete": true,
154
+ "id": "toolu_vrtx_011eAk26prVSdjRCouTDPK4s",
155
+ "name": "Bash",
156
+ "input": {
157
+ "cmd": "cd /home/runner/workspace && ls node_modules/.package-lock.json 2>/dev/null; ls node_modules/@opentui 2>/dev/null; ls node_modules/@sourcegraph 2>/dev/null"
158
+ }
159
+ }
160
+ ],
161
+ "state": {
162
+ "type": "complete",
163
+ "stopReason": "tool_use"
164
+ },
165
+ "usage": {
166
+ "model": "claude-opus-4-6",
167
+ "maxInputTokens": 168000,
168
+ "inputTokens": 1,
169
+ "outputTokens": 105,
170
+ "cacheCreationInputTokens": 977,
171
+ "cacheReadInputTokens": 14334,
172
+ "totalInputTokens": 15312,
173
+ "timestamp": "2026-02-26T06:26:03.777Z"
174
+ }
175
+ },
176
+ {
177
+ "role": "user",
178
+ "messageId": 4,
179
+ "content": [
180
+ {
181
+ "type": "tool_result",
182
+ "toolUseID": "toolu_vrtx_011eAk26prVSdjRCouTDPK4s",
183
+ "run": {
184
+ "status": "done",
185
+ "result": {
186
+ "output": "node_modules/.package-lock.json\ncore\ncore-linux-x64\nreact\namp\n",
187
+ "exitCode": 0
188
+ }
189
+ }
190
+ }
191
+ ]
192
+ },
193
+ {
194
+ "role": "assistant",
195
+ "messageId": 5,
196
+ "content": [
197
+ {
198
+ "type": "text",
199
+ "text": "Dependencies are installed. Let me try starting it:"
200
+ },
201
+ {
202
+ "type": "tool_use",
203
+ "complete": true,
204
+ "id": "toolu_vrtx_01N868mKfgjLyRudP6YtctZq",
205
+ "name": "Bash",
206
+ "input": {
207
+ "cmd": "timeout 5 bun index.jsx 2>&1 || true",
208
+ "cwd": "/home/runner/workspace"
209
+ }
210
+ }
211
+ ],
212
+ "state": {
213
+ "type": "complete",
214
+ "stopReason": "tool_use"
215
+ },
216
+ "usage": {
217
+ "model": "claude-opus-4-6",
218
+ "maxInputTokens": 168000,
219
+ "inputTokens": 1,
220
+ "outputTokens": 86,
221
+ "cacheCreationInputTokens": 2338,
222
+ "cacheReadInputTokens": 13127,
223
+ "totalInputTokens": 15466,
224
+ "timestamp": "2026-02-26T06:26:07.693Z"
225
+ },
226
+ "originalToolUseInput": {
227
+ "toolu_vrtx_01N868mKfgjLyRudP6YtctZq": {
228
+ "cmd": "cd /home/runner/workspace && timeout 5 bun index.jsx 2>&1 || true"
229
+ }
230
+ }
231
+ },
232
+ {
233
+ "role": "user",
234
+ "messageId": 6,
235
+ "content": [
236
+ {
237
+ "type": "tool_result",
238
+ "toolUseID": "toolu_vrtx_01N868mKfgjLyRudP6YtctZq",
239
+ "run": {
240
+ "status": "done",
241
+ "result": {
242
+ "output": "",
243
+ "exitCode": 0
244
+ }
245
+ }
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "role": "assistant",
251
+ "messageId": 7,
252
+ "content": [
253
+ {
254
+ "type": "thinking",
255
+ "thinking": "The command ran and exited with code 0 after timeout, with no error output. That means it started successfully. The fact that there's no output is expected since it uses an alternate screen (TUI). Let me verify it didn't crash by checking if there's any stderr output or crash.",
256
+ "signature": "EsADCkgICxACGAIqQEvso69QE1oqZdULV3yrPz/vxpYuayCFFUW1+EOwYSuMX6MWOjxtmy3HXaoS+5tkjAe2KzkN8J3m/+c9Md5QKSwSDIDZF3sWE5ek0Gk13RoMlJf2j4Fcz5WRAV2aIjC6bMcUkX8hck9yIFg5YFuKwnZk6wVDlT049AhsOmQHUsun1SFJPNVl+NiUj5h266EqpQJsuLhJfLpcKV5yaB8rZX7saCtLLYf8R5mScGMNC8Ic7lAzjP9RT0X5mpxBNUROATbx4+BhqwZRgnk2vubY5YQQIFB/jViNsR/xRYYA5WpwTbUyn+A2k+pW+BHukZ50bYyJZas6YFqWmtBnbl0veIghcpDp1/CTQIm1pbor33HTc+Ft96OHqRFnNnHzl9zzXCJcy+pmCrAFdENfM9Nt6B19d/EGPYLbrzh3aUaX9T6hWICJjI1Xgq9if0DC4U6fRt/l8hhG1BCDxVao8MfDM80E+rMaG+ktxgRNkFqqfKGvZ0HRvE1h+Xnfvd4m7E971f21KVdK7gzsUmbR166VdlfVLly9k8VB17tkYSKHCMb6M/Y9yrbfI7D9r1wC1qWpK4NGHb/bphgB",
257
+ "provider": "anthropic"
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "The CLI tool starts successfully — it launched without errors and ran until the 5-second timeout (expected for a TUI app using alternate screen). No crashes or missing dependencies."
262
+ }
263
+ ],
264
+ "state": {
265
+ "type": "complete",
266
+ "stopReason": "end_turn"
267
+ },
268
+ "usage": {
269
+ "model": "claude-opus-4-6",
270
+ "maxInputTokens": 168000,
271
+ "inputTokens": 1,
272
+ "outputTokens": 116,
273
+ "cacheCreationInputTokens": 280,
274
+ "cacheReadInputTokens": 15311,
275
+ "totalInputTokens": 15592,
276
+ "timestamp": "2026-02-26T06:26:18.422Z"
277
+ },
278
+ "turnElapsedMs": 21413
279
+ }
280
+ ],
281
+ "agentMode": "smart",
282
+ "nextMessageId": 8,
283
+ "meta": {
284
+ "traces": [
285
+ {
286
+ "name": "agent",
287
+ "id": "w8bD7",
288
+ "startTime": "2026-02-26T06:25:57.010Z",
289
+ "context": {
290
+ "messageId": 0
291
+ },
292
+ "endTime": "2026-02-26T06:26:18.424Z"
293
+ },
294
+ {
295
+ "name": "inference",
296
+ "id": "oL4IU",
297
+ "parent": "w8bD7",
298
+ "startTime": "2026-02-26T06:25:57.012Z",
299
+ "context": {
300
+ "messageId": 0
301
+ },
302
+ "endTime": "2026-02-26T06:26:00.854Z"
303
+ },
304
+ {
305
+ "name": "tools",
306
+ "id": "lDWUY",
307
+ "parent": "w8bD7",
308
+ "startTime": "2026-02-26T06:26:00.853Z",
309
+ "context": {
310
+ "messageId": 1
311
+ },
312
+ "endTime": "2026-02-26T06:26:00.885Z"
313
+ },
314
+ {
315
+ "name": "inference",
316
+ "id": "yyjrq",
317
+ "parent": "w8bD7",
318
+ "startTime": "2026-02-26T06:26:00.885Z",
319
+ "context": {
320
+ "messageId": 0
321
+ },
322
+ "endTime": "2026-02-26T06:26:03.778Z"
323
+ },
324
+ {
325
+ "name": "tools",
326
+ "id": "XRC1N",
327
+ "parent": "w8bD7",
328
+ "startTime": "2026-02-26T06:26:03.778Z",
329
+ "context": {
330
+ "messageId": 3
331
+ },
332
+ "endTime": "2026-02-26T06:26:03.859Z"
333
+ },
334
+ {
335
+ "name": "inference",
336
+ "id": "p3fDx",
337
+ "parent": "w8bD7",
338
+ "startTime": "2026-02-26T06:26:03.860Z",
339
+ "context": {
340
+ "messageId": 0
341
+ },
342
+ "endTime": "2026-02-26T06:26:07.693Z"
343
+ },
344
+ {
345
+ "name": "tools",
346
+ "id": "8udtU",
347
+ "parent": "w8bD7",
348
+ "startTime": "2026-02-26T06:26:07.693Z",
349
+ "context": {
350
+ "messageId": 5
351
+ },
352
+ "endTime": "2026-02-26T06:26:12.778Z"
353
+ },
354
+ {
355
+ "name": "inference",
356
+ "id": "EoG7K",
357
+ "parent": "w8bD7",
358
+ "startTime": "2026-02-26T06:26:12.779Z",
359
+ "context": {
360
+ "messageId": 0
361
+ },
362
+ "endTime": "2026-02-26T06:26:18.424Z"
363
+ }
364
+ ]
365
+ },
366
+ "env": {
367
+ "initial": {
368
+ "trees": [
369
+ {
370
+ "displayName": "workspace",
371
+ "uri": "file:///home/runner/workspace"
372
+ }
373
+ ],
374
+ "platform": {
375
+ "os": "linux",
376
+ "osVersion": "Ubuntu 24.04.2 LTS",
377
+ "cpuArchitecture": "x64",
378
+ "webBrowser": false,
379
+ "client": "CLI",
380
+ "clientVersion": "0.0.1772067340-g53cd9b",
381
+ "clientType": "cli",
382
+ "installationID": "990855e2-5987-4061-ad34-8c29deacfa95",
383
+ "deviceFingerprint": "v1:fp_5e0b4aaea6d8b2adcf3c155505cf5c39765fb8ea3e8157ac186424d91df98615"
384
+ },
385
+ "tags": [
386
+ "model:claude-opus-4-6"
387
+ ]
388
+ }
389
+ },
390
+ "title": "Ensure CLI tool starts",
391
+ "~debug": {
392
+ "lastInferenceUsage": {
393
+ "model": "claude-opus-4-6",
394
+ "maxInputTokens": 168000,
395
+ "inputTokens": 3,
396
+ "outputTokens": 176,
397
+ "cacheCreationInputTokens": 2338,
398
+ "cacheReadInputTokens": 15311,
399
+ "totalInputTokens": 15592,
400
+ "timestamp": "2026-02-26T06:26:18.422Z"
401
+ }
402
+ }
403
+ }