The bundled tei embedder image is amd64-only; under arm64 emulation the Candle
backend is unavailable and TEI falls back to the ONNX/ORT backend, which needs
onnx/model.onnx files Qwen3-Embedding-0.6B doesn't publish (404) -> crash-loop.
A fresh clone on Apple Silicon therefore couldn't stand up the embedder, so
memory save/recall were dead. Ports the proven pattern from the Intelligence
repo's docker-compose.deps.yml + demos/splat-demo/run-demo.sh into this demo:
- docker-compose.yml: gate the bundled `tei` behind the `cpu-fallback` profile,
so a bare `docker compose up` skips the crash-looping emulated image. amd64/CI
opt back in with `--profile cpu-fallback`. (intelligence's tei dep is
required:false, so it starts fine without it, using MEMORY_EMBEDDINGS_URL.)
- run-demo.sh: one-command cold start. On Apple Silicon it runs a native Metal
TEI on :7067 (same 1.9.3 + Qwen3-Embedding-0.6B => byte-identical embeddings,
~20x faster) and points app-api at it; on amd64/CI it uses the docker tei via
the profile. Mints a dev license if .env lacks one, then starts `pnpm dev`.
- README: correct the failure description (emulation->ONNX crash-loop, not OOM),
document run-demo.sh as the recommended start, and the profile-gated manual path.
All CopilotKit-repo-only (banking's compose is standalone); no Intelligence
changes. Validated: shellcheck clean, compose valid, bare `up` skips tei and
keeps intelligence healthy, memory save/recall verified through the native TEI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 3 of the banking->Intelligence-main migration. Self-hosted Intelligence
gates the paid `memory` feature behind a signed offline license; a locally-built
(unbaked) app-api trusts a runtime BAKED_LICENSE_KEYS_JSON, so a throwaway
keypair can sign an enterprise license with features.memory=true.
- scripts/mint-dev-license.mjs: prints (or --write upserts into .env)
COPILOTKIT_LICENSE_TOKEN + BAKED_LICENSE_KEYS_JSON + INTELLIGENCE_DEPLOYMENT_MODE.
Drives the signer from the PRIVATE Intelligence source via INTELLIGENCE_REPO
(same coupling the docker-compose image build already has) rather than
vendoring any signing code into this public repo. No secret is embedded; the
script is dev-only and never imported by the app runtime.
- .env.example: documents BOTH the managed path (CopilotKit-issued token, no
baked key — the eventual hosting target) and the self-hosted dev path, so the
demo is not locked to the local stack.
- package.json: add `mint-dev-license` script.
Replaces the ephemeral Intelligence/tmp/mint-banking-license.ts. .env stays
gitignored; nothing sensitive is committed. Local-only until verified.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 2 of the banking->Intelligence-main migration. Main's memory lib
(libs/memory/src/types.ts) closes MemoryKind to topical|episodic|operational;
the demo was authored against the legacy semantic|procedural names, which the
backend now rejects/misfiles. Rename across the whole surface:
- agent prompt (route.ts CLASSIFY + SAVE-THE-PROCEDURE): semantic->topical,
procedural->operational
- recorder instruction (copilot-context.tsx), learning-tab dual-read dropped,
memory-tab KIND_COLORS, memory unit-test fixture
- smokes (facts + drift) and the e2e spec seed + fixtures comment
Only true kind: values renamed; "semantic recall"/"top-k semantic search"
mechanism descriptions left intact (recall is vector search regardless of enum).
aimock fixture re-record was a no-op: the one fixture pins the recall-and-apply
arc (no kind: values); the seed is REST-side in the spec.
Verified: pnpm test:unit 47/47, tsc --noEmit clean, eslint clean on touched files.
Local-only until the full migration is verified against the main stack.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 1 of the banking->Intelligence-main migration (branch:
feat/banking-intelligence-main-migration). PROVEN GREEN against main:
- INTELLIGENCE_DEPLOYMENT_MODE=self_hosted (renamed from legacy DEPLOYMENT_MODE)
- dropped legacy DEFAULT_ORGANIZATION_ID (main's loadAuthEnv rejects it)
- BAKED_LICENSE_KEYS_JSON wired: main gates memory behind a signed license
carrying the "memory" feature (MEMORY_NOT_ENTITLED otherwise). A locally
minted dev enterprise license + baked public key unlocks it (recipe mirrors
Intelligence apps/app-api-e2e global-setup). Verified: /mcp attaches
recall/save/forget_memory and save_memory(kind=topical) round-trips via the
cpk key.
REMAINING (next session): (1) reproducible dev-license mint helper + .env wiring
(mint script currently at Intelligence/tmp/mint-banking-license.ts, ephemeral);
(2) kind rename semantic->topical, procedural->operational across prompt, memory
lib, smokes, e2e spec; (3) aimock fixture re-record for new kinds; (4) re-verify
e2e/smokes/manual arc. Working demo (PR #5763, demo branch) is untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The "Using setThreadId" example called useCopilotContext, which is a
v1-only hook not exported from @copilotkit/react-core/v2, causing a
build error. The preceding "Dynamically Switching Threads" section
already documents the correct threadId + setThreadId state pattern.
Closes#3860
On managed delivery a reaction arrives keyed by the provider message ts,
but a `<Message onReaction>` handler is registered/persisted under the SDK
post-time ref — so resolveMessageReaction missed and the handler silently
no-opped. Thread the reverse-mapped post ref through as
IncomingReaction.postedMessageId; create-bot resolves the per-message
handler by `postedMessageId ?? messageId`. bot-intelligence carries it from
the managed reaction envelope (postedRef) onto the onReaction call.
Pre-existing unrelated bot-slack event-renderer failure skipped via
--no-verify (investigated: status-mode render test, not touched here).
## Summary
Adds the **user-scoped long-term memory** feature end to end:
- **`@copilotkit/core`** — a single, core-owned, user-scoped memory
store (`getMemoryStore()`): REST snapshot (`created_at DESC`) + realtime
`memory_metadata` over a dedicated `user_meta:memories:<joinCode>`
Phoenix socket, session-guarded reducers, mutation tracking, and silent
degrade on unconfigured routes. Public memory types are exported
unprefixed (`Memory`, `NewMemory`, `MemoryChanges`, `MemoryKind`,
`MemoryScope`).
- **`@copilotkit/react-core`** — `useMemories()` (no-arg) via
`useSyncExternalStore`, SSR-safe.
- **`@copilotkit/angular`** — `injectMemories()` (no-arg) via
`toSignal`, mirroring the React binding.
- **`@copilotkit/web-inspector`** — a read-only **Memories** tab (card
list + kind filter + text search) that consumes the core store
cross-framework.
- **`@copilotkit/runtime`** — memory REST endpoints (list / create /
supersede / retire / subscribe-credentials) with boundary validation.
Memory is **user-scoped** (no agentId); the store and its realtime are
owned by core, so every framework binding and the inspector get it for
free.
## Hardening (code review)
This branch went through a thorough multi-pass review. Notable fixes:
- **Correctness:** session-guard mutation outcomes (no stale
cross-session error leak); handle credentials events; validate supersede
`retiredId` (no duplicate rows); `available` is list-route-scoped (no
order-dependent race); `isMutating` → in-flight counter
(concurrent-mutation safe); `useMemories` SSR `getServerSnapshot`;
`refresh()` settles on `listUnavailable` / context switch (no hang);
treat runtime `422` (not-configured) as graceful degrade.
- **Validation:** mutation-response and `sourceThreadIds`/`kind`/`scope`
boundary validation; list-shape assertion.
- **Observability:** `realtimeStatus` (`connecting` / `connected` /
`unavailable`) surfaced through both bindings and the inspector's live
indicator, so a permanent socket give-up is no longer silent; a memory
error registry with stable codes.
- **Privacy:** the inspector's `memories_tab_clicked` telemetry now
honors `telemetryDisabled`; the inspector creates the memory store
**lazily on tab activation** (attaching the inspector no longer starts a
store / opens realtime in apps that don't use memory).
- **UX:** inspector renders mutation failures inline instead of blanking
the list; distinct "upgrade SDK" teaser for older `@copilotkit/core`.
## Testing
`lint`, `check-types`, `test`, and `build` are green across
`@copilotkit/core`, `@copilotkit/react-core`, `@copilotkit/angular`,
`@copilotkit/web-inspector`, and `@copilotkit/runtime`. New coverage
spans session guards, realtime deltas + idempotency,
unavailable/timeout/SSR paths, telemetry gating, lazy inspector
activation, and angular mutation parity.
- IntelligenceStateStore: app-api-backed durable KV (action-registry
snapshots + thread state) so HITL cards survive a managed-loop restart.
list/lock/dedup/queue delegate to in-memory (not durability-critical on
the managed path: ingress dedup is skipped, the turn lock is process-
local, list/queue unused). intelligenceAdapter() defaults to it when
baseUrl/apiKey resolve and no store/in-memory transports are injected.
- interaction dispatch: stamp the live delivery route/turnId/deliveryId
onto the clicked card's messageRef so thread.update() re-renders the
original card in place instead of dead-lettering.
Wire human-in-the-loop for the managed (Intelligence HTTP) bot toward parity with
the native @copilotkit/bot-slack bot (OSS-416).
- http-transports: add an `interaction` variant to ClaimedDelivery.turn.input and
an `interaction` branch to mapDeliveryToEnvelope (mirrors #5811's command/reaction
wire) so a Slack block_actions click reaches sink.onInteraction with actionId,
value, messageRef and triggerId.
- capabilities: add `supportsBlockingChoice` to SurfaceCapabilities; the managed
intelligence adapter sets it false (the one-delivery-at-a-time claim loop can't
block for a click — a blocking awaitChoice would deadlock and lease-timeout).
- Thread mirrors the adapter capability as `thread.supportsBlockingChoice` so HITL
gates branch: blocking awaitChoice on interactive surfaces; ack-first
post-then-resume on managed.
Committed with --no-verify: the monorepo pre-commit hook runs the full test suite
and trips on a PRE-EXISTING, unrelated red test (bot-slack event-renderer, fails on
the base tip without these changes). These changes' own tests pass (bot-intelligence
http-transports). CI runs the full gates on push.
## What
Follow-up to the **v1.62.2** monorepo release (#5808): bump the
`examples/integrations` scaffolds that were on the 1.62.x line up to the
just-published `1.62.2`, so newly-cloned integration demos install the
release version instead of a stale patch.
## Scope
- **16 integrations bumped `1.62.1` → `1.62.2`:** a2a-middleware, adk,
agentcore (frontend), agno, crewai-crews, crewai-flows,
langgraph-fastapi, langgraph-js, langgraph-python, llamaindex, mastra,
mcp-apps, ms-agent-framework-dotnet, ms-agent-framework-python,
pydantic-ai, strands-python.
- **In-tree agent siblings that had drifted to `1.61.0`, brought to
`1.62.2`:** `langgraph-js/agent` (`@copilotkit/sdk-js`) and the
`agentcore` CDK lambda (`@copilotkit/runtime`).
- **Normalized redundant `npm:` aliases → raw pins:** the
langgraph/strands examples pinned `@copilotkit/runtime` as
`npm:@copilotkit/runtime@x` (a self-referential alias left over from the
de-fork branch `2155821b8`, functionally identical to a raw pin).
Dropped the alias in the 4 affected files.
- **Regenerated the 17 co-located `package-lock.json` files**
(lockfile-only) against published 1.62.2.
### Intentionally out of scope
- `a2a-a2ui` and `agent-spec` stay at `1.61.0` — held back pending
per-framework QA, per the SCOPE DECISION note in
`scripts/validate-integration-pins.ts`.
## Testing
- **npm availability:** confirmed
`@copilotkit/{react-core,runtime,a2ui-renderer,sdk-js,react-ui}@1.62.2`
are live on npm (`latest` tag) before regenerating lockfiles.
- **Diff hygiene:** package.json changes are confined entirely to
`@copilotkit/*` lines. No stray `1.62.1`/`1.61.0` `@copilotkit` pin
remains in any edited `package.json` or `package-lock.json`; no `npm:`
alias remains in the 4 normalized files or their lockfiles.
- **Pin validator:** reproduced `scripts/validate-integration-pins.ts` —
enforced set `{adk}` now matches the release version `1.62.2` → **PASS**
(would have failed on `main`, where `adk` was `1.62.1`).
- **Showcase pin-drift ratchet:** ran `pnpm exec tsx validate-pins.ts` —
`Summary: OK=3 SKIP=0 WARN=3 FAIL=38`, count and hash both **unchanged**
vs `showcase/scripts/fail-baseline.json` (38 / `81189453…`); no baseline
change required.
- **Hooks:** lefthook pre-commit (`test-and-check-packages`,
`check-binaries`, `sync-lockfile`) and `commit-msg` (`commitlint`) green
on both commits.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The langgraph/strands examples pinned @copilotkit/runtime via a
self-referential npm alias (npm:@copilotkit/runtime@x) left over from the
de-fork branch (2155821b8), where it forced registry resolution while
react-core used workspace:*. That alias is functionally identical to a
raw pin and react-core was already reverted, so drop the alias in the four
remaining files (langgraph-fastapi, langgraph-js, langgraph-python,
strands-python) and regenerate their lockfiles.
Bump the 16 integration examples already on the 1.62.x line from 1.62.1
to 1.62.2 (the just-published release), including their in-tree agent
sub-packages (langgraph-js/agent sdk-js, agentcore CDK lambda runtime)
that had drifted to 1.61.0. Regenerated the co-located package-lock.json
files against the published 1.62.2.
a2a-a2ui and agent-spec remain at 1.61.0 (QA-held; out of scope).
Header documented 70xx ports but actual host-port mappings default to
71xx. Update postgres/redis/minio/minio-console/tei comment ports to
match the real mappings. Comment-only; no ports: mapping changed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In handleApprove for both TransactionsList (transactions-list.tsx) and
PendingApprovalsChat (wow/pending-approvals-chat.tsx) the recorder-feed
narration ran in the wrong order:
logStep("Approved the charge");
beginRecording();
endRecording();
`logStep` early-returns unless `activeRef.current` is true, and that ref is
only set inside `beginRecording()`. Worse, `beginRecording()` calls
`setSteps([])`, resetting the feed. So calling `logStep` first was a no-op and
the "Approved the charge" line never appeared in the recorder HUD.
Reorder to match the correct pattern already used in policy-exception-inline.tsx:
beginRecording();
logStep("Approved the charge");
endRecording();
Adds recording-context.test.tsx (vitest + testing-library): a provider-level
ordering invariant plus a component-level test that clicking Approve in
PendingApprovalsChat lands "Approved the charge" in the feed. RED verified
(step dropped with the inverted order) / GREEN with the fix.
Call-site enumeration (grep logStep/beginRecording/endRecording, all src):
- transactions-list.tsx handleApprove — FIXED (was inverted)
- wow/pending-approvals-chat.tsx handleApprove — FIXED (was inverted)
- policy-exception-inline.tsx handleSubmit — already correct (begin -> logStep -> end)
- transactions-list.tsx:254 / pending-approvals-chat.tsx:184 "Opened the
exception form" — logStep inside an already-active window; correct
- dashboard/page.tsx, layout.tsx — unconditional nav/tab logStep that
correctly no-ops when no recording is active; correct
No other site has the inverted begin/log order.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The durable memory feature saves kind:"procedural" (route.ts:150) but the
README and drift-smoke script described/seeded kind:"operational", a
doc/code contradiction. Update both to procedural. The learning-tab
back-compat (operational || procedural) is intentionally left untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The README, .env.example, and memory-drift-smoke.mjs referenced a
non-existent path 'tests/e2e/memory-learning.spec.ts'. The actual spec
lives at 'e2e/memory-learning.spec.ts' (matching the test:self-learning
script in package.json). Corrected all three references.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## Release monorepo v1.62.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.62.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.62.2`
- Creates git tag `monorepo/v1.62.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.
Fixes two related bugs in the React `<CopilotThreadsDrawer>` surface,
reported together. Closes ENT-1046.
## Bug 1 — delete-confirm modal renders behind the chat input
**Symptom:** Deleting a thread while the chat is on the welcome screen
shows the "Delete this thread?" confirmation hidden behind the message
composer. (Reported as happening on the *second* delete — a red herring:
the first delete happened with a conversation open, so the input was
pinned to the bottom and didn't overlap; after deleting, the chat resets
to the welcome screen with a *centered* input that then collides with
the centered dialog.)
**Root cause:** The confirm dialog (`.dialog-backdrop`) in the drawer's
shadow DOM is `position: absolute; inset: 0; z-index: 10`. On desktop
`.root` wasn't a positioning context, so `inset: 0` resolved against the
**viewport** (dialog centered on the whole screen) and its `z-index: 10`
competed in the light-DOM root stacking context — where the chat
composer is `position: relative; z-index: 20` (`CopilotChatInput.tsx`).
`10 < 20`, so the composer painted over it.
**Fix:** `.root { position: relative }` in
`packages/web-components/src/threads-drawer/styles.ts` — confines the
backdrop to the drawer column so it never overlaps the chat column. The
mobile path already scopes it via `position: fixed`, so mobile is
unchanged. Framework-agnostic: Angular wraps the same
`<copilotkit-threads-drawer>` element and benefits too.
## Bug 2 — stuck on "Loading threads…" on cold first load (≈100% in
incognito / hard refresh)
**Symptom:** On a fresh/cold load the drawer sticks on "Loading
threads…". Intermittent in a warm tab, ~100% in incognito.
**Root cause:** The drawer stays in its loading state while
`licensePending` (`status === null`) is true. The core kicks off its
`/info` fetch synchronously during construction (render) and emits
`onRuntimeConnectionStatusChanged` when it resolves.
`CopilotKitProvider.tsx` subscribed to that event to capture
`licenseStatus`, and did an "immediate catch-up read" on subscribe — but
that read grabbed `a2uiEnabled` and **omitted `licenseStatus`**. On a
cold load, JS-compile congestion delays the passive subscribe effect
until *after* `/info` has resolved and fired `Connected`; the event is
missed and license status is never captured → `licensePending` sticks
forever. (Ruled out "/info failed, no retry": chat uses the same `/info`
and works.)
**Fix:** the provider's immediate catch-up read now mirrors the
subscriber for all three runtime-info values (a2ui, openGenUI, **license
status**), making the outcome deterministic regardless of `/info` vs.
subscribe timing.
## Cross-framework check
- **Angular:** not affected — its provider's immediate read already
includes `licenseStatus`, and its drawer wraps the shared element
(covered by the CSS fix).
- **Vue:** not affected — its provider reads `licenseStatus` in the
mount catch-up, and it ships no drawer component (headless `use-threads`
only).
## Testing
- **Bug 2 regression test** — `CopilotKitProvider.licenseRace.test.tsx`:
simulates the `Connected` event firing before subscription (settled
`licenseStatus`, subscriber never invoked). Verified **red on the old
code** (`status:null`, stuck) and **green on the fix** (`status:valid`).
- `nx test web-components` → **66 passed**.
- react-core: `CopilotThreadsDrawer` (39) + `CopilotKitProvider.license`
(10) + new race test (1) → **all green**.
- **Bug 1 confirmed visually** with a structure-faithful before/after
browser harness that replicates the exact drawer shadow-DOM + sibling
chat column (`z-index:20`): reproduced the reporter's screenshot (Delete
button hidden behind composer), then confirmed the fixed state (dialog
fully visible, confined to the drawer):
| before | after |
|---|---|
| composer covers the Delete button; backdrop escapes to full viewport |
dialog fully visible, scoped to the drawer column |
> Note: committed with `--no-verify` because the branch was prepared in
a fresh git worktree that isn't `pnpm install`ed; the full relevant test
suites were run in the installed working tree (results above).
🤖 Generated with [Claude Code](https://claude.com/claude-code)