Commit Graph

242 Commits

Author SHA1 Message Date
David McKay 50bdbf6ac5 fix(angular): support Angular 19-21 install and fix README package name
A fresh Angular 21 setup hit two blockers: a clean install failed with
ERESOLVE, and the README pointed at @copilotkit/angular, which 404s on npm.
Widen the @angular/* peer range to 19-21 and correct the README package name,
install command, and the TS7016 types workaround.
2026-06-09 09:46:25 -05:00
Markus Ecker 319ad44661 fix(angular): disable unlicensed watermark
Gate the Angular SDK's "CopilotKit Unlicensed" watermark and "License
Required" console warning behind a LICENSE_WATERMARK_ENABLED flag set to
false. The watermark implementation is retained for easy re-enablement;
the licenseKey option and its X-CopilotCloud-Public-Api-Key header
injection are unchanged.
2026-06-01 17:59:40 +02:00
Martha Schumann 24d93b52ad fix(react-core): preserve generated thread tool followups 2026-05-27 10:27:29 -07:00
Dusty aa08743c7e fix(core): only reset agent state on actual thread switch (supersedes #4720)
When the chat's connect effect re-fires due to React effect-dep churn, it
calls copilotkit.connectAgent({ agent }) on the same thread again. The
RunHandler previously called agent.setMessages([]), agent.setState({}),
and (transitively) clearReconnectCursor on every such call. That forced
the realtime gateway to replay the topic's full event history on every
churn re-connect — sending the same persisted cpki_event_ids 2-3 times
per thread switch — and produced both halves of Tyler's bug: duplicate
rows in the inspector AG-UI Events tab plus "Message not found" toasts
when the next runAgent fired with an empty agent.messages.

This change makes the orchestrator detect actual thread switches:

- RunHandler tracks _lastConnectedThreadId across connectAgent calls.
  On a fresh restore (different threadId from last call) it does the
  reset and clears the replay cursor. On churn (same threadId) it
  skips the reset entirely so local messages/state are preserved and
  the gateway resumes from lastSeenEventId instead of replaying.

- IntelligenceAgent.connect() no longer auto-clears the cursor;
  cursor management is the caller's decision now. clearReconnectCursor
  is made public so RunHandler (and tests) can call it explicitly.

- ProxiedCopilotRuntimeAgent exposes a clearReplayCursor(threadId)
  method that delegates to the IntelligenceAgent. Non-Intelligence
  runtime modes are a safe no-op.

This supersedes #4720, which attempted to solve only the inspector
duplicate-row symptom by adding a dispatcher dedup. That approach
introduced a blocking regression in the A → B → A restore path: the
dedup persisted across thread switches and suppressed the gateway's
restore replay, leaving agent.messages at [] and triggering the very
"Message not found" toast we were trying to prevent. Mike's review
caught it. The dispatcher dedup is removed entirely; the
orchestrator-level gate is sufficient and a smaller surface change.

Tests:
- intelligence-agent.test.ts: updated 4 tests that codified the old
  "always clear cursor" semantics. Added an explicit test that
  clearReconnectCursor() empties the cursor for the next connect, and
  Mike's regression — replay the same cpki_event_id after A → B → A
  and verify the rehydrate still produces the user message.
- core-connect-thread-switch.test.ts (new): four tests for the
  RunHandler gate covering churn, single switch, A → B → A, and the
  no-clearReplayCursor non-Intelligence path.

All 430 core tests pass.
2026-05-08 14:31:49 -06:00
Max Korp 00fd1dff83 chore(ent-251): bump @copilotkit/license-verifier to 0.2.0
New license verifier release adds a required telemetry_id field to the
signed LicensePayload. Runtime consumes verified payloads unchanged;
shared re-exports the widened type. See the intelligence repo ENT-251
PR for the motivation (per-license analytics correlation ID).
2026-04-22 10:14:01 -07:00
Benjamin Taylor d598a197dd chore(threads): code-review fixups
- Rename sortThreadsByUpdatedAt → sortThreadsByRecency to match the
  lastRunAt-preferring sort introduced in the previous commit.
- useThreads: correct the context-dispatch comment to describe what the
  code actually does (null only when runtimeUrl is absent; transient
  status states leave the previous context in place).
- CopilotChatInput: rewrite the `bottomAnchored` prop doc so the
  layout/positioning distinction is self-evident.
- Add changeset calling out the behavior change to suggestions (now
  hidden while `isRunning`) and summarizing the ENT-314 fixes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 09:42:34 -05:00
Alem Tuzlak a7e7fbeef6 fix: pass urlTransform prop through to ReactMarkdown (#3845)
Closes #1921

The Markdown component accepted `components` but not `urlTransform`,
preventing users from customizing URL sanitization. Added `urlTransform`
as an optional prop with passthrough to `MemoizedReactMarkdown`.

Split from #3838.
2026-04-16 12:20:18 +02:00
Alem Tuzlak 9641933e13 fix: pass toolCallId to useRenderTool render components (#3843)
Closes #3741

Add `toolCallId` prop to all three status branches (InProgress,
Executing, Complete) of the ToolCallRenderer, and update the
`ReactToolCallRenderer` type to include it in the discriminated union.

Split from #3838.
2026-04-16 11:42:45 +02:00
Alem Tuzlak 12dda2dc51 fix: preserve jsonSchema structure in MCP tool parameter extraction (#3846)
Closes #1936

`extractParametersFromSchema` now preserves enum values as structured
data on string parameters, recursively extracts nested object
attributes, and converts object arrays to `object[]` type with
attributes. This ensures complex MCP tool schemas survive the
`Parameter[]` -> Zod conversion without losing nested structure.

Split from #3838.
2026-04-16 11:42:24 +02:00
Jordan Ritter 8faad0a325 fix: remove incorrect changeset file
CopilotKit no longer uses changesets for versioning.
2026-04-15 13:10:39 +02:00
Jordan Ritter 53e6e84af0 chore: add changeset 2026-04-15 13:10:39 +02:00
Jordan Ritter aff9350f17 fix: pass toolCallId to useRenderTool render components (#3741) 2026-04-14 16:24:45 -07:00
Jordan Ritter 3a79f8a6eb chore: add changeset for debug mode feature 2026-04-14 14:58:54 -07:00
Ran Shemtov bdb3498282 chore: add changeset 2026-04-13 14:57:48 +02:00
Ran Shemtov 2448f661ad chore: add changeset 2026-04-13 14:55:54 +02:00
Tyler Slaton ab74b737f0 ci: remove changesets infrastructure
Remove the entire changesets-based release system:
- .changeset/ config directory
- .github/actions/changesets-action/ custom fork (34 files)
- @changesets/assemble-release-plan patch
- @changesets/cli dependency
- Old release and prerelease workflows
- Legacy release scripts (check-allowed, generate-changelog, publish-snapshot)
- Stale paths-ignore entries in CI workflows
2026-04-10 22:20:32 -07:00
github-actions[bot] 087cbae689 chore: version packages 2026-04-10 23:38:59 +00:00
Martha Schumann 07b7cc134d chore: release 1.55.2 2026-04-10 16:34:31 -07:00
Martha Schumann a04f86eb1c chore: add changeset for react-ui layout fix 2026-04-10 15:41:41 -07:00
github-actions[bot] 3e43f35131 chore: version packages (next) 2026-04-10 18:29:58 +00:00
Martha Kelly Schumann 1e3069e423 Merge branch 'main' into fix/CPK-7154-agent-text-wiped-multiple-tool-calls 2026-04-10 07:49:05 -07:00
Tyler Slaton 5f4ca65ba9 chore: add changeset 2026-04-09 23:47:35 -04:00
Martha Kelly Schumann 14d752c6e0 Merge branch 'main' into fix/CPK-7154-agent-text-wiped-multiple-tool-calls 2026-04-09 12:59:36 -07:00
Martha Kelly Schumann 1a61500dda Merge branch 'main' into fix/CPK-7154-agent-text-wiped-multiple-tool-calls 2026-04-09 11:15:55 -07:00
github-actions[bot] 1bc4786759 chore: version packages (next) 2026-04-09 18:09:30 +00:00
Tyler Slaton 62c604213c chore(a2ui-renderer): bump version for a2ui-middleware to 0.0.4
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-09 11:05:10 -07:00
Martha Kelly Schumann 658f6dad3d Merge branch 'main' into fix/CPK-7154-agent-text-wiped-multiple-tool-calls 2026-04-09 10:58:09 -07:00
Tyler Slaton 7efb9ee994 chore(changeset): enter pre-mode
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-09 10:14:18 -07:00
Martha Kelly Schumann f65b841885 Merge branch 'main' into fix/CPK-7154-agent-text-wiped-multiple-tool-calls 2026-04-09 08:03:40 -07:00
Martha Schumann 0ba68318fc Merge branch 'fix/CPK-7154-agent-text-wiped-multiple-tool-calls' of https://github.com/CopilotKit/CopilotKit into fix/CPK-7154-agent-text-wiped-multiple-tool-calls 2026-04-09 07:59:15 -07:00
Martha Schumann 22a7f98bcf fix(react-core): address review feedback on deduplicateMessages
- Fix JSDoc: "while keeping the latest toolCalls" was wrong for the ?? case;
  now says "recovers toolCalls from earlier occurrences if the latest is
  undefined" and notes that [] is treated as intentional
- Add @internal annotation to signal export is for testing only
- Remove redundant AssistantMessage casts inside the role-narrowed branch
- Add missing content assertion to "uses latest content" render test
- Add test: [] toolCalls from later chunk is kept (not fallen back from)
- Add test: undefined content on both sides is handled without error
- Add changeset for @copilotkit/react-core patch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 07:58:52 -07:00
github-actions[bot] 0093bdbaa4 chore: version packages 2026-04-09 02:26:42 +00:00
Tyler Slaton b0a62cd980 chore: release 1.55.1
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 19:16:47 -07:00
github-actions[bot] c2837a3001 chore: version packages (next) 2026-04-09 01:53:20 +00:00
Tyler Slaton e6e8ef83fa chore(changeset): manually add for open-gen-ui fix
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 18:45:58 -07:00
Tyler Slaton 4d3c65d93e chore(changeset): enter pre-mode
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 18:41:47 -07:00
github-actions[bot] 00cace6abf chore: version packages 2026-04-08 23:54:54 +00:00
Tyler Slaton c9609238b1 fix: narrow release plan to publishable packages 2026-04-08 16:14:15 -07:00
Tyler Slaton 100a882ebe fix: repair protected-branch release flow 2026-04-08 15:18:10 -07:00
Tyler Slaton 3c2b4b8879 chore: release 1.55.0
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 13:25:43 -07:00
Markus Ecker 434ccd8691 chore: changeset, dependency bumps, lockfile 2026-04-08 12:51:17 -07:00
Martha Schumann 0e2a6d4c23 chore: add changeset for cli tar bump
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 12:23:20 -07:00
Martha Schumann 1a61be49dc refactor(FOR-75): replace useJsonStable with useShallowStableRef; add unit tests and changeset
- Kill useJsonStable in CopilotChatConfigurationProvider — useShallowStableRef
  is now the single stabilization primitive for both messageView props and labels
- Harden useShallowStableRef with isPlainObject guard so arrays, Dates, and
  class instances are never shallow-compared (reference-only for non-plain objects)
- Remove redundant stableParentLabels — parentConfig?.labels is already stabilized
  by the parent provider's own useShallowStableRef
- Uninstall ts-deepmerge from react-core dependencies (no longer imported anywhere)
- Add unit tests for useShallowStableRef in slots.test.ts (5 tests)
- Add changeset (patch) describing the FOR-75 performance fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:00:19 -07:00
Alem Tuzlak 39b5f671c0 Merge branch 'main' into claude/remove-endpoint-flag-xd3G1 2026-04-07 14:47:09 +02:00
Alem Tuzlak 528979194a chore: add minor changeset for multimodal builtin agent 2026-04-07 14:30:30 +02:00
Ran Shemtov 88fef2afe3 Merge branch 'main' into claude/remove-endpoint-flag-xd3G1 2026-04-06 18:10:10 +02:00
Ran Shemtov 12838ee879 Merge branch 'main' into claude/remove-endpoint-flag-xd3G1 2026-04-06 14:43:14 +02:00
Ran Shemtov 2afc3c380e Merge branch 'main' into claude/explore-agentcore-cli-a25GL 2026-04-06 13:59:33 +02:00
Ran Shemtov 6670cdeb91 Merge branch 'main' into claude/remove-endpoint-flag-xd3G1 2026-04-03 19:06:30 +02:00
Ran Shemtov dc2999a39d chore: add changeset 2026-04-03 19:06:06 +02:00