{"_id":"@breadai/transport-http-chunked","_rev":"3-061acb018fc85cfa9f0c162ddc0a188a","name":"@breadai/transport-http-chunked","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@breadai/transport-http-chunked","version":"0.1.0","keywords":["ai","agents","http","ndjson","chunked","bread"],"author":"Matteo Zambon <matteo@yeeti.co>","license":"MIT","_id":"@breadai/transport-http-chunked@0.1.0","maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"homepage":"https://github.com/matteozambon89/bread","dist":{"shasum":"7891e288e84a101d41929bcc6a2389c9d820f63c","tarball":"https://registry.npmjs.org/@breadai/transport-http-chunked/-/transport-http-chunked-0.1.0.tgz","fileCount":12,"integrity":"sha512-JyizWrktRS1CTRpxh/Y/qpXD66CxerqNWU08nqMGCkY2PSQncZwdgRCX3Enfm03/8mFz5hkIKFjbvArWqTz/qg==","signatures":[{"sig":"MEQCIGRUnO8ikwCCeFuL19agaFkwXv9WlRBkRQKB6mQsPVWzAiAr7QsKFIZEufWieL7UCjul0XGZnVRq14q54iCOwmARlw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17730},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"7891e288e84a101d41929bcc6a2389c9d820f63c","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","bread-source":"./src/index.ts"}},"scripts":{"build":"bun build ./src/index.ts --outdir dist --target node --format esm --packages external && tsc --emitDeclarationOnly --outDir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"},"_integrity":"sha512-JyizWrktRS1CTRpxh/Y/qpXD66CxerqNWU08nqMGCkY2PSQncZwdgRCX3Enfm03/8mFz5hkIKFjbvArWqTz/qg==","repository":{"url":"https://github.com/matteozambon89/bread.git","type":"git","directory":"transports/http-chunked"},"_npmVersion":"10.8.3","description":"HTTP (chunked NDJSON) BreadTransport for bread — a mount()-able server ingress plus a remoteAgent() client speaking the Bread protocol over one connection.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"hono":"^4.8.4","@breadai/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport-http-chunked_0.1.0_1786817723109_0.4893883065171958","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@breadai/transport-http-chunked","version":"0.1.1","keywords":["ai","agents","http","ndjson","chunked","bread"],"author":"Matteo Zambon <matteo@yeeti.co>","license":"MIT","_id":"@breadai/transport-http-chunked@0.1.1","maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"homepage":"https://github.com/matteozambon89/bread","dist":{"shasum":"cfc6915ac01131b58fd9586f8c8818ef60bde4d1","tarball":"https://registry.npmjs.org/@breadai/transport-http-chunked/-/transport-http-chunked-0.1.1.tgz","fileCount":12,"integrity":"sha512-Zvj1H2GWAvm8Cl3EK4DB9dtHXAGHDnkWYSern+DAdfTpJAR86BQoO38iPBtOAAtgvmmU1IXv1VgymuwfFlhLpA==","signatures":[{"sig":"MEYCIQDM3AOu/6rZLb9Kj2UjniJkXmqwy+ml1Visw4OfwaVRIQIhANadHLinP/68D0rf0qFRgR5eCD8qjMab8KJMl4vgvi71","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17730},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"cfc6915ac01131b58fd9586f8c8818ef60bde4d1","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","bread-source":"./src/index.ts"}},"scripts":{"build":"bun build ./src/index.ts --outdir dist --target node --format esm --packages external && tsc --emitDeclarationOnly --outDir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"},"_integrity":"sha512-Zvj1H2GWAvm8Cl3EK4DB9dtHXAGHDnkWYSern+DAdfTpJAR86BQoO38iPBtOAAtgvmmU1IXv1VgymuwfFlhLpA==","repository":{"url":"https://github.com/matteozambon89/bread.git","type":"git","directory":"transports/http-chunked"},"_npmVersion":"10.8.3","description":"HTTP (chunked NDJSON) BreadTransport for bread — a mount()-able server ingress plus a remoteAgent() client speaking the Bread protocol over one connection.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"hono":"^4.8.4","@breadai/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport-http-chunked_0.1.1_1786919711343_0.22597662647631656","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@breadai/transport-http-chunked","version":"0.1.2","type":"module","exports":{".":{"bread-source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@breadai/core":">=0.1.1 <1.0.0","hono":"^4.8.4"},"scripts":{"typecheck":"tsc --noEmit","build":"bun build ./src/index.ts --outdir dist --target node --format esm --packages external && tsc --emitDeclarationOnly --outDir dist"},"description":"HTTP (chunked NDJSON) BreadTransport for bread — a mount()-able server ingress plus a remoteAgent() client speaking the Bread protocol over one connection.","license":"MIT","author":"Matteo Zambon <matteo@yeeti.co>","keywords":["ai","agents","http","ndjson","chunked","bread"],"repository":{"type":"git","url":"https://github.com/matteozambon89/bread.git","directory":"transports/http-chunked"},"homepage":"https://github.com/matteozambon89/bread","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"_id":"@breadai/transport-http-chunked@0.1.2","_integrity":"sha512-gX/NiORoe0XNR0LDjiw61JAfGBiFqIyseyyFDoM+5xbVWjb3ApnM9DmLBCty05VXMtzVs34CJ6zGYGHUGlkAyA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"ba4e18c8989eb06eba1e7c8f66368f7993d0b60f","dist":{"integrity":"sha512-gX/NiORoe0XNR0LDjiw61JAfGBiFqIyseyyFDoM+5xbVWjb3ApnM9DmLBCty05VXMtzVs34CJ6zGYGHUGlkAyA==","shasum":"ba4e18c8989eb06eba1e7c8f66368f7993d0b60f","tarball":"https://registry.npmjs.org/@breadai/transport-http-chunked/-/transport-http-chunked-0.1.2.tgz","fileCount":12,"unpackedSize":19096,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEZ3RzBz2v4ihq9os3Cqo6OYPQklwhlEpz0Plvu17yg2AiAIynrSmFwyKc8sQRSI58zGpVClRI7vWkZFXQ2uPNuYUQ=="}]},"_npmUser":{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"},"directories":{},"maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/transport-http-chunked_0.1.2_1788713739238_0.7456286181760774"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-15T18:15:22.972Z","modified":"2026-09-06T16:55:39.531Z","0.1.0":"2026-08-15T18:15:23.249Z","0.1.1":"2026-08-16T22:35:11.480Z","0.1.2":"2026-09-06T16:55:39.375Z"},"author":"Matteo Zambon <matteo@yeeti.co>","license":"MIT","homepage":"https://github.com/matteozambon89/bread","keywords":["ai","agents","http","ndjson","chunked","bread"],"repository":{"type":"git","url":"https://github.com/matteozambon89/bread.git","directory":"transports/http-chunked"},"description":"HTTP (chunked NDJSON) BreadTransport for bread — a mount()-able server ingress plus a remoteAgent() client speaking the Bread protocol over one connection.","maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://github.com/matteozambon89/bread\">\n    <img alt=\"bread\" src=\"https://cdn.jsdelivr.net/gh/matteozambon89/bread/assets/brand/mark-light-512.png\" height=\"64\">\n  </a>\n</p>\n\n# @breadai/transport-http-chunked\n\nHTTP (chunked NDJSON) [`BreadTransport`](../../docs/transports.md) for [bread](https://github.com/matteozambon89/bread) —\na `mount()`-able server ingress plus a `remoteAgent()` client, speaking the Bread protocol\n(`packages/core/src/protocol.ts`) over one HTTP connection. This is the recommended default\ntransport for `bread dev`/`bread start`.\n\n## Install\n\n```bash\nbun add @breadai/transport-http-chunked\n```\n\n## Usage\n\n```ts\n// bread.config.ts\nimport { transport } from '@breadai/transport-http-chunked'\n\nexport default defineConfig({\n  entrypoints: ['writer'],\n  store: store({ path: './bread.db' }),\n  transport: transport(), // config.transport.mount(app, bread) wires the routes\n})\n```\n\n```ts\n// Consuming a remote bread instance's mounted routes (config.remoteAgents)\nimport { remoteAgent } from '@breadai/transport-http-chunked'\n\nexport default defineConfig({\n  entrypoints: ['local'],\n  store: store({ path: './bread.db' }),\n  remoteAgents: {\n    researcher: remoteAgent({ url: 'http://remote:3000' }),\n  },\n})\n```\n\n## What `mount()` adds\n\nThe four routes `createServer()` used to hand-roll, reimplemented generically against the public\n`BreadInstance` surface (`run`/`resume`/`runPipeline`/`store.getCrumbs`/`transport.subscribe` —\nnever anything private):\n\n| Route | Behavior |\n|---|---|\n| `POST /agents/:id/run` | Runs an agent, streams its crumbs as NDJSON |\n| `POST /pipelines/:id/run` | Runs a configured pipeline, streams step + inner-agent crumbs |\n| `POST /resume/:checkpointId` | Resumes a suspended HITL run, streams the continuation |\n| `GET /runs/:runId/stream` | Passively tails any run — store replay (`Last-Event-ID`/`?after=`) then live |\n\nEach line of a streamed response body is one Bread protocol `CrumbFrame`, JSON-encoded\n(`{ v, type: 'crumb', runId, seq, crumb }`), newline-terminated. A failure — including one that\nwould otherwise throw before the stream even starts, like an unknown pipeline id — surfaces as a\nsynthetic `agent:error` crumb in the stream rather than tearing down the connection; the HTTP\nstatus stays 200 once headers are sent. Blank lines are heartbeats (skip them).\n\n## Semantics\n\n- `transport()`'s pub/sub + bounded replay is the embedded `streamTransport()` — single-process\n  only. Cross-replica fan-out is `@breadai/transport-redis`'s job, not this package's; combining\n  Redis fan-out with HTTP ingress on the same `config.transport` slot isn't supported yet (see\n  `docs/transports.md`'s known gap).\n- `remoteAgent()`'s `run()` is a plain NDJSON line reader — no reconnect/replay logic of its own\n  today (a dropped connection just ends the generator).\n","readmeFilename":"README.md"}