## Release bot-discord v0.0.2
**Scope:** `bot-discord` | **Bump:** `patch`
---
### How this release process works
1. **This PR was created automatically** by the "release / create-pr"
workflow.
It bumped the `bot-discord` packages to `0.0.2`
and generated AI-enhanced release notes.
2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
must pass before merging. This is the review gate.
3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.
4. **When this PR is merged**, the `release / publish` workflow
automatically:
- Builds all packages
- Publishes the `bot-discord` packages to npm at version `0.0.2`
- Creates git tag `bot-discord/v0.0.2`
- Creates a GitHub Release with the final release notes
### Before merging
- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)
---
> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.
## Release bot-slack v0.0.3
**Scope:** `bot-slack` | **Bump:** `patch`
---
### How this release process works
1. **This PR was created automatically** by the "release / create-pr"
workflow.
It bumped the `bot-slack` packages to `0.0.3`
and generated AI-enhanced release notes.
2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
must pass before merging. This is the review gate.
3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.
4. **When this PR is merged**, the `release / publish` workflow
automatically:
- Builds all packages
- Publishes the `bot-slack` packages to npm at version `0.0.3`
- Creates git tag `bot-slack/v0.0.3`
- Creates a GitHub Release with the final release notes
### Before merging
- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)
---
> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.
## Release bot v0.0.3
**Scope:** `bot` | **Bump:** `patch`
---
### How this release process works
1. **This PR was created automatically** by the "release / create-pr"
workflow.
It bumped the `bot` packages to `0.0.3`
and generated AI-enhanced release notes.
2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
must pass before merging. This is the review gate.
3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.
4. **When this PR is merged**, the `release / publish` workflow
automatically:
- Builds all packages
- Publishes the `bot` packages to npm at version `0.0.3`
- Creates git tag `bot/v0.0.3`
- Creates a GitHub Release with the final release notes
### Before merging
- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)
---
> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.
Resolve event-renderer.ts onRunFinishedEvent: keep the native turn stream open
(finalized in finish()) AND retain the legacy per-message stream drain from main
(#5573) as a no-op-in-native safety net. app/index.ts (telegram adapter from
#5520 + showToolStatus:false) and create-bot.test.ts auto-merged.
Two fixes surfaced by exercising the bot's generative-UI / HITL tools
end-to-end in Slack.
## 1. HITL never resumed in an assistant-pane DM
An assistant-pane DM is **threaded**, so the ingress path
(`assistant.ts`) keys the turn's conversation by **`thread_ts`**. But
`decodeInteraction` forced **`DM_SCOPE`** for any `D…` channel. So the
HITL `awaitChoice` waiter was registered under `D…::<thread_ts>` while a
button click looked it up under `D…::dm` — the waiter was never
resolved. Clicking **Create/Cancel** swapped the card UI (the button's
`onClick` ran) but the agent run never resumed: no write, no reply.
**Fix:** honor an explicit `thread_ts` as the conversation scope even in
DMs (matching ingress); fall back to `DM_SCOPE` only for a genuinely
unthreaded DM. + a `decodeInteraction` regression test.
## 2. Render-tool output landed out of order
Defensively finalize any text stream still open at the end of a run
(`onRunFinishedEvent`), so a run's streamed text is fully posted before
the run-loop executes tool handlers that post out-of-band content
(images, cards).
All 200 `@copilotkit/bot-slack` tests pass. Verified live:
`confirm_write` now gates a write and resumes on approval; chart/diagram
output renders in order.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## What
Adds a **Telegram platform adapter** (`@copilotkit/bot-telegram`) for
`@copilotkit/bot`, at feature parity with `@copilotkit/bot-slack`, plus
a runnable example that drives **both** a Slack bot and a Telegram bot
from one app.
## `@copilotkit/bot-telegram` (new package)
A grammY-based adapter implementing the `PlatformAdapter` interface:
- **Ingress:** long-polling by default; webhook / `auto` (serverless-env
detection) opt-in.
- **Threading:** topic-aware hybrid — `tg:<chatId>:<scope>` where scope
is `dm`, `topic:<id>` (forum supergroups, gated on `chat.is_forum`), or
`user:<userId>` (non-forum groups).
- **Rendering:** the platform-agnostic `@copilotkit/bot-ui` JSX IR →
Telegram HTML, with a plain-text format fallback when HTML entity
parsing fails; length-bounded.
- **Streaming:** chunked `editMessageText` (placeholder → repeated
edits) with HTML-expansion headroom.
- **Interactions:** `callback_query` HITL (ack-first; 64-byte
`callback_data` via hashed action ids resolved through the ActionStore).
- **Inbound files:** photo/document ingestion wired into the agent turn
(size-capped, token-redacted).
- Ships `defaultTelegramTools` (user lookup) + `defaultTelegramContext`
(tagging / HTML / thread-model guidance).
- **Capabilities:** `supportsModals: false`, `supportsTyping: true`,
`supportsStreaming: true`, `supportsThreadTitle: true`,
`supportsReactions: false`, `supportsSuggestedPrompts: false`.
## `examples/slack` → Slack **and** Telegram from one app
Rather than maintain a diverging copy, the example now starts a Slack
bot and/or a Telegram bot (env-conditional on which credentials are
present) from one **platform-neutral** app layer — shared components,
tools, context, commands, render helpers. Each platform gets its own
`createBot` with its platform-specific default tools/context; the shared
components emit the cross-platform JSX IR that each adapter renders
natively.
To make the shared layer truly neutral: unicode glyphs instead of Slack
mrkdwn `:shortcode:` strings (Telegram doesn't expand them; Slack
renders unicode fine), no Slack-Block-Kit `raw` fallbacks, and neutral
context/tool wording (per-platform tagging guidance comes from each
adapter's default context). The separate `examples/telegram` app was
removed; its e2e smoke harness + BotFather setup docs were migrated into
`examples/slack`.
## Testing
- `@copilotkit/bot-telegram`: 138 unit tests; `nx build` (typecheck)
clean.
- `slack-example`: 42 tests (incl. `renderTelegram` parity assertions);
typecheck clean.
- `nx run-many -t build` green; root `pnpm install --frozen-lockfile` in
sync.
- Reviewed via a multi-round adversarial CR loop to convergence (zero
load-bearing findings) + a bucket-(c) promotion audit.
## Note: `bot-telegram` is unpublished
The example references it as `workspace:*` and **runs from the
monorepo** (`pnpm --filter slack-example start`). Standalone deploys
(the example's own lockfile) work for Slack today; once `bot-telegram`
publishes alongside its siblings, switch the dep to `~0.0.2` and
regenerate the standalone lockfile to enable standalone Telegram
deploys. Documented in the example README.
## Known limitations / follow-ups (out of scope, pre-existing or
inherent)
- **render_table** hardening (pre-existing in the Slack example):
`clamp()` overflow `notes` are computed but not surfaced (silent
truncation); "Max 100 rows" doc vs `MAX_DATA_ROWS = 99` off-by-one;
monospace fallback ignores column alignment.
- **Telegram e2e harness** is a documented best-effort **manual-trigger
smoke**: `getUpdates` contends with the bot's own long-poller
(single-consumer Bot API limit); multi-chunk reply assembly and
follow-up message selection are approximate. Automated upgrade path
(second sender bot) documented in `e2e/TELEGRAM-README.md`.
- **`_status` glyph mapping** uses substring matching, so non-default
Linear workflow state names (e.g. "Unstarted") can map to the wrong
glyph — identically on both platforms.
- **Bold-inside-link** (`[**text**](url)`) renders literal asterisks on
both Slack and Telegram (link labels aren't formatted on either) —
pre-existing, cosmetic.
- Telegram long-poll failures (revoked token, 409 conflict) are logged
inside the adapter and not surfaced to `start()`, so startup reports
success even if polling later fails.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Two fixes surfaced by exercising generative-UI / HITL tools through the bot:
- interaction.ts: an assistant-pane DM is threaded, so the ingress path keys the
turn by thread ts — but decodeInteraction forced DM_SCOPE for any "D…" channel.
The awaitChoice waiter was registered under D…::<thread_ts> while the button
click looked it up under D…::dm, so it was never resolved: clicking Create/
Cancel swapped the card UI but the run never resumed (no write, no reply).
Honor an explicit thread_ts as the scope even in DMs; fall back to DM_SCOPE
only for a genuinely unthreaded DM.
- event-renderer.ts: defensively finalize any text stream still open at run end,
so a run's streamed text is fully posted before the run-loop executes tool
handlers that post out-of-band content.
Adds a decodeInteraction regression test for the threaded-DM scope.
The TanStack stream converter stopped at the first per-turn RUN_FINISHED,
assuming tools are executed client-side. That truncated runs whose tools are
executed by chat() itself (MCP servers, provider tools): the TOOL_CALL_RESULT
and the model's final answer were dropped, so MCP-backed turns returned nothing.
- convertTanStackStream: drop TanStack's per-turn RUN_STARTED/RUN_FINISHED (the
Agent wrapper owns the outer pair) and convert every turn's events; dedupe
tool START/END by id; surface RUN_ERROR instead of silently dropping it.
- convertInputToTanStackAI: return input.tools as TanStack client-side tools so
the frontend's generative-UI / HITL tools work in factory mode, and sanitize
their JSON Schema (close open objects) so OpenAI accepts them.
Adds converter + input tests (multi-turn, dedup, error surfacing, client-tool
conversion, schema sanitizing).
## Summary
Fixes#5417. The v1 `<CopilotKit>` wrapper's `validateProps` threw
`ConfigurationError: Missing required prop: 'runtimeUrl' or
'publicApiKey' or 'publicLicenseKey'` whenever neither `runtimeUrl` nor
a public key was supplied — without considering self-managed agents.
This rejected the documented self-managed-agent setup, even though the
underlying v2 `CopilotKitProvider` accepts it via its `hasLocalAgents`
gate.
- **Fix:** `validateProps` now mirrors the provider's `hasLocalAgents`
check, so `selfManagedAgents` and `agents__unsafe_dev_only` satisfy the
requirement without a `runtimeUrl` or Cloud key.
- **Test:** new rendering test pins the behavior — still throws when
nothing is configured, no longer throws when local agents are supplied.
- **Docs:** the showcase error-reference "v1 behaves differently"
callout claimed the wrapper throws unconditionally and rejects
`selfManagedAgents` (both now false); corrected, and dropped the "(v2
only)" label on the self-managed example.
## Test plan
- [x] `nx test react-core` — 1284 passing, 0 failing
- [x] New test fails before the fix (red) and passes after (green)
- [x] No new type errors introduced (pre-existing `tsc` noise unchanged
vs `main`)
Strengthen the license-signal test so it pins that selfManagedAgents
satisfies hasLocalAgents — the Enterprise warning fires while the
separate "Missing required prop" missing-runtime warning does not.
Refs #5417
selfManagedAgents is part of CopilotKit's Enterprise Intelligence
offering. Emit an advisory console.warn (in both development and
production) when it is supplied without a publicLicenseKey/publicApiKey,
so production usage is surfaced. The signal is client-side and not
enforced — rendering still proceeds — and agents__unsafe_dev_only
remains a free local-dev escape hatch.
Refs #5417
Bumps the license-verifier pin in runtime and shared from ~0.4.2 to
~0.5.0. Lockfile regen and CI are blocked until 0.5.0 is published to
npm (latest is currently 0.4.2).
ENT-938
Clear the console.error spy inside the render helper so each assertion
is independent, and split the combined runtimeUrl/publicApiKey case into
two tests so each renders a single provider tree.
Refs #5417
Add empty-map (selfManagedAgents={}) throw case and the pre-existing
runtimeUrl/publicApiKey happy paths so a future gate inversion is
caught, and assert valid configs surface no unexpected console errors
instead of blanket-silencing console.error.
Refs #5417
The v1 <CopilotKit> wrapper's validateProps threw ConfigurationError
whenever neither runtimeUrl nor a public key was supplied, ignoring
self-managed agents. This rejected the documented self-managed-agent
setup even though the underlying v2 CopilotKitProvider accepts it.
Mirror the provider's hasLocalAgents gate so selfManagedAgents and
agents__unsafe_dev_only satisfy the check.
Closes#5417
`showToolStatus` only gated the legacy `🔧` rows — the native
`task_update` chunks and the pane "is using `tool`…" composer status
ignored it, so there was no single switch to hide tool-call progress.
Promote `showToolStatus` to the master toggle: when `false`, tool progress
is suppressed on ALL surfaces (native chunks, legacy rows, pane status);
tools still run, only the display is hidden. When `true`, the surface is
still chosen by target (native chunks / legacy rows / pane status, the
latter further gated by the pane's own `toolStatus`).
Flip it off in the slack example (`showToolStatus: false`).
Extend the unscoped-tool attribution test to verify toolCallId persists and
agentId stays undefined after the tool moves InProgress -> Executing, not just
at InProgress.
Code-review follow-up. Replace the unreachable `as any` fallback branch with
a compile-time exhaustiveness check (const _: never = props): a newly-added
ToolCallStatus now becomes a type error that must get its own branch, rather
than silently rendering with respond=undefined. Also correct the prop-build
comment (name/description are overwritten with the registration values, not
'normalized'). No behavior change for the three live statuses.
Addresses code-review findings on the HITL attribution change:
- Correct the render-prop JSDoc: agentId is the tool's STATIC registration
scope (undefined for unscoped tools), not the runtime sub-agent; toolCallId
is the key to correlate with runtime attribution (onToolExecutionStart /
event stream). Removes the over-claim that agentId resumes 'the correct
sub-agent'.
- Compare props.status against the ToolCallStatus enum instead of string
literals (removes silent drift risk).
- Inject name/description/agentId in the otherwise-unreachable fallback branch
so attribution is never silently dropped if a status is ever added; cast
the narrowed-never props to a record so the spread typechecks.
Behavior-preserving for the three live statuses; e2e suite green (13/13).
The HITL render callback received args/status/result but no attribution, so
a UI could not tell which run raised an interrupt — the blocker for rendering
and resuming human-in-the-loop stops that originate from a subagent.
- Add toolCallId (already delivered at runtime via the renderer props spread;
this only surfaces it in the type) and agentId (sourced from the tool's own
registration) to all three ReactHumanInTheLoop render-prop variants.
- Thread agentId through useHumanInTheLoop's enhanced props.
- e2e tests assert both reach the render props through the real CopilotChat
pipeline, and that agentId is undefined for an unscoped tool.
No shared renderer-contract or dispatch changes; no runtime behavior change.
Fire agent turns async so a blocking HITL awaitChoice cannot pause grammy sequential polling (which deadlocked the poll loop and drained the process). Add a bot.catch error boundary so update-processing errors are logged and polling continues. Fold a replied-to message (media + quoted text) into the turn. Decode text-like uploads (CSV/JSON/XML/text) to a text part instead of an unsupported binary file part.
awaitChoice resolved the waiter with evt.value, which platforms whose callback payload cannot carry it (Telegram, 64-byte callback_data) deliver as undefined. The registry now returns the clicked element value from dispatch, and create-bot falls back to it when the event has none. Slack (value-in-payload) is unchanged.
Bring the Slack adapter up to the current native streaming API surface
(chat.startStream/appendStream/stopStream, GA Oct 2025) and remove the
type-erasure workarounds.
- Remove `as unknown as Parameters<...>` casts in favor of the SDK's typed
args (ChatStartStream/AppendStream/StopStream/PostMessage/UpdateArguments).
- Stream a whole turn into ONE message: drop the per-message continuation
splitting (no documented cumulative cap; matches vercel/chat), keeping the
12k per-append chunking.
- Surface tool progress as native in-message `task_update` chunks
(task_display_mode "timeline"), degrading to `🔧` rows where
structured chunks are unavailable.
- Add opt-in AI feedback buttons via `slack({ feedback })` — a typed
context_actions/feedback_buttons row attached at stopStream, with clicks
routed adapter-locally (bypassing the engine's interaction dispatch).
- Scope recipient_user_id/recipient_team_id to channel targets only.
- Lower the native flush floor to ~600ms (appendStream Tier-4), legacy stays
800ms.
Engine: add an optional, backward-compatible RunRenderer.finish() hook called
after runAgentLoop so a turn-scoped renderer can finalize its stream.
Throw when a catalog definition has no matching renderer so createCatalog
satisfies strict check-types under Angular's tsconfig.
Co-authored-by: Cursor <cursoragent@cursor.com>
Modern @a2ui/web_core and @angular/cdk subpath exports require bundler
resolution so angular:check-types can resolve the new A2UI imports.
Co-authored-by: Cursor <cursoragent@cursor.com>
Align surface operation normalization and catalog test fixtures with the
RendererProps contract so the changed A2UI web-components pass tsc.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the hand-written types entry from exports["."] so ng-packagr can
generate deterministic published package metadata without warnings.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Implemented audio transcription capabilities with error handling.
- Refactored CopilotChat component to utilize a directive for handling attachments.
- Improved CopilotChatReasoningMessage to manage streaming state and elapsed time more efficiently.
- Added new scroll view component for better message display and auto-scrolling behavior.
- Updated styles for A2UI surface components to enhance layout and scrolling.
- Enhanced tests for OpenGenerativeUIRenderer to ensure proper height measurement.
Apply the common Angular CLI schematics to code which has been added
by Soverius.
We can do a follow-up for the high amount of effects, but we have to be
careful. We need tests first to do a refactoring for that.
## Release monorepo v1.60.2
**Scope:** `monorepo` | **Bump:** `patch`
---
### How this release process works
1. **This PR was created automatically** by the "release / create-pr"
workflow.
It bumped the `monorepo` packages to `1.60.2`
and generated AI-enhanced release notes.
2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
must pass before merging. This is the review gate.
3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.
4. **When this PR is merged**, the `release / publish` workflow
automatically:
- Builds all packages
- Publishes the `monorepo` packages to npm at version `1.60.2`
- Creates git tag `monorepo/v1.60.2`
- Creates a GitHub Release with the final release notes
### Before merging
- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)
---
> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.