Commit Graph

18 Commits

Author SHA1 Message Date
Tyler Slaton a13c3ee663 chore: merge main into PR 5480 2026-06-23 20:50:16 -07:00
Austin Merrick 4ba201b5c4 fix: repair check-types across all packages and gate it in CI
Repairs TypeScript check-types across the monorepo and adds a CI gate so
regressions are caught going forward:

- core: bundler module resolution and strict-mode fixes
- sdk-js: bundler module resolution; keep codegen, formatter, packaging working
- react-core: fixes across components, hooks, and tests
- react-native: restore catch binding referenced by TypeError cause
- runtime: repair check-types and bound AI SDK schema inference
- web-inspector: nodenext import extensions, export Anchor
- remaining packages and node example: assorted check-types repairs
- deps: add missing type-only devDependencies
- license context driven from /info licenseStatus
- ci: run check-types in the static quality workflow

Squashed from 12 commits for a single, easily-revertable change.
2026-06-23 15:26:47 -07:00
Alem Tuzlak 43fdba74aa feat: AG-UI standard interrupt support in useInterrupt + BuiltInAgent
Adds the AG-UI standard interrupt flow (RUN_FINISHED outcome:interrupt + resume array) alongside the legacy on_interrupt path.

- core: forward the standard resume array through runAgent.
- react-core / vue / react-native: useInterrupt handles standard interrupts with resolve()/cancel(), surfaces the primary + full interrupt set, and persists each resolved tool-backed interrupt as a tool-result message so multi-turn conversations stay well-formed (no dangling tool call -> no tool-call loop).
- runtime BuiltInAgent: native interrupts for the aisdk + tanstack factory paths via each SDK's needsApproval primitive (tool-approval-request / CUSTOM approval-requested -> outcome:interrupt); classic interrupt-tool emission + ctx.interrupt() factory primitive; idempotent resume injection mapped to each SDK's native tool-result; getCapabilities advertises humanInTheLoop.interrupts.
- docs: document standard interrupt support.

Verified across core/react-core/runtime unit suites and a real-model multi-turn run on both aisdk and tanstack.
2026-06-23 20:14:17 +02:00
Jordan Ritter 39166deea1 test(react-native): import vitest globals in TypingIndicator testid test
Matches the explicit-import convention used by sibling tests in this
package (e.g. copilot-chat-agentid.test.tsx, streaming-fetch.test.ts).
Removes 3 tsc "Cannot find name 'describe'/'it'/'expect'" errors
without changing runtime behavior — vitest globals already provided
at runtime via vitest.config.mjs (globals: true).
2026-05-30 10:10:38 -07:00
Jordan Ritter f43c3f3f5b feat(ui): add stable testids to error banner and loading indicator
Adds purely additive data-testid markers to the error and loading UI
surfaces across the frontend framework packages (react-core, react-ui,
react-native, angular, vue) so e2e tests can deterministically detect
errored-out vs still-loading states. Without these, e2e probes hit
~30-60s timeouts instead of failing fast.

Testids (aligned with existing repo convention; copilot-<kebab>):
- copilot-error-banner on react-core BannerErrorDisplay (toast
  provider) and UsageBanner, plus react-ui legacy in-chat ErrorMessage.
- copilot-loading-cursor on react-ui legacy LoadingIcon sites
  (Messages.tsx, AssistantMessage.tsx), angular
  CopilotChatMessageViewCursor, react-native TypingIndicator (via
  RN testID convention), and vue CopilotChatMessageView. The v2
  react-core Cursor already exposed this testid; this change broadens
  it to every frontend framework so a single selector works across all.

Vue's prior copilot-chat-cursor testid is renamed to
copilot-loading-cursor for cross-framework consistency; the two e2e
tests in packages/vue that referenced the old name are updated.

