Commit d15f236
committed
fix(ai): add OpenCode agent support with correct CLI configuration
Update AI runner to support OpenCode agent with proper configuration and JSON parsing:
- Configure OpenCode with correct CLI syntax: ['run', '--format', 'json']
- Add markdown-wrapped JSON parsing via parseStringResult helper
- Handle multiple response formats: raw JSON, markdown-wrapped JSON, plain text
- Refactor parseOpenCodeNDJSON with functional .reduce() pattern
- Replace plain Error with structured createError() for rich error metadata
- Maintain backward compatibility with Claude and Cursor agents
- Update dependencies (npm install)
- Update tests to verify OpenCode configuration, parsing, and error handling
- Archive completed OpenCode agent task documentation
- Update plan.md to reflect OpenCode support status
Tested with OpenCode v1.1.50 CLI. All 184 tests passing (78 main suite + 103 Vitest + 3 bin tests).1 parent 742a9fc commit d15f236
File tree
7 files changed
+590
-28
lines changed- bin
- source
- tasks/archive/2026-01-22-riteway-ai-testing-framework
7 files changed
+590
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
412 | 419 | | |
413 | 420 | | |
414 | | - | |
| 421 | + | |
| 422 | + | |
415 | 423 | | |
416 | 424 | | |
417 | 425 | | |
418 | 426 | | |
419 | 427 | | |
420 | | - | |
421 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
422 | 437 | | |
423 | 438 | | |
424 | | - | |
| 439 | + | |
| 440 | + | |
425 | 441 | | |
426 | 442 | | |
427 | 443 | | |
428 | 444 | | |
429 | 445 | | |
430 | 446 | | |
431 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
432 | 455 | | |
433 | 456 | | |
434 | | - | |
| 457 | + | |
| 458 | + | |
435 | 459 | | |
436 | 460 | | |
437 | 461 | | |
438 | 462 | | |
439 | 463 | | |
440 | 464 | | |
441 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
442 | 473 | | |
443 | 474 | | |
444 | | - | |
| 475 | + | |
| 476 | + | |
445 | 477 | | |
446 | 478 | | |
447 | 479 | | |
448 | 480 | | |
449 | 481 | | |
450 | | - | |
451 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
452 | 491 | | |
453 | 492 | | |
454 | | - | |
| 493 | + | |
| 494 | + | |
455 | 495 | | |
456 | 496 | | |
457 | 497 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 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 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
73 | 115 | | |
74 | 116 | | |
75 | 117 | | |
| |||
160 | 202 | | |
161 | 203 | | |
162 | 204 | | |
| 205 | + | |
163 | 206 | | |
164 | 207 | | |
165 | 208 | | |
| |||
169 | 212 | | |
170 | 213 | | |
171 | 214 | | |
172 | | - | |
| 215 | + | |
173 | 216 | | |
174 | 217 | | |
175 | 218 | | |
| |||
225 | 268 | | |
226 | 269 | | |
227 | 270 | | |
228 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
229 | 282 | | |
230 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
231 | 286 | | |
| 287 | + | |
232 | 288 | | |
233 | 289 | | |
234 | 290 | | |
| |||
244 | 300 | | |
245 | 301 | | |
246 | 302 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
252 | 312 | | |
253 | 313 | | |
254 | 314 | | |
| |||
0 commit comments