Skip to content

Commit ad12c36

Browse files
kevinelliottclaude
andcommitted
release: v0.6.0 - Complete JSON-Only Output Mode
This minor release consolidates and supersedes v0.5.3, v0.5.4, and v0.5.5, delivering a complete, production-ready JSON-only output mode. Key Features: - Pure JSONL stream from the very first line when using --json flag - ALL output (logs, messages, events, diagnostics) as JSON to stdout - Two event types: conversation events + log.entry events - Perfect for log aggregators, monitoring tools, CI/CD, automation Highlights: ✅ Pure JSON from line 1 (no console format logs) ✅ Real-time streaming ✅ Complete conversation replay from JSON alone ✅ Easy piping to jq, log aggregators, monitoring tools ✅ CI/CD friendly ✅ No breaking changes - opt-in via --json flag Also Fixed: - Qoder install/upgrade commands (exit status 127 error) - Pure JSON output initialization moved to root.go:initConfig() Technical: - New event type: log.entry with LogEntryData and LogEntryMetrics - New module: internal/bridge/zerolog_json_writer.go - New module: internal/bridge/stdout_emitter.go - New interface: BridgeEmitter for HTTP and stdout emitters - Updated: cmd/root.go, cmd/run.go, pkg/logger/logger.go Quality Checks: ✅ go test -v -race ./... (all tests pass) ✅ go build -o agentpipe . Migration Notes: - This release consolidates v0.5.3, v0.5.4, and v0.5.5 - No breaking changes - All existing functionality unchanged 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent c53f418 commit ad12c36

File tree

1 file changed

+71
-3
lines changed

1 file changed

+71
-3
lines changed

CHANGELOG.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.6.0] - 2025-10-26
11+
12+
### Added
13+
- **Complete JSON-Only Output Mode (`--json` flag)**
14+
- Pure JSONL stream - every line is a valid JSON object from the very first line
15+
- ALL output (logs, messages, events, diagnostics) emitted as JSON to stdout
16+
- Includes agent messages, system messages, diagnostic logs, and metadata
17+
- Two event types:
18+
- Conversation events: `bridge.connected`, `conversation.started`, `message.created`, `conversation.completed`
19+
- Log events: `log.entry` for all messages and diagnostic logs
20+
- Enables complete conversation replay and analysis from JSON stream alone
21+
- Perfect for log aggregators, monitoring tools, CI/CD pipelines, and automation
22+
- Usage: `agentpipe run --json -a gemini:Bot --prompt "test" | jq`
23+
- Benefits:
24+
- ✅ Real-time streaming (see events as they happen)
25+
- ✅ Pure JSON from line 1 (no console format logs)
26+
- ✅ Easy to pipe to `jq`, log aggregators, monitoring tools
27+
- ✅ CI/CD friendly
28+
- ✅ No breaking changes - opt-in via flag
29+
30+
- **Diagnostic Logs as JSON Events**
31+
- All zerolog diagnostic logs (INF, WRN, ERR, DBG) emitted as `log.entry` events with `role: "diagnostic"`
32+
- Includes metadata from log fields (agent_id, duration, tokens, etc.)
33+
- Clean separation: `role: "diagnostic"` for system logs vs `role: "agent"/"system"/"user"` for chat messages
34+
1035
### Fixed
36+
- **Pure JSON output from first line**
37+
- Fixed issue where initial config log appeared as console format instead of JSON
38+
- Moved JSON emitter initialization to `cmd/root.go:initConfig()` (before any log calls)
39+
- Global `stdoutEmitter` shared across root and run commands
40+
- No more mixed console/JSON output
41+
1142
- **Qoder install/upgrade commands**
1243
- Fixed exit status 127 error when running `agentpipe agents install qoder` or `agentpipe agents upgrade qoder`
1344
- Changed from `bash --` to `bash -s --` in install/upgrade commands for proper stdin handling
1445
- Updated commands: `curl -fsSL https://qoder.com/install | bash -s -- --force`
1546
- Added test to verify bash command format in agent registry
1647
- Fixes #26
1748

18-
## [0.5.5] - 2025-10-26
49+
### Technical Details
50+
- **New Event Type**: `log.entry` in `internal/bridge/events.go`
51+
- `LogEntryData` struct with level, agent info, content, role, metadata, and metrics
52+
- `LogEntryMetrics` struct for duration, tokens, cost
53+
- Supports both chat messages and diagnostic logs in unified format
54+
- **New Module**: `internal/bridge/zerolog_json_writer.go`
55+
- Custom zerolog writer that parses zerolog JSON output
56+
- Emits diagnostic logs as `log.entry` events to stdout
57+
- Extracts level, message, and metadata from zerolog fields
58+
- **New Module**: `internal/bridge/stdout_emitter.go`
59+
- Implements `BridgeEmitter` interface for stdout JSON output
60+
- Uses same event schemas as HTTP bridge emitter
61+
- Added `EmitLogEntry()` method for log event emission
62+
- **New Interface**: `internal/bridge/interface.go`
63+
- `BridgeEmitter` interface allows both HTTP and stdout emitters
64+
- **Updated**: `cmd/root.go`
65+
- Added `globalJSONEmitter` package variable to share emitter across commands
66+
- Modified `initConfig()` to detect `--json` flag and initialize JSON emitter immediately
67+
- Zerolog initialized with `ZerologJSONWriter` before any log calls in JSON mode
68+
- **Updated**: `cmd/run.go`
69+
- Added `--json` flag
70+
- Suppresses UI output when `--json` is set
71+
- Uses `globalJSONEmitter` from root
72+
- Set JSON emitter on logger when `--json` flag is used
73+
- Passes `nil` writers to logger and orchestrator in JSON mode
74+
- **Updated**: `pkg/logger/logger.go`
75+
- Added `jsonEmitter` field to `ChatLogger`
76+
- Added `SetJSONEmitter()` method
77+
- Modified `LogMessage()`, `LogError()`, and `LogSystem()` to emit JSON events when JSON emitter is set
78+
- **Updated**: `pkg/orchestrator/orchestrator.go`
79+
- Changed `bridgeEmitter` field to use `BridgeEmitter` interface
80+
81+
### Migration Notes
82+
- This release consolidates and supersedes v0.5.3, v0.5.4, and v0.5.5
83+
- No breaking changes - `--json` flag is opt-in
84+
- All existing functionality remains unchanged
85+
86+
## [0.5.5] - 2025-10-26 (superseded by v0.6.0)
1987

2088
### Fixed
2189
- **Pure JSON output from first line**
@@ -35,7 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
35103
- Removed duplicate emitter creation (now created once in `initConfig`)
36104
- Passes shared emitter to orchestrator and chat logger
37105

38-
## [0.5.4] - 2025-01-26
106+
## [0.5.4] - 2025-01-26 (superseded by v0.6.0)
39107

40108
### Added
41109
- **Complete JSON-only output mode**
@@ -75,7 +143,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
75143
- Reinitialize zerolog with `ZerologJSONWriter` for diagnostic log conversion
76144
- Ensures all output becomes JSON events
77145

78-
## [0.5.3] - 2025-01-26
146+
## [0.5.3] - 2025-01-26 (superseded by v0.6.0)
79147

80148
### Added
81149
- **JSON-only output format (`--json` flag)**

0 commit comments

Comments
 (0)