{"versions":{"0.1.0":{"name":"@copilotkit/channels-ui","version":"0.1.0","description":"JSX runtime, IR, and cross-platform component vocabulary for CopilotKit channels.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/CopilotKit/CopilotKit.git"},"homepage":"https://github.com/CopilotKit/CopilotKit","keywords":["ai","agent","bot","jsx","block-kit","ui","copilotkit","ag-ui"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"dependencies":{"@copilotkit/shared":"^1.62.3"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.3","vitest":"^4.1.3","@copilotkit/typescript-config":"^1.55.0-next.8"},"scripts":{"build":"tsc -p tsconfig.json","check-types":"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.check.json","test":"vitest run","test:watch":"vitest","publint":"publint .","attw":"attw --pack . --profile esm-only"},"_id":"@copilotkit/channels-ui@0.1.0","bugs":{"url":"https://github.com/CopilotKit/CopilotKit/issues"},"_integrity":"sha512-7SL9qsMFTZzPgyHbxddtNiWcM7JBtrOKK2U1WNu1+WfpyMbiicehS7/uvgTR0B3xJXx6LyfCsWm1L2tRx8agyA==","_resolved":"/Users/tylerslaton/conductor/workspaces/CopilotKit/belo-horizonte/packages/channels-ui/copilotkit-channels-ui-0.1.0.tgz","_from":"file:copilotkit-channels-ui-0.1.0.tgz","_nodeVersion":"22.16.0","_npmVersion":"11.15.0","dist":{"integrity":"sha512-7SL9qsMFTZzPgyHbxddtNiWcM7JBtrOKK2U1WNu1+WfpyMbiicehS7/uvgTR0B3xJXx6LyfCsWm1L2tRx8agyA==","shasum":"7ff24ca2c40b45f88f0cfcfbb2063a5019e59138","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@copilotkit/channels-ui/-/channels-ui-0.1.0.tgz","fileCount":51,"unpackedSize":67451,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDX9NlY8J1L3AX2ky0JCAhJpMZ0Z8gEyp8H+Bfs5XjDUQIhAKgYMqK7l4Zfs0rwcO+kfp9hVCuPTrLtj6qAKzR55HqP"}],"size":20820},"_npmUser":{"name":"anonymous","email":"devops@copilotkit.ai"},"directories":{},"maintainers":[{"name":"anonymous","email":"devops@copilotkit.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/channels-ui_0.1.0_1783540643478_0.48784357838972525"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-08T19:57:23.917Z","publish_time":1783540643917,"_source_registry_name":"default","contributors":[]},"0.1.1":{"name":"@copilotkit/channels-ui","version":"0.1.1","description":"JSX runtime, IR, and cross-platform component vocabulary for CopilotKit channels.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/CopilotKit/CopilotKit.git"},"homepage":"https://github.com/CopilotKit/CopilotKit","keywords":["ai","agent","bot","jsx","block-kit","ui","copilotkit","ag-ui"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"dependencies":{"@copilotkit/shared":"^1.62.3"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.3","vitest":"^4.1.3","@copilotkit/typescript-config":"^1.55.0-next.8"},"scripts":{"build":"tsc -p tsconfig.json","check-types":"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.check.json","test":"vitest run","test:watch":"vitest","publint":"publint .","attw":"attw --pack . --profile esm-only"},"_id":"@copilotkit/channels-ui@0.1.1","bugs":{"url":"https://github.com/CopilotKit/CopilotKit/issues"},"_integrity":"sha512-wQ099E62DEhIuKz8O9Iqy1VP4qCyLtS8d5EwfF2MK8m8amWtuyyTUxV8vC1q9ecJMgAwCtKmeW/fYQR8NsLiXQ==","_resolved":"/home/runner/work/CopilotKit/CopilotKit/packages/channels-ui/copilotkit-channels-ui-0.1.1.tgz","_from":"file:copilotkit-channels-ui-0.1.1.tgz","_nodeVersion":"22.23.1","_npmVersion":"11.15.0","dist":{"integrity":"sha512-wQ099E62DEhIuKz8O9Iqy1VP4qCyLtS8d5EwfF2MK8m8amWtuyyTUxV8vC1q9ecJMgAwCtKmeW/fYQR8NsLiXQ==","shasum":"78a8763d1aca94e075bedcf7a3595d63f64495d0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@copilotkit/channels-ui/-/channels-ui-0.1.1.tgz","fileCount":51,"unpackedSize":67965,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@copilotkit%2fchannels-ui@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDKe2skv7xXE/YhAPdt1sJBdZA/qpSWPx6En6ZOIwU2kAIgC3e1mpptI5dM2IeYRaQIZ/OryipOvBIySjMYgOzaoXw="}],"size":21023},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0fb8aee4-ee63-42bf-91d5-edf12f0dc1b3"}},"directories":{},"maintainers":[{"name":"anonymous","email":"devops@copilotkit.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/channels-ui_0.1.1_1783724498204_0.48216626215607294"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-10T23:01:38.371Z","publish_time":1783724498371,"_source_registry_name":"default","contributors":[]},"0.2.0":{"name":"@copilotkit/channels-ui","version":"0.2.0","description":"JSX runtime, IR, and cross-platform component vocabulary for CopilotKit channels.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/CopilotKit/CopilotKit.git"},"homepage":"https://github.com/CopilotKit/CopilotKit","keywords":["ai","agent","bot","jsx","block-kit","ui","copilotkit","ag-ui"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"dependencies":{"@copilotkit/shared":"^1.62.3"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.3","vitest":"^4.1.3","@copilotkit/typescript-config":"^1.55.0-next.8"},"scripts":{"build":"tsc -p tsconfig.json","check-types":"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.check.json","test":"vitest run","test:watch":"vitest","publint":"publint .","attw":"attw --pack . --profile esm-only"},"_id":"@copilotkit/channels-ui@0.2.0","bugs":{"url":"https://github.com/CopilotKit/CopilotKit/issues"},"_integrity":"sha512-ZVna1jml3H8kwSXHdNdI0TSjRFg/PGaOfHhpzDSePpv+LksUlINO59Tt3DtsN806Zc3ADoG5orHYjn+B7bhklg==","_resolved":"/home/runner/work/CopilotKit/CopilotKit/packages/channels-ui/copilotkit-channels-ui-0.2.0.tgz","_from":"file:copilotkit-channels-ui-0.2.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"11.15.0","dist":{"integrity":"sha512-ZVna1jml3H8kwSXHdNdI0TSjRFg/PGaOfHhpzDSePpv+LksUlINO59Tt3DtsN806Zc3ADoG5orHYjn+B7bhklg==","shasum":"cd7d50b96acf3fa8489c617e0a79ff10ee850aaf","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@copilotkit/channels-ui/-/channels-ui-0.2.0.tgz","fileCount":51,"unpackedSize":68244,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@copilotkit%2fchannels-ui@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF9OZnvvqmxjHlOuCwGewSYxFGtXqkSyWcudNoAax63iAiEAwRxi0w4QWJpBS2dOvLDCn9a/ywTuK4v2XxQwY3TC+Y4="}],"size":21043},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0fb8aee4-ee63-42bf-91d5-edf12f0dc1b3"}},"directories":{},"maintainers":[{"name":"anonymous","email":"devops@copilotkit.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/channels-ui_0.2.0_1784148292362_0.9285419617443327"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-15T20:44:52.517Z","publish_time":1784148292517,"_source_registry_name":"default","contributors":[]},"0.2.1":{"name":"@copilotkit/channels-ui","version":"0.2.1","description":"JSX runtime, IR, and cross-platform component vocabulary for CopilotKit channels.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/CopilotKit/CopilotKit.git"},"homepage":"https://github.com/CopilotKit/CopilotKit","keywords":["ai","agent","bot","jsx","block-kit","ui","copilotkit","ag-ui"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"dependencies":{"@copilotkit/shared":"^1.63.1"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.3","vitest":"^4.1.3","@copilotkit/typescript-config":"^1.55.0-next.8"},"scripts":{"build":"tsc -p tsconfig.json","check-types":"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.check.json","test":"vitest run","test:watch":"vitest","publint":"publint .","attw":"attw --pack . --profile esm-only"},"_id":"@copilotkit/channels-ui@0.2.1","bugs":{"url":"https://github.com/CopilotKit/CopilotKit/issues"},"_integrity":"sha512-hHIOLic5a8Vx3Yr9TvZWv/LZ16vF8FPe/z7c9wiHIHrJnjsV7oxrEmJNv+WiOVUW4yV3CgEIH48/KesGBiK/kg==","_resolved":"/home/runner/work/CopilotKit/CopilotKit/packages/channels-ui/copilotkit-channels-ui-0.2.1.tgz","_from":"file:copilotkit-channels-ui-0.2.1.tgz","_nodeVersion":"22.23.1","_npmVersion":"11.15.0","dist":{"integrity":"sha512-hHIOLic5a8Vx3Yr9TvZWv/LZ16vF8FPe/z7c9wiHIHrJnjsV7oxrEmJNv+WiOVUW4yV3CgEIH48/KesGBiK/kg==","shasum":"78d0c82bca6f61d98fba1ad416e76b2682453af4","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@copilotkit/channels-ui/-/channels-ui-0.2.1.tgz","fileCount":51,"unpackedSize":73491,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@copilotkit%2fchannels-ui@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE/p6Siz404qvw2+BE5GmYK/QgCgZMbyqsMU/qdbl5FHAiEA90ZSTmj68D9MvkBMu2519Ec32gWZQl3k4xtNmQg12Pc="}],"size":22615},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0fb8aee4-ee63-42bf-91d5-edf12f0dc1b3"}},"directories":{},"maintainers":[{"name":"anonymous","email":"devops@copilotkit.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/channels-ui_0.2.1_1784280015562_0.15363343008079888"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-17T09:20:15.701Z","publish_time":1784280015701,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.2.1"},"name":"@copilotkit/channels-ui","time":{"created":"2026-07-09T01:11:29.380Z","modified":"2026-07-17T09:20:30.618Z","0.1.0":"2026-07-08T19:57:23.917Z","0.1.1":"2026-07-10T23:01:38.371Z","0.2.0":"2026-07-15T20:44:52.517Z","0.2.1":"2026-07-17T09:20:15.701Z"},"readme":"# @copilotkit/channels-ui\n\nA pure **JSX runtime + intermediate representation (IR) + cross-platform\ncomponent vocabulary** for authoring rich bot messages. No React, no agent\nruntime, no Slack — `@copilotkit/channels-ui` depends on nothing in the repo\nexcept `@copilotkit/shared` (for `StandardSchemaV1` types). That's what lets\na platform adapter (e.g. `@copilotkit/channels-slack`) translate the same UI into\nBlock Kit, while keeping the component layer tree-shakeable and testable in\nisolation.\n\nYou author UI as JSX, it normalizes to one serializable IR (`BotNode[]`), and\nbehavior props (`onClick` / `onSelect` / `onSubmit`) ride along on the nodes\nfor the engine (`@copilotkit/channels`) to bind.\n\n## Install\n\n```sh\npnpm add @copilotkit/channels-ui\n```\n\nTo author components as JSX, point the TypeScript JSX factory at this package\nin the consuming project's `tsconfig.json`:\n\n```jsonc\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"@copilotkit/channels-ui\",\n  },\n}\n```\n\nThis package ships `@copilotkit/channels-ui/jsx-runtime` (and\n`/jsx-dev-runtime`) exporting `jsx` / `jsxs` / `Fragment`. Author component\nfiles as `.tsx`.\n\n## Example\n\n```tsx\nimport {\n  Message,\n  Header,\n  Section,\n  Actions,\n  Button,\n  renderToIR,\n} from \"@copilotkit/channels-ui\";\n\nfunction Greeting({ name }: { name: string }) {\n  return (\n    <Message>\n      <Header>Hello {name}</Header>\n      <Section>Pick an option — **bold** and `code` work too.</Section>\n      <Actions>\n        <Button\n          style=\"primary\"\n          onClick={(ctx) => ctx.thread.post(\"you clicked!\")}\n        >\n          Continue\n        </Button>\n      </Actions>\n    </Message>\n  );\n}\n\nconst ir = renderToIR(<Greeting name=\"Ada\" />);\n// ir is BotNode[] — hand it to an adapter, or let @copilotkit/channels post it.\n```\n\n`renderToIR(ui: Renderable): BotNode[]` recursively invokes any component\nfunction (passing its props) until only intrinsic string-typed nodes remain;\nstrings in children become `{ type: \"text\", props: { value } }`; `Fragment`\nflattens its children. Components must be **pure functions of serializable\nprops** — same props in, same tree out — which is what makes content-stable\naction binding and re-render rehydration possible in `@copilotkit/channels`.\n\n`Renderable` also accepts a `{ raw }` escape hatch, which `renderToIR` passes\nthrough as `{ type: \"raw\", props: { value } }` for adapters that want to\nshort-circuit to a native payload.\n\n## Component vocabulary\n\nEach component is a thin function returning a `BotNode` with a stable\nintrinsic `type` string. An adapter maps these to native primitives.\n\nEvery component has a fully-typed prop interface (`MessageProps`,\n`ButtonProps`, …, all exported), and the package ships its own `JSX` namespace\n(resolved via `jsxImportSource: \"@copilotkit/channels-ui\"`). So JSX is statically\nchecked: unknown attributes, wrong prop values, and bad children are\ncompile-time errors — `<Section bogus={1} />` or `<Button style=\"nope\">` won't\ntype-check. There are no lowercase intrinsic tags; the vocabulary is the\ncapitalized component set below.\n\n| Component  | Purpose                                                                    |\n| ---------- | -------------------------------------------------------------------------- |\n| `Message`  | Root container for a single posted message — `accent`, `onReaction`.       |\n| `Header`   | Bold header / title row.                                                   |\n| `Section`  | A block of (markdown) body text.                                           |\n| `Markdown` | Explicit markdown text block.                                              |\n| `Field`    | One label/value cell inside `Fields` — optional `label`.                   |\n| `Fields`   | A grid of `Field`s (two-column key/value layout).                          |\n| `Context`  | Small, muted secondary text (footnotes, metadata).                         |\n| `Actions`  | Row container for interactive controls.                                    |\n| `Button`   | Clickable button — `onClick`, `value`, `style`, or `url` (link button).    |\n| `Select`   | Dropdown — `onSelect`, `placeholder`, `options: {label,value}[]`, `multi`. |\n| `Input`    | Text input — `onSubmit`, `placeholder`, `multiline`, `name`.               |\n| `Image`    | An image block.                                                            |\n| `Divider`  | A horizontal rule.                                                         |\n\n### Behavior props\n\nInteractive components carry handler props typed as `ClickHandler`:\n\n- `Button` → `onClick`\n- `Select` → `onSelect`\n- `Input` → `onSubmit`\n\n`Message` also takes `onReaction`, fired when a user reacts to the posted\nmessage (adds or removes). The first arg is the emoji; the second carries\n`added`/`user`/`rawEmoji` plus a `thread` and the reacted message's\n`messageRef` — the same surface an `onClick` gets, so a reaction can post new\nUI, swap the message in place, or run a HITL flow:\n\n```tsx\n<Message\n  onReaction={async (emoji, r) => {\n    if (!r.added) return;\n    if (emoji === \"bug\") await r.thread.post(<FileBug />); // post new UI\n    if (emoji === \"white_check_mark\")\n      await r.thread.update(r.messageRef, <Resolved />); // swap UI in place\n  }}\n>\n  …\n</Message>\n```\n\nIt's durable on the same terms as a component `onClick`: when the `<Message>`\ncomes from a component registered via `createChannel({ components: [...] })` and a\ndurable `store` is configured, a reaction after a restart re-renders the\ncomponent to re-derive the handler. Inline handlers (and `<Message>` used\ndirectly) route in-process but don't survive a restart. For durable, filtered\nreaction routing across _all_ messages, use `bot.onReaction(...)`.\n\nA `ClickHandler` receives an `InteractionContext`, both generic over the\nclicked control's value type:\n\n```ts\ntype ClickHandler<TValue = unknown> = (\n  ctx: InteractionContext<TValue>,\n) => void | Promise<void>;\n\ninterface InteractionContext<TValue = unknown> {\n  thread: Thread;\n  message: IncomingMessage;\n  action: { id: string; value?: TValue };\n  values: Record<string, unknown>;\n  user: PlatformUser;\n  platform: string;\n}\n```\n\n`Button` is generic over its `value` prop, so `ctx.action.value` is **inferred**\nfrom `value` — `<Button value={{ confirmed: true }} onClick={(ctx) => ctx.action.value?.confirmed}>`\ntype-checks with no cast. `Select`/`Input` resolve the value to `string`.\n\nThe structural types `Thread`, `IncomingMessage`, `PlatformUser`,\n`MessageRef`, and `ClickHandler` are declared here for handler typing only —\nthey're implemented at runtime by `@copilotkit/channels` and its adapters.\n`@copilotkit/channels-ui` has no runtime dependency on them.\n\n## `bind()` — the Tier-2 escape hatch\n\nInline `onClick` handlers are bound by content (component identity + path +\nserializable props), so a handler can be re-derived after a restart by\nre-rendering the component. When a handler closes over data that **can't** be\nreconstructed from props, wrap it with `bind()` so the engine persists that\nsmall payload explicitly alongside the minted action id:\n\n```tsx\nimport { bind } from \"@copilotkit/channels-ui\";\n\n<Button onClick={bind(handleChoice, { choiceId: \"abc123\" })}>Choose</Button>;\n```\n\n`bind(handler, args)` returns a tagged handler; the action registry stores\n`args` so a cold-path dispatch passes them back via `ctx.action.value`. Keep\n`args` small — it's the only handler-specific state that survives a restart.\n\n## Exports\n\nRuntime: `renderToIR`, `Fragment`, `bind`, and the vocabulary\n(`Message`, `Header`, `Section`, `Markdown`, `Field`, `Fields`, `Context`,\n`Actions`, `Button`, `Select`, `Input`, `Image`, `Divider`).\nTypes: `BotNode`, `BotChildren`, `ComponentFn`, `Renderable`, `Thread`,\n`InteractionContext`, `PlatformUser`, `IncomingMessage`, `MessageRef`,\n`ClickHandler`, and the per-component prop types (`MessageProps`,\n`ButtonProps`, `SelectProps`, `TableProps`, `TableColumn`, …).","users":{}}