[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JWXGN3Q0ZQJFM2B9EW920N":3,"skill-same:01M6JWXGN3Q0ZQJFM2B9EW920N":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":46,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6JWXGN3Q0ZQJFM2B9EW920N","assistant-ui-streaming",null,"Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.","compozy\u002Fcompozy","compozy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F205107042?v=4","01M6JWVTXX4DX38AWZ7SPFEKEV","CompozyOS","01M6JWVV2P34GM1PDATVB2EV05",2871,"MIT","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fassistant-ui\u002Fassistant-ui-streaming\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"assistant","streaming","ui","assistant ui streaming","assistant ui","debugging","issues","package","protocols","guide","use","implementing","for","stream","custom","when","2026-11-10 10:12:30",false,"---\nname: assistant-ui-streaming\ndescription: Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.\nversion: 0.0.1\nlicense: MIT\n---\n\n# assistant-ui Streaming\n\n**Always consult [assistant-ui.com\u002Fllms.txt](https:\u002F\u002Fassistant-ui.com\u002Fllms.txt) for latest API.**\n\nThe `assistant-stream` package handles streaming from AI backends.\n\n## References\n\n- [.\u002Freferences\u002Fdata-stream.md](.\u002Freferences\u002Fdata-stream.md) -- AI SDK data stream format\n- [.\u002Freferences\u002Fassistant-transport.md](.\u002Freferences\u002Fassistant-transport.md) -- Native assistant-ui format\n- [.\u002Freferences\u002Fencoders.md](.\u002Freferences\u002Fencoders.md) -- Encoders and decoders\n\n## When to Use\n\n```\nUsing Vercel AI SDK?\n├─ Yes → toUIMessageStreamResponse() (no assistant-stream needed)\n└─ No → assistant-stream for custom backends\n```\n\n## Installation\n\n```bash\nnpm install assistant-stream\n```\n\n## Custom Streaming Response\n\n```ts\nimport { createAssistantStreamResponse } from \"assistant-stream\";\n\nexport async function POST(req: Request) {\n  return createAssistantStreamResponse(async (stream) => {\n    stream.appendText(\"Hello \");\n    stream.appendText(\"world!\");\n\n    \u002F\u002F Tool call example\n    const tool = stream.addToolCallPart({ toolCallId: \"1\", toolName: \"get_weather\" });\n    tool.argsText.append('{\"city\":\"NYC\"}');\n    tool.argsText.close();\n    tool.setResponse({ result: { temperature: 22 } });\n\n    stream.close();\n  });\n}\n```\n\n## With useLocalRuntime\n\n`useLocalRuntime` expects `ChatModelRunResult` chunks. Yield content parts for streaming:\n\n```tsx\nimport { useLocalRuntime } from \"@assistant-ui\u002Freact\";\n\nconst runtime = useLocalRuntime({\n  model: {\n    async *run({ messages, abortSignal }) {\n      const response = await fetch(\"\u002Fapi\u002Fchat\", {\n        method: \"POST\",\n        body: JSON.stringify({ messages }),\n        signal: abortSignal,\n      });\n\n      const reader = response.body?.getReader();\n      const decoder = new TextDecoder();\n      let buffer = \"\";\n\n      while (reader) {\n        const { done, value } = await reader.read();\n        if (done) break;\n\n        buffer += decoder.decode(value, { stream: true });\n        const parts = buffer.split(\"\\n\");\n        buffer = parts.pop() ?? \"\";\n\n        for (const chunk of parts.filter(Boolean)) {\n          yield { content: [{ type: \"text\", text: chunk }] };\n        }\n      }\n    },\n  },\n});\n```\n\n## Debugging Streams\n\n```ts\nimport { AssistantStream, DataStreamDecoder } from \"assistant-stream\";\n\nconst stream = AssistantStream.fromResponse(response, new DataStreamDecoder());\nfor await (const event of stream) {\n  console.log(\"Event:\", JSON.stringify(event, null, 2));\n}\n```\n\n## Stream Event Types\n\n- `part-start` with `part.type` = `\"text\" | \"reasoning\" | \"tool-call\" | \"source\" | \"file\"`\n- `text-delta` with streamed text\n- `result` with tool results\n- `step-start`, `step-finish`, `message-finish`\n- `error` strings\n\n## Common Gotchas\n\n**Stream not updating UI**\n- Check Content-Type is `text\u002Fevent-stream`\n- Check for CORS errors\n\n**Tool calls not rendering**\n- `addToolCallPart` needs both `toolCallId` and `toolName`\n- Register tool UI with `makeAssistantToolUI`\n\n**Partial text not showing**\n- Use `text-delta` events for streaming\n","# assistant-ui Streaming\n\n**Always consult [assistant-ui.com\u002Fllms.txt](https:\u002F\u002Fassistant-ui.com\u002Fllms.txt) for latest API.**\n\nThe `assistant-stream` package handles streaming from AI backends.\n\n## References\n\n- [.\u002Freferences\u002Fdata-stream.md](.\u002Freferences\u002Fdata-stream.md) -- AI SDK data stream format\n- [.\u002Freferences\u002Fassistant-transport.md](.\u002Freferences\u002Fassistant-transport.md) -- Native assistant-ui format\n- [.\u002Freferences\u002Fencoders.md](.\u002Freferences\u002Fencoders.md) -- Encoders and decoders\n\n## When to Use\n\n```\nUsing Vercel AI SDK?\n├─ Yes → toUIMessageStreamResponse() (no assistant-stream needed)\n└─ No → assistant-stream for custom backends\n```\n\n## Installation\n\n```bash\nnpm install assistant-stream\n```\n\n## Custom Streaming Response\n\n```ts\nimport { createAssistantStreamResponse } from \"assistant-stream\";\n\nexport async function POST(req: Request) {\n  return createAssistantStreamResponse(async (stream) => {\n    stream.appendText(\"Hello \");\n    stream.appendText(\"world!\");\n\n    \u002F\u002F Tool call example\n    const tool = stream.addToolCallPart({ toolCallId: \"1\", toolName: \"get_weather\" });\n    tool.argsText.append('{\"city\":\"NYC\"}');\n    tool.argsText.close();\n    tool.setResponse({ result: { temperature: 22 } });\n\n    stream.close();\n  });\n}\n```\n\n## With useLocalRuntime\n\n`useLocalRuntime` expects `ChatModelRunResult` chunks. Yield content parts for streaming:\n\n```tsx\nimport { useLocalRuntime } from \"@assistant-ui\u002Freact\";\n\nconst runtime = useLocalRuntime({\n  model: {\n    async *run({ messages, abortSignal }) {\n      const response = await fetch(\"\u002Fapi\u002Fchat\", {\n        method: \"POST\",\n        body: JSON.stringify({ messages }),\n        signal: abortSignal,\n      });\n\n      const reader = response.body?.getReader();\n      const decoder = new TextDecoder();\n      let buffer = \"\";\n\n      while (reader) {\n        const { done, value } = await reader.read();\n        if (done) break;\n\n        buffer += decoder.decode(value, { stream: true });\n        const parts = buffer.split(\"\\n\");\n        buffer = parts.pop() ?? \"\";\n\n        for (const chunk of parts.filter(Boolean)) {\n          yield { content: [{ type: \"text\", text: chunk }] };\n        }\n      }\n    },\n  },\n});\n```\n\n## Debugging Streams\n\n```ts\nimport { AssistantStream, DataStreamDecoder } from \"assistant-stream\";\n\nconst stream = AssistantStream.fromResponse(response, new DataStreamDecoder());\nfor await (const event of stream) {\n  console.log(\"Event:\", JSON.stringify(event, null, 2));\n}\n```\n\n## Stream Event Types\n\n- `part-start` with `part.type` = `\"text\" | \"reasoning\" | \"tool-call\" | \"source\" | \"file\"`\n- `text-delta` with streamed text\n- `result` with tool results\n- `step-start`, `step-finish`, `message-finish`\n- `error` strings\n\n## Common Gotchas\n\n**Stream not updating UI**\n- Check Content-Type is `text\u002Fevent-stream`\n- Check for CORS errors\n\n**Tool calls not rendering**\n- `addToolCallPart` needs both `toolCallId` and `toolName`\n- Register tool UI with `makeAssistantToolUI`\n\n**Partial text not showing**\n- Use `text-delta` events for streaming\n",{"name":5,"license":15,"version":40,"description":7},"0.0.1","main","a427be50111dfd18e0cc37aa36359e26745b04dc",".agents\u002Fskills\u002Fassistant-ui\u002Fassistant-ui-streaming",187,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy","https:\u002F\u002Fcompozy.com","https:\u002F\u002Fgithub.com\u002Fcompozy","An OS for AI agents","2026-11-15 03:55:11",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add compozy\u002Fcompozy --skill assistant-ui-streaming",{"tool":56,"command":57},"bunx","bunx skills add compozy\u002Fcompozy --skill assistant-ui-streaming",{"tool":59,"command":60},"pnpm","pnpm dlx skills add compozy\u002Fcompozy --skill assistant-ui-streaming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fassistant-ui\u002Fassistant-ui-streaming\u002FSKILL.md",true,[64,70,74],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fassistant-transport.md","REFERENCE","参考文档",3974,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fassistant-ui\u002Fassistant-ui-streaming\u002Freferences\u002Fassistant-transport.md",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fdata-stream.md",4155,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fassistant-ui\u002Fassistant-ui-streaming\u002Freferences\u002Fdata-stream.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fencoders.md",3278,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fassistant-ui\u002Fassistant-ui-streaming\u002Freferences\u002Fencoders.md",[79,106,126,149,160,172],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":35},"01M6MD7W312X49RNEJRKKVKTTD","security-review","Security code review for vulnerabilities. Use when asked to \"security review\", \"find vulnerabilities\", \"check for security issues\", \"audit security\", \"OWASP review\", or review code for injection, XSS, authentication, authorization, cryptography issues. Provides systematic review with confidence-based reporting.","CC-BY-SA-4.0","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecurity-review\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[],[88,89,90,91,92,93,25,94,95,96,97,98,99,100,101,102,103,31,29,104,34,105],"security","security review","review","injection","authentication","code review","Bash","code","xss","audit","systematic","read","reporting","cryptography","owasp","systematic review","task","audit security",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":35},"01M6MD5K93G1GP8VA56V2FEPZV","lesson-learned","Extract evidence-backed engineering lessons from recent changes or incidents. Use for requested reflection, lesson updates, or retiring an obsolete workflow rule.","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Flesson-learned\u002FSKILL.md",[],[113,114,115,31,116,117,118,119,120,121,122,123,29,124,125],"learned","lesson learned","lesson","changes","evidence","incidents","workflow","engineering","updates","extract","rule","lessons","reflection",{"skillNo":127,"name":9,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":35},"01M6MDPNH3J60VRCGTPHVTHZR8","Operate CompozyOS. Use when working with CompozyOS sessions, agents, native tools, skills, tasks, Loops, Goals, Terminal, desktops and windows, automation, extensions, or configuration. Don't use for unrelated projects.","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fskills\u002Fcompozy\u002FSKILL.md",[],[9,132,133,134,135,31,136,137,29,138,139,140,141,142,143,144,145,146,147,148,34],"sessions","windows","projects","operate","runtime","true","automation","tasks","extensions","with","loops","unrelated","goals","native","terminal","configuration","Tools",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":35},"01M6MDPHKNPQHJ1TF21E1HSFNF","remotion-upgrade","Upgrade Remotion, and related packages","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fpackages\u002Flaunch-video\u002F.agents\u002Fskills\u002Fremotion-upgrade\u002FSKILL.md",[],[156,157,158,159],"remotion upgrade","upgrade","Remotion","packages",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":35},"01M6MDPFT91ZWC7Z09MRNZPAJG","remotion-studio","Preview a Remotion video","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fpackages\u002Flaunch-video\u002F.agents\u002Fskills\u002Fremotion-studio\u002FSKILL.md",[],[167,168,158,169,170,171],"studio","remotion studio","Video","preview","remotion video",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":35},"01M6MDPD5XDZPYB5NAZGKMPXWC","remotion-saas","Build an app with Remotion","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fpackages\u002Flaunch-video\u002F.agents\u002Fskills\u002Fremotion-saas\u002FSKILL.md",[],[179,180,158,141,181,182],"saas","remotion saas","app","build"]