{"_id":"@cool-ai/beach-channel-composer","name":"@cool-ai/beach-channel-composer","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cool-ai/beach-channel-composer","version":"0.1.0","description":"Beach Composer: an optional small-LLM commentary writer over a reply's data. Wired in when a channel wants prose; left out otherwise.","license":"Apache-2.0","repository":{"type":"git","url":"git+https://gitlab.com/johncandrew/beach.git","directory":"packages/beach-channel-composer"},"homepage":"https://cool-ai.org","bugs":{"url":"https://gitlab.com/johncandrew/beach/-/issues"},"type":"module","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^5.5.0","vitest":"^2.0.0"},"scripts":{"build":"tsc --project tsconfig.json","dev":"tsc --project tsconfig.json --watch","test":"vitest run","coverage":"vitest run --coverage","test:watch":"vitest","typecheck":"tsc --noEmit"},"_id":"@cool-ai/beach-channel-composer@0.1.0","_integrity":"sha512-Lh034tXZiuPQCb81cKwYdHJSWXGJP5o7CKvTrHvFoU8vBPvVTJCfRvLA2Wg30fHZ+I2Pg1p02ZbilEOw9GJKHg==","_resolved":"/tmp/212b31ad3bbf2a57d50c5189e18b5ab2/cool-ai-beach-channel-composer-0.1.0.tgz","_from":"file:cool-ai-beach-channel-composer-0.1.0.tgz","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-Lh034tXZiuPQCb81cKwYdHJSWXGJP5o7CKvTrHvFoU8vBPvVTJCfRvLA2Wg30fHZ+I2Pg1p02ZbilEOw9GJKHg==","shasum":"7bd61e273ebc53b6823483cdeb6466ae26357e44","tarball":"https://registry.npmjs.org/@cool-ai/beach-channel-composer/-/beach-channel-composer-0.1.0.tgz","fileCount":27,"unpackedSize":315502,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6dHLF7PLBgv4PeB1nW/Qo7UlmXv/PpwEjLmpEKXvQbgIgbQaj71ZCG86kajosXE9TWSZDqv0vRTyM+TU1IMiWVwc="}]},"_npmUser":{"name":"johncandrew","email":"johncandrew@yahoo.co.uk"},"directories":{},"maintainers":[{"name":"johncandrew","email":"johncandrew@yahoo.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/beach-channel-composer_0.1.0_1780677375940_0.6676008043566997"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-05T16:36:15.728Z","0.1.0":"2026-06-05T16:36:16.096Z","modified":"2026-06-05T16:36:16.335Z"},"maintainers":[{"name":"johncandrew","email":"johncandrew@yahoo.co.uk"}],"description":"Beach Composer: an optional small-LLM commentary writer over a reply's data. Wired in when a channel wants prose; left out otherwise.","homepage":"https://cool-ai.org","repository":{"type":"git","url":"git+https://gitlab.com/johncandrew/beach.git","directory":"packages/beach-channel-composer"},"bugs":{"url":"https://gitlab.com/johncandrew/beach/-/issues"},"license":"Apache-2.0","readme":"# @cool-ai/beach-channel-composer\n\nA composer is a small, optional LLM that writes prose over a reply's data — a summary, an introduction, an abridgement. You wire one in when a channel wants connective prose, and leave it out otherwise. It does no rendering, knows nothing of A2UI, and produces no channel artifact; it writes words, and that is all.\n\nThe composer binds no model provider. You pass it a `write` function — usually a small, fast model such as Haiku — and the composer calls it with the prompt, the channel, an optional character limit, and the data to write over.\n\n## Install\n\n```sh\npnpm add @cool-ai/beach-channel-composer\n```\n\n## Use\n\n```ts\nimport { Composer } from '@cool-ai/beach-channel-composer';\n\nconst composer = new Composer({\n  channel: 'whatsapp',\n  prompt: 'Summarise these results in one friendly sentence.',\n  characterLimit: 300,\n  write: async ({ prompt, channel, characterLimit, data }) =>\n    callHaiku({ prompt, channel, characterLimit, data }),\n});\n\nconst summary = await composer.compose({ flights: [/* … */] });\n```\n\nThe `channel` and `prompt` are how you key the composer's behaviour — different channels can carry different prompts and limits. A character-bound channel (SMS, WhatsApp) sets `characterLimit` so the model abridges; an email composer might leave it off and write an introduction instead.\n\nA channel adaptor takes a composer as optional wiring alongside its renderer: render the structured reply into the channel's artifact, and — if a composer is present — let it write the prose that frames it.\n","readmeFilename":"README.md","_rev":"1-b362c37b4ab0c823351019ceeeddbd31"}