Files
Codewalkers/apps/server/test/integration/real-providers/sample-outputs
Lukas May 34578d39c6 refactor: Restructure monorepo to apps/server/ and apps/web/ layout
Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt
standard monorepo conventions (apps/ for runnable apps, packages/
for reusable libraries). Update all config files, shared package
imports, test fixtures, and documentation to reflect new paths.

Key fixes:
- Update workspace config to ["apps/*", "packages/*"]
- Update tsconfig.json rootDir/include for apps/server/
- Add apps/web/** to vitest exclude list
- Update drizzle.config.ts schema path
- Fix ensure-schema.ts migration path detection (3 levels up in dev,
  2 levels up in dist)
- Fix tests/integration/cli-server.test.ts import paths
- Update packages/shared imports to apps/server/ paths
- Update all docs/ files with new paths
2026-03-03 11:22:53 +01:00
..

Sample CLI Outputs

This directory contains captured real CLI outputs for use in parser unit tests. These files allow testing stream parsers without incurring API costs.

Files

claude-stream-success.jsonl

A successful Claude CLI session (v2.1.33) that:

  • Initializes with system event containing session_id
  • Emits assistant message with content
  • Completes with result event containing done status JSON

claude-stream-questions.jsonl

A Claude CLI session that:

  • Initializes with system event containing session_id
  • Emits assistant message with content wrapped in markdown code block
  • Completes with result event containing questions status JSON

codex-stream-success.jsonl

A successful Codex CLI session (v0.98.0) that:

  • Starts with thread.started event containing thread_id
  • Emits turn.started, item.completed events
  • Completes with turn.completed event containing usage stats

Event Type Differences

Claude CLI (--output-format stream-json)

  • system (subtype: init) - Contains session_id, tools, model info
  • assistant - Contains message content in content[].text
  • result - Contains final result text and total_cost_usd

Codex CLI (--json)

  • thread.started - Contains thread_id (equivalent to session_id)
  • turn.started - Marks beginning of turn
  • item.completed - Contains reasoning or agent_message items
  • turn.completed - Contains usage stats

Usage

These files can be used to test stream parsers in isolation:

import { readFileSync } from 'fs';
import { ClaudeStreamParser } from '../../../agent/providers/parsers/claude.js';

const output = readFileSync('sample-outputs/claude-stream-success.jsonl', 'utf-8');
const parser = new ClaudeStreamParser();

for (const line of output.split('\n')) {
  if (line.trim()) {
    const events = parser.parseLine(line);
    // Assert on events...
  }
}

Capturing New Outputs

Claude

claude -p "your prompt" --output-format stream-json --verbose > output.jsonl

Codex

codex exec --full-auto --json "your prompt" > output.jsonl