Commit 799871a
Add --stream and --no-stream flags to run command and connect bridge emitter
Problem:
- Bridge emitter was created but never connected to orchestrator
- Conversations were not actually streaming to AgentPipe Web
- No way to override bridge config on a per-run basis
Solution:
- Added --stream flag to enable streaming for a run (overrides config)
- Added --no-stream flag to disable streaming for a run (overrides config)
- Actually create and connect bridge emitter in run command
- Load bridge config and create emitter with proper version
- Set emitter on orchestrator before starting conversation
- Priority: --no-stream > --stream > config file setting
Implementation:
- Added streamEnabled and noStream bool flags
- Created determineShouldStream() helper function
- Load bridge config if streaming should be enabled
- Create bridge.NewEmitter() with AgentPipe version
- Call orchestrator.SetBridgeEmitter() to connect it
- Added imports for internal/bridge and internal/version
Testing:
- All tests pass with race detector
- --stream and --no-stream flags appear in help
- Bridge events now actually get sent to web API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 5b2abe9 commit 799871a
1 file changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
344 | 350 | | |
345 | 351 | | |
346 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
347 | 372 | | |
348 | 373 | | |
349 | 374 | | |
| |||
495 | 520 | | |
496 | 521 | | |
497 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
0 commit comments