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
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
systemevent containingsession_id - Emits
assistantmessage with content - Completes with
resultevent containingdonestatus JSON
claude-stream-questions.jsonl
A Claude CLI session that:
- Initializes with
systemevent containingsession_id - Emits
assistantmessage with content wrapped in markdown code block - Completes with
resultevent containingquestionsstatus JSON
codex-stream-success.jsonl
A successful Codex CLI session (v0.98.0) that:
- Starts with
thread.startedevent containingthread_id - Emits
turn.started,item.completedevents - Completes with
turn.completedevent containing usage stats
Event Type Differences
Claude CLI (--output-format stream-json)
system(subtype:init) - Containssession_id, tools, model infoassistant- Contains message content incontent[].textresult- Contains finalresulttext andtotal_cost_usd
Codex CLI (--json)
thread.started- Containsthread_id(equivalent to session_id)turn.started- Marks beginning of turnitem.completed- Contains reasoning or agent_message itemsturn.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