{"_id":"@agent-io/stream","_rev":"8-b6603765287428b5e01eb5af67682591","name":"@agent-io/stream","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@agent-io/stream","version":"0.1.0","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.0","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"agent-stream-fmt":"dist/cli.js"},"dist":{"shasum":"bbda4992e8721a0384767f07548614b44dca34ed","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.0.tgz","fileCount":43,"integrity":"sha512-fzMyZu4w6p2q2+y8mjM6zgnljS/5qI2u7b9wbw9SMBIyUiQvc0zcbK5fl41l7Vpw6xROPwb/bZprqDeZlgGIrQ==","signatures":[{"sig":"MEUCIQCwBNs6/GcVkZbUr2GSENdcNGwuUc/CxhwtJAAPZCZ5kgIgG0Z96aogO8N9FhbteoYizzyO5bMaIuvEiFgMdsEwsbM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1042554},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"7e8152ba52c777d1943bdd30b27b75054ad67866","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run tests/performance-benchmarks.test.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"11.3.0","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"24.2.0","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.0_1753047127036_0.7042370106603697","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-io/stream","version":"0.1.1","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.1","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"aio-stream":"dist/cli.js"},"dist":{"shasum":"0c7296333bd5fc16416e4d96832760d6fdd9c4bc","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.1.tgz","fileCount":17,"integrity":"sha512-gqC0TLv1plyuYSXrFZMojBkEXOtl5gkrSCoZ5RlWFeJGX3iqiehLgh1R5W/CtDoghzJlIAEQc6GNlS+bRJOEpQ==","signatures":[{"sig":"MEUCIEdAVP3unUUgBl6v9Jdfd7r/jLc+vGghZFxF/ifjRKVbAiEAtUNObCbRwX/j1t6sWDq8UU2h47YQrEMI/G1CECdJRb8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":894308},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"5c51fa7c2a9550380b8c80d9776fccd2a006640f","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"10.8.2","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"20.19.3","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.1_1753119485559_0.13499522533879094","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agent-io/stream","version":"0.1.2","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.2","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"aio-stream":"dist/cli.js"},"dist":{"shasum":"52c5dd9bd8055203a028ddb9abf25ebf0a426c68","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.2.tgz","fileCount":17,"integrity":"sha512-KPNIN9Vaz2OAO2ojKrPXhzQPS0ukHZQEr5lFAM/uPUOXOQD6z1lIjKsTOAXylcT5CarrssdADJte09XkoMSMOg==","signatures":[{"sig":"MEQCIBRW2Y+QRt2KkpTDF1R9YoRsMr6UgJwecCF+ZO1nGOtVAiAmHukZ6HtmwTB5kmY6HyrMNjGtsnNc0j4quNAub50xZg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":935090},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"126843c8d697a8aca666c60e5e9e5185d8ad047b","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"10.8.2","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"20.19.3","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.2_1753127023437_0.19410550722185405","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@agent-io/stream","version":"0.1.3","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.3","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"aio-stream":"dist/cli.js"},"dist":{"shasum":"f0546c2a766d499c58f1b344592d2b728365e249","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.3.tgz","fileCount":17,"integrity":"sha512-4FjzLSkfhWE1l+LRw0ASuvoq1KtXHRrQta5buHhTTi9QaCgzhlu8Ksso0IWTgQuBVTuyFnCX/1j0O0C5bsGK6Q==","signatures":[{"sig":"MEYCIQDX5SJzi/w/KyAyE3Cbo6CwtDJpjqEVYZZLvPKhphHlMQIhANHCPr7WSGxBR4A8ADHEtrepUWcLU5AS/xGdpZEGY/AO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":918809},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"eccec19e05c0e69bffded90defd5659f5f33d4d4","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"10.8.2","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"20.19.3","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.3_1753216002097_0.36383827798160606","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@agent-io/stream","version":"0.1.4","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.4","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"aio-stream":"dist/cli.js"},"dist":{"shasum":"bc0125e514ad6723a6c82309a4ac7023e64f7dd5","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.4.tgz","fileCount":17,"integrity":"sha512-vBGDFdT499lOPIIWq4lRhM+T0QzItA8sP4qI6IyMgIhGVGZOHptSIiLjLtHuR4k1KjWGkGpYCFhhpVFyeQ7BMg==","signatures":[{"sig":"MEUCIQCxY4+sSNdU8QinAvQTpz5DpLvU0Fjmtjv2pJDnCYz3qwIgVLNG5Vb4lTPN5OEXPd2EVVmNcdp4gAIKYIS+GNx1qH8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":919576},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"02791f4a246b93f6ec082ee39325637064a15e8b","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"10.8.2","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"20.19.3","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.4_1753273005033_0.2732973945914883","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@agent-io/stream","version":"0.1.5","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.5","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"aio-stream":"dist/cli.cjs"},"dist":{"shasum":"ba834f1153900b138f8e310cd02051ea95d8f9c1","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.5.tgz","fileCount":17,"integrity":"sha512-j6FXmrkaSqabZtAHGoAmCwYcBdqZOuRInCVKrNTiTmypUeYj67ItishwP1jBvrlmTWJaXQwnAfDR6ZE05l+bbg==","signatures":[{"sig":"MEUCIQCTUUtABeRAbh97lm7TCRewAnbF070Q+Bhy+mpW8i4XdgIgRPzP8QfghQRR3YHkfFWgbz0tXSRRMYzp6qaW2chuf3I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":919669},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"2e81f18fa806711f335ab0c0a6f5380142e86998","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"10.8.2","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"20.19.4","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.5_1753305187293_0.5146952483559508","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@agent-io/stream","version":"0.1.6","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"url":"https://github.com/carlrannaberg","name":"Carl Rannaberg","email":"carl@rannaberg.com"},"license":"MIT","_id":"@agent-io/stream@0.1.6","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"bin":{"aio-stream":"dist/cli.cjs"},"dist":{"shasum":"a1c3e393f75eab00c456944d17e8889084af44ee","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.1.6.tgz","fileCount":17,"integrity":"sha512-2grcCdiwc3OY2RpD3n0mCMgISJwh9rJh7rjfRj+8z7bilXuidzJ3DZW/aPAPqKm/pggDyGkRImGu8RRzViOJUg==","signatures":[{"sig":"MEUCIEtqnEe/i6GodcjyUqP8oJnyEyWjuNxgjBKiQj1XSePGAiEAwPwyYmTQSnrxeCW7yXMVAPUjbAqUHEx3mfRUVoBWqec=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":928176},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"dcc56a0fdf26a7199b1a24d701537c7b2d4447a6","scripts":{"lint":"eslint src tests --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","lint:fix":"eslint src tests --ext .ts --fix","benchmark":"tsx benchmarks/throughput.ts","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:errors":"vitest run tests/error-handling.test.ts","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","benchmark:all":"./benchmarks/run-benchmarks.sh","test:coverage":"vitest --coverage --run","test:fixtures":"vitest run tests/fixture-validation.test.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark:throughput":"tsx benchmarks/throughput.ts"},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"repository":{"url":"git+https://github.com/carlrannaberg/agent-io.git","type":"git","directory":"packages/stream"},"_npmVersion":"11.3.0","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","directories":{},"_nodeVersion":"24.2.0","dependencies":{"kleur":"^4.1.5","commander":"^14.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stream_0.1.6_1753333899866_0.0348326929725542","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agent-io/stream","version":"0.2.0","description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"aio-stream":"dist/cli.cjs"},"scripts":{"build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","format:check":"prettier --check \"src/**/*.{ts,json}\" \"tests/**/*.{ts,json}\"","test":"vitest run","test:watch":"vitest --watch","test:coverage":"vitest --coverage --run","test:integration":"vitest run tests/comprehensive-integration.test.ts tests/registry-integration.test.ts","test:performance":"vitest run --config vitest.config.performance.ts","test:errors":"vitest run tests/error-handling.test.ts","test:fixtures":"vitest run tests/fixture-validation.test.ts","fixtures:capture":"tsx ../../scripts/capture-fixtures.ts","fixtures:analyze":"tsx ../../scripts/analyze-schemas.ts","fixtures:validate":"tsx ../../scripts/validate-fixtures.ts","benchmark":"tsx benchmarks/throughput.ts","benchmark:throughput":"tsx benchmarks/throughput.ts","benchmark:memory":"tsx --expose-gc benchmarks/memory.ts","benchmark:all":"./benchmarks/run-benchmarks.sh"},"keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"author":{"name":"Carl Rannaberg","email":"carl@rannaberg.com","url":"https://github.com/carlrannaberg"},"license":"MIT","homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","repository":{"type":"git","url":"git+https://github.com/carlrannaberg/agent-io.git","directory":"packages/stream"},"bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"commander":"^14.0.0","kleur":"^4.1.5"},"publishConfig":{"access":"public"},"_id":"@agent-io/stream@0.2.0","gitHead":"c70e7fa461cd53e6ac43e4717daff9b9593d72b0","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-OfY3L5FXODbEgq9dyJpNu1rB19ayYs/VjE1GLLEuMF4nO4bU4bW7PXomyMs56CcaPgkRt/ZhNIufpPOZwEW+Cw==","shasum":"107dc444f5961449b3ada5236e46b379bb5c2e15","tarball":"https://registry.npmjs.org/@agent-io/stream/-/stream-0.2.0.tgz","fileCount":3,"unpackedSize":19598,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC+u05KLsFiHmiTQ/B11HQoON8bjgRZTS+DwBfzLg29zAIhAPssNe5IRNWghmyZ6dcDbrWelNiyU7BVK+kl2zd6UfSE"}]},"_npmUser":{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"},"directories":{},"maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stream_0.2.0_1754765168104_0.5246201859326813"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-20T21:32:06.952Z","modified":"2025-08-09T18:46:08.555Z","0.1.0":"2025-07-20T21:32:07.248Z","0.1.1":"2025-07-21T17:38:05.849Z","0.1.2":"2025-07-21T19:43:43.724Z","0.1.3":"2025-07-22T20:26:42.326Z","0.1.4":"2025-07-23T12:16:45.241Z","0.1.5":"2025-07-23T21:13:07.657Z","0.1.6":"2025-07-24T05:11:40.065Z","0.2.0":"2025-08-09T18:46:08.340Z"},"bugs":{"url":"https://github.com/carlrannaberg/agent-io/issues"},"author":{"name":"Carl Rannaberg","email":"carl@rannaberg.com","url":"https://github.com/carlrannaberg"},"license":"MIT","homepage":"https://github.com/carlrannaberg/agent-io/tree/main/packages/stream#readme","keywords":["agent-io","stream","formatter","cli","agent","ai","jsonl","claude","gemini","amp","terminal","ansi","html"],"repository":{"type":"git","url":"git+https://github.com/carlrannaberg/agent-io.git","directory":"packages/stream"},"description":"Universal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output","maintainers":[{"name":"carlrannaberg","email":"carlrannaberg@gmail.com"}],"readme":"# @agent-io/stream\n\nUniversal JSONL formatter for AI agent CLIs with beautiful terminal and HTML output.\n\n## Installation\n\n```bash\nnpm install @agent-io/stream\n# or\nyarn add @agent-io/stream\n# or\npnpm add @agent-io/stream\n```\n\n## Usage\n\n### CLI Usage\n\nThe `aio-stream` command processes output from AI agent CLIs (JSONL for Claude/Amp/Cursor, plain\ntext for Gemini):\n\n```bash\n# Auto-detect vendor and format for terminal\nclaude --output-format stream-json --verbose -p \"explain recursion\" | aio-stream\n\n# Explicit vendor with options (Gemini outputs plain text, not JSONL)\ngemini -p \"explain recursion\" | aio-stream --vendor gemini\n\n# Process Amp output\necho \"explain recursion\" | amp | aio-stream --vendor amp\n\n# Process Cursor Agent output with streaming JSONL\ncursor-agent -p \"explain recursion\" --output-format=stream-json | aio-stream\n\n# Filter specific event types\ncat session.jsonl | aio-stream --only tool,error --collapse-tools\n```\n\n#### Advanced Usage\n\n```bash\n# Generate HTML report\nclaude --output-format stream-json --verbose -p \"build a web app\" | aio-stream --html > report.html\n\n# Hide tool execution output\ngemini -p \"analyze this code\" | aio-stream --vendor gemini --hide-tools\n\n# Collapse tool output sections\necho \"run all tests\" | amp | aio-stream --vendor amp --collapse-tools\n\n# Show only specific event types\ncat debug-session.jsonl | aio-stream --only msg,error\n\n# Output to file instead of stdout\nclaude --output-format stream-json -p \"explain quantum computing\" | aio-stream -o output.txt\n```\n\n#### CLI Options\n\n```bash\nOptions:\n  -v, --vendor <type>     Vendor: auto|claude|gemini|amp|cursor (default: auto)\n  -f, --format <type>     Format: ansi|html|json (default: ansi)\n  --collapse-tools        Collapse tool output sections\n  --hide-tools           Hide tool execution entirely\n  --hide-cost            Hide cost information\n  --hide-debug           Hide debug events\n  --only <types>         Show only specific event types\n  -o, --output <file>    Output file (default: stdout)\n  --html                 Shorthand for --format html\n  --json                 Shorthand for --format json\n  -h, --help             Display help\n  -V, --version          Output the version number\n```\n\n### Programmatic API\n\n#### Basic Streaming\n\n```typescript\nimport { streamEvents } from '@agent-io/stream';\nimport { createReadStream } from 'fs';\n\n// Stream events from a file\nconst source = createReadStream('session.jsonl');\nfor await (const event of streamEvents({ vendor: 'claude', source })) {\n  console.log(event);\n}\n```\n\n#### Auto-Detection\n\n```typescript\nimport { streamEvents } from '@agent-io/stream';\n\n// Automatically detect vendor format\nfor await (const event of streamEvents({\n  vendor: 'auto',\n  source: process.stdin,\n})) {\n  switch (event.t) {\n    case 'msg':\n      console.log(`${event.role}: ${event.text}`);\n      break;\n    case 'tool':\n      console.log(`Tool ${event.name}: ${event.phase}`);\n      break;\n    case 'error':\n      console.error(`Error: ${event.message}`);\n      break;\n  }\n}\n```\n\n#### Formatted Output\n\n```typescript\nimport { streamFormat } from '@agent-io/stream';\n\n// Stream formatted ANSI output\nfor await (const output of streamFormat({\n  vendor: 'claude',\n  source: process.stdin,\n  format: 'ansi',\n  collapseTools: true,\n})) {\n  process.stdout.write(output);\n}\n```\n\n#### Collecting Events\n\n```typescript\nimport { collectEvents } from '@agent-io/stream';\n\n// Collect all events into an array\nconst events = await collectEvents({\n  vendor: 'gemini',\n  source: inputStream,\n});\n\nconsole.log(`Processed ${events.length} events`);\n```\n\n## API Reference\n\n### Core Functions\n\n#### `streamEvents(options: StreamOptions): AsyncGenerator<AgentEvent>`\n\nStream and parse JSONL input into normalized agent events.\n\n**Options:**\n\n- `vendor: Vendor` - Vendor format ('auto', 'claude', 'gemini', 'amp', 'cursor')\n- `source: ReadableStream` - Input stream containing JSONL data\n- `continueOnError?: boolean` - Continue parsing after errors (default: true)\n- `emitDebugEvents?: boolean` - Emit debug events for unknown formats (default: false)\n- `maxConsecutiveErrors?: number` - Stop after this many consecutive errors (default: 100)\n- `lineReaderOptions?: object` - Options for line reading\n  - `maxLineLength?: number` - Maximum line length (default: 1MB)\n  - `encoding?: string` - Text encoding (default: 'utf8')\n\n#### `streamFormat(options: StreamFormatOptions): AsyncGenerator<string>`\n\nStream formatted output with rendering applied.\n\n**Options:**\n\n- All `StreamOptions` plus:\n- `format: 'ansi' | 'html' | 'json'` - Output format\n- `collapseTools?: boolean` - Collapse tool output sections\n- `hideTools?: boolean` - Hide tool execution entirely\n- `hideCost?: boolean` - Hide cost information\n- `hideDebug?: boolean` - Hide debug events\n- `showTimestamps?: boolean` - Show event timestamps\n- `compactMode?: boolean` - Minimal formatting\n- `colorDisabled?: boolean` - Disable ANSI colors\n\n#### `collectEvents(options: StreamOptions): Promise<AgentEvent[]>`\n\nCollect all events from a stream into an array.\n\n### Event Types\n\n```typescript\ntype AgentEvent = MessageEvent | ToolEvent | CostEvent | ErrorEvent | DebugEvent;\n\ninterface MessageEvent {\n  t: 'msg';\n  role: 'user' | 'assistant' | 'system';\n  text: string;\n  timestamp?: number;\n}\n\ninterface ToolEvent {\n  t: 'tool';\n  name: string;\n  phase: 'start' | 'stdout' | 'stderr' | 'end';\n  text?: string;\n  exitCode?: number;\n}\n\ninterface CostEvent {\n  t: 'cost';\n  deltaUsd: number;\n}\n\ninterface ErrorEvent {\n  t: 'error';\n  message: string;\n}\n\ninterface DebugEvent {\n  t: 'debug';\n  raw: unknown;\n}\n```\n\n### Rendering\n\n#### Creating Renderers\n\n```typescript\nimport { createRenderer, AnsiRenderer, HtmlRenderer } from '@agent-io/stream';\n\n// Create a renderer with options\nconst renderer = createRenderer({\n  format: 'ansi',\n  collapseTools: true,\n  showTimestamps: true,\n});\n\n// Render events\nconst output = renderer.render(event);\n```\n\n#### Custom Renderers\n\n```typescript\nimport { Renderer, AgentEvent } from '@agent-io/stream';\n\nclass CustomRenderer implements Renderer {\n  render(event: AgentEvent): string {\n    // Custom rendering logic\n    return `[${event.t}] ${JSON.stringify(event)}`;\n  }\n\n  renderBatch(events: AgentEvent[]): string {\n    return events.map(e => this.render(e)).join('\\n');\n  }\n\n  flush(): string {\n    return ''; // Any final output\n  }\n}\n```\n\n### Parser Registry\n\n#### Adding Custom Parsers\n\n```typescript\nimport { registry, VendorParser } from '@agent-io/stream';\n\nconst myParser: VendorParser = {\n  vendor: 'mycli',\n\n  detect: (line: string) => {\n    try {\n      const obj = JSON.parse(line);\n      return obj.source === 'mycli';\n    } catch {\n      return false;\n    }\n  },\n\n  parse: (line: string) => {\n    const obj = JSON.parse(line);\n    if (obj.type === 'message') {\n      return [{ t: 'msg', role: obj.role, text: obj.content }];\n    }\n    return [];\n  },\n};\n\n// Register with priority (higher = tried first in auto-detection)\nregistry.register(myParser, 100);\n```\n\n## Error Handling\n\n### Parse Errors\n\n```typescript\nimport { streamEvents, ParseError } from '@agent-io/stream';\n\ntry {\n  for await (const event of streamEvents({ vendor: 'claude', source })) {\n    if (event.t === 'error') {\n      console.error(`Parse error: ${event.message}`);\n    } else {\n      processEvent(event);\n    }\n  }\n} catch (error) {\n  if (error instanceof ParseError) {\n    console.error(`Fatal parse error in ${error.vendor}:`, error.message);\n    console.error(`Line: ${error.line}`);\n    if (error.context?.lineNumber) {\n      console.error(`Line number: ${error.context.lineNumber}`);\n    }\n  }\n}\n```\n\n### Handling Malformed Input\n\n```typescript\nconst events = streamEvents({\n  vendor: 'auto',\n  source: inputStream,\n  continueOnError: true, // Continue parsing despite errors\n  emitDebugEvents: true, // Emit debug events for unknown formats\n  maxConsecutiveErrors: 50, // Stop if too many errors in a row\n});\n\nfor await (const event of events) {\n  if (event.t === 'debug') {\n    // Log unknown format for debugging\n    console.debug('Unknown format:', event.raw);\n  }\n}\n```\n\n## Configuration\n\n### Environment Variables\n\n```bash\n# Enable debug logging\nDEBUG=agent-stream-fmt:*\n\n# Disable colors in terminal output\nNO_COLOR=1\n\n# Force color output (even when piping)\nFORCE_COLOR=1\n```\n\n## Examples\n\n### Processing Claude Code Output\n\n```typescript\nimport { streamFormat } from '@agent-io/stream';\nimport { spawn } from 'child_process';\n\nconst claude = spawn('claude', ['--json', 'Write a hello world in Python']);\n\nfor await (const output of streamFormat({\n  vendor: 'claude',\n  source: claude.stdout,\n  format: 'ansi',\n  collapseTools: true,\n})) {\n  process.stdout.write(output);\n}\n```\n\n### Processing Cursor Agent Output\n\n```typescript\nimport { streamEvents } from '@agent-io/stream';\nimport { spawn } from 'child_process';\n\nconst cursorAgent = spawn('cursor-agent', [\n  '-p',\n  'Read and analyze package.json',\n  '--output-format=stream-json',\n]);\n\nfor await (const event of streamEvents({\n  vendor: 'cursor',\n  source: cursorAgent.stdout,\n})) {\n  switch (event.t) {\n    case 'msg':\n      console.log(`${event.role}: ${event.text}`);\n      break;\n    case 'tool':\n      if (event.phase === 'start') {\n        console.log(`🔧 ${event.name} started`);\n      } else if (event.phase === 'end') {\n        console.log(`✅ ${event.name} completed (${event.exitCode === 0 ? 'success' : 'failed'})`);\n      }\n      break;\n  }\n}\n```\n\n### Building a Web Dashboard\n\n```typescript\nimport { streamFormat } from '@agent-io/stream';\nimport { createServer } from 'http';\n\ncreateServer(async (req, res) => {\n  res.writeHead(200, { 'Content-Type': 'text/html' });\n\n  res.write(`<!DOCTYPE html>\n<html>\n<head>\n  <style>\n    body { font-family: monospace; background: #1e1e1e; color: #fff; }\n    .message { margin: 10px 0; }\n    .tool { background: #2d2d2d; padding: 10px; margin: 5px 0; }\n  </style>\n</head>\n<body>`);\n\n  for await (const html of streamFormat({\n    vendor: 'auto',\n    source: getAgentOutputStream(),\n    format: 'html',\n  })) {\n    res.write(html);\n  }\n\n  res.write('</body></html>');\n  res.end();\n}).listen(3000);\n```\n\n### Filtering Events\n\n```typescript\nimport { streamEvents } from '@agent-io/stream';\n\n// Only process message and error events\nconst filtered = async function* (source: AsyncIterable<AgentEvent>) {\n  for await (const event of source) {\n    if (event.t === 'msg' || event.t === 'error') {\n      yield event;\n    }\n  }\n};\n\nconst events = filtered(streamEvents({ vendor: 'gemini', source }));\nfor await (const event of events) {\n  console.log(event);\n}\n```\n\n## Performance\n\nThe library is optimized for high-throughput streaming:\n\n- Processes >50,000 lines/second\n- Constant memory usage (<20MB) for infinite streams\n- Zero dependencies for core functionality\n- Efficient line-by-line processing without buffering\n\n## Troubleshooting\n\n### Common Issues\n\n**Q: Auto-detection fails with \"Unable to detect vendor format\"** A: Ensure the input contains valid\nJSONL. Try specifying the vendor explicitly.\n\n**Q: Colors don't appear in terminal output** A: Check if your terminal supports ANSI colors. Try\nsetting `FORCE_COLOR=1`.\n\n**Q: Memory usage grows with large files** A: Ensure you're using the streaming API, not\n`collectEvents()` for large inputs.\n\n**Q: Parse errors with valid-looking JSON** A: Check for line encoding issues. The library expects\nUTF-8 by default.\n\n### Debug Mode\n\nEnable debug logging to troubleshoot issues:\n\n```bash\nDEBUG=agent-stream-fmt:* agent-stream-fmt < input.jsonl\n```\n\n## License\n\nMIT\n\n## Testing\n\n```bash\n# Run tests\nnpm test\n\n# Run tests with coverage\nnpm run test:coverage\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Run performance benchmarks (CPU-intensive!)\nnpm run test:performance\n```\n\n**Note:** The test suite includes error handling tests that intentionally throw errors to verify\nproper error handling. You may see error messages in stderr like \"Parser error detection failed\" -\nthese are expected and indicate the error handling tests are working correctly.\n\n**Performance Tests:** Performance benchmarks are excluded from the main test suite because they are\nextremely CPU-intensive, processing millions of lines to measure throughput. Run them separately\nwith `npm run test:performance` when needed.\n\n## Contributing\n\nSee [CONTRIBUTING.md](../../CONTRIBUTING.md) for development setup and guidelines.\n","readmeFilename":"README.md"}