No behavior, rendering, or styling changes. Adds small static
source-asserting tests in each touched package that verify the markers
stay in place.
2026-05-30 10:02:26 -07:00
Jordan Ritter 39ec297af4 feat(react-native): wire UI components into package exports and config
Add peer dependencies, export new components and hooks from package entry point, integrate RenderToolProvider into CopilotKitProvider, configure vitest and tsdown, add usage documentation.
2026-05-22 14:26:27 -07:00
Jordan Ritter c7775fed7e feat(react-native): add CopilotChat and CopilotModal components
FlatList-based chat interface and bottom-sheet modal overlay. Includes suggestion pills, keyboard avoidance, custom FlatList support, and comprehensive test coverage.
2026-05-22 14:26:26 -07:00
Jordan Ritter 24db94492b feat(react-native): add useRenderTool hook and RenderToolContext
Hook for rendering custom tool UIs in React Native with a store-based context provider. Includes tests for register/unregister, subscriber notification, and error handling.
2026-05-22 14:26:26 -07:00
Jordan Ritter f99f65f136 feat(react-native): add Markdown, AssistantMessage, UserMessage, and TypingIndicator components
Message bubble components with streaming markdown support, typing indicator animation, and timestamp formatting. Includes unit tests and edge case coverage.
2026-05-22 14:26:26 -07:00
Jordan Ritter b6ad624c94 style: apply formatter to vue package and other unformatted files 2026-05-13 17:06:47 -07:00
Jordan Ritter 47ceb39588 test(react-native): comprehensive test suite — 155 tests across 10 files
useAttachments unit tests, CopilotChat attachment integration,
Popup/Sidebar prop forwarding, headless integration, full
pick-to-submit flow.
2026-05-13 15:39:00 -07:00
Jordan Ritter 20184e1324 feat(react-native): export full v2 API surface with attachment support
15+ type re-exports from headless layer. expo-document-picker and
expo-file-system as optional peer deps. InterruptEvent,
ReactFrontendTool, ReactHumanInTheLoop added to headless.ts.
2026-05-13 15:38:55 -07:00
Jordan Ritter 018a696c05 feat(react-native): add useAttachments hook with NativeFileInput type
React Native attachment hook using expo-document-picker and
expo-file-system. Replaces web FileReader/HTMLInputElement APIs.
2026-05-13 15:38:49 -07:00
Jordan Ritter ec5ef21f9e feat(react-native): add CopilotChat with attachment support and CopilotPopup
CopilotChat: headless chat with useAttachments integration,
useCopilotChatContext hook, submitMessage with InputContent[].
CopilotPopup: floating overlay with FAB, attachment prop forwarding.
2026-05-13 15:38:45 -07:00
Maxim d09618a00e feat(react-native): add CopilotModal and CopilotSidebar components 2026-05-13 15:38:34 -07:00
Maxim 73431de037 fix(react-native): streaming crash fix and agentId consistency
XHR callbacks deferred to JS thread to prevent iOS crash. agentId
prop added for consistency with web SDK. Dynamic headers function
and credentials prop on CopilotKitProvider.
2026-05-13 15:38:30 -07:00
Maxim 31061a1d23 test: add react-native tests and update react-core test imports
93 tests for react-native: streaming-fetch (36), provider (17),
polyfills (20), headless integration (9 provider + error boundary).
Update react-core test vi.mock paths from providers/CopilotKitProvider
to context module. Update useAgent throttle tests for batched
forceUpdate.
2026-05-06 16:42:15 -07:00
Maxim 94c9c1d4c3 feat: add @copilotkit/react-native package
Headless React Native wrapper for CopilotKit. Provides a lightweight
CopilotKitProvider and re-exports platform-agnostic hooks from
react-core without pulling web dependencies (no DOM, CSS, Radix,
Lit, A2UI). Includes XHR-based streaming fetch polyfill for Hermes
and granular polyfills for streams, encoding, crypto, DOM, and
location APIs.
2026-05-06 16:41:51 -07:00