@copilotkit/react-core 1.61.1 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{copilotkit-UY-H6Kx7.mjs → copilotkit-BtRkFsNR.mjs} +1227 -599
  2. package/dist/copilotkit-BtRkFsNR.mjs.map +1 -0
  3. package/dist/{copilotkit-BCJDP8qd.cjs → copilotkit-CdpDZi3i.cjs} +1219 -585
  4. package/dist/copilotkit-CdpDZi3i.cjs.map +1 -0
  5. package/dist/{copilotkit-CEdu_aie.d.cts → copilotkit-Cga6AHO0.d.cts} +497 -209
  6. package/dist/copilotkit-Cga6AHO0.d.cts.map +1 -0
  7. package/dist/{copilotkit-M1FiciGd.d.mts → copilotkit-DnLpJ2Cl.d.mts} +497 -209
  8. package/dist/copilotkit-DnLpJ2Cl.d.mts.map +1 -0
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +1 -1
  12. package/dist/index.d.cts.map +1 -1
  13. package/dist/index.d.mts +1 -1
  14. package/dist/index.d.mts.map +1 -1
  15. package/dist/index.mjs +1 -1
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/index.umd.js +360 -270
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/v2/context.d.cts +5 -1
  20. package/dist/v2/context.d.cts.map +1 -1
  21. package/dist/v2/context.d.mts +5 -1
  22. package/dist/v2/context.d.mts.map +1 -1
  23. package/dist/v2/headless.cjs +323 -104
  24. package/dist/v2/headless.cjs.map +1 -1
  25. package/dist/v2/headless.d.cts +187 -69
  26. package/dist/v2/headless.d.cts.map +1 -1
  27. package/dist/v2/headless.d.mts +187 -69
  28. package/dist/v2/headless.d.mts.map +1 -1
  29. package/dist/v2/headless.mjs +325 -106
  30. package/dist/v2/headless.mjs.map +1 -1
  31. package/dist/v2/index.cjs +2 -1
  32. package/dist/v2/index.css +1 -1
  33. package/dist/v2/index.d.cts +2 -2
  34. package/dist/v2/index.d.mts +2 -2
  35. package/dist/v2/index.mjs +2 -2
  36. package/dist/v2/index.umd.js +1112 -484
  37. package/dist/v2/index.umd.js.map +1 -1
  38. package/package.json +8 -6
  39. package/dist/copilotkit-BCJDP8qd.cjs.map +0 -1
  40. package/dist/copilotkit-CEdu_aie.d.cts.map +0 -1
  41. package/dist/copilotkit-M1FiciGd.d.mts.map +0 -1
  42. package/dist/copilotkit-UY-H6Kx7.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as react from "react";
2
2
  import React$1, { ComponentType, ReactNode } from "react";
3
3
  import { CopilotKitCore, CopilotKitCoreConfig, CopilotKitCoreErrorCode, CopilotKitCoreSubscriber, CopilotKitCoreSubscription, DynamicSuggestionsConfig, FrontendTool, StaticSuggestionsConfig, Suggestion, ToolCallStatus } from "@copilotkit/core";
4
- import { AbstractAgent, RunAgentResult } from "@ag-ui/client";
4
+ import { AbstractAgent, Interrupt, ResumeEntry, RunAgentResult } from "@ag-ui/client";
5
5
  import { Action, Attachment, Attachment as Attachment$1, AttachmentModality, AttachmentsConfig, AttachmentsConfig as AttachmentsConfig$1, CopilotCloudConfig, CopilotErrorHandler, CopilotKitError, DebugConfig, FunctionCallHandler, InferSchemaOutput, InputContentSource, MappedParameterTypes, Parameter, StandardSchemaV1 } from "@copilotkit/shared";
6
6
  import * as react_jsx_runtime0 from "react/jsx-runtime";
7
7
  import { Streamdown } from "streamdown";
@@ -543,7 +543,74 @@ interface CopilotChatConfigurationValue {
543
543
  threadId: string;
544
544
  isModalOpen: boolean;
545
545
  setModalOpen: (open: boolean) => void;
546
+ /**
547
+ * Whether the thread-list drawer is open. A sibling boolean to `isModalOpen`
548
+ * (deliberately NOT folded into a tri-state enum): on desktop the chat modal
549
+ * and the drawer coexist, so two independent booleans are required.
550
+ */
551
+ drawerOpen: boolean;
552
+ /**
553
+ * Toggles the drawer open state. On mobile viewports (`<768px`) opening the
554
+ * drawer closes the chat modal (mutual exclusion); on desktop there is no
555
+ * constraint.
556
+ */
557
+ setDrawerOpen: (open: boolean) => void;
558
+ /**
559
+ * True once a `<CopilotThreadsDrawer>` wrapper has registered itself with this chat
560
+ * configuration. The header thread-list launcher renders ONLY when this is
561
+ * set, so chats with no drawer stay byte-for-byte unchanged.
562
+ */
563
+ drawerRegistered: boolean;
564
+ /**
565
+ * Called by the drawer wrapper on mount to announce its presence (and flip
566
+ * `drawerRegistered`). Returns a cleanup function that de-registers the
567
+ * drawer on unmount.
568
+ *
569
+ * @returns A cleanup callback that reverses the registration.
570
+ */
571
+ registerDrawer: () => () => void;
572
+ /**
573
+ * Internal: registers the modal-close setter of the provider that actually
574
+ * owns the rendered modal (a descendant that supplied `isModalDefaultOpen`),
575
+ * so the drawer's mobile mutual-exclusion — owned by the top-most provider —
576
+ * closes the modal that is genuinely on screen rather than the top-most
577
+ * provider's own (possibly unrendered) modal state.
578
+ *
579
+ * @param closeModal - A setter the drawer may call to close the rendered modal.
580
+ * @returns A cleanup callback that de-registers the closer.
581
+ */
582
+ ɵregisterModalCloser: (closeModal: (open: boolean) => void) => () => void;
546
583
  hasExplicitThreadId: boolean;
584
+ /**
585
+ * Imperatively sets the active thread for this chat configuration.
586
+ *
587
+ * Use this to drive the rendered thread without a host callback — e.g. a
588
+ * `<CopilotThreadsDrawer>` selecting a thread row sets it explicitly so the chat
589
+ * connects to that backend thread.
590
+ *
591
+ * Guarded like the top-level `<CopilotKit>` provider's `setThreadId`: when
592
+ * the consumer controls the threadId via the `threadId` prop on this
593
+ * provider, this is a no-op (a warning is logged) so a prop-controlled
594
+ * threadId is never silently overridden.
595
+ *
596
+ * @param threadId - The thread id to make active.
597
+ * @param options.explicit - Whether the thread is a caller choice. Defaults
598
+ * to `true` (a picked thread). Pass `false` to set a non-explicit thread
599
+ * so the welcome screen shows (see {@link startNewThread}).
600
+ */
601
+ setActiveThreadId: (threadId: string, options?: {
602
+ explicit?: boolean;
603
+ }) => void;
604
+ /**
605
+ * Resets the active thread to a fresh, non-explicit client-side thread: a
606
+ * newly minted UUID with `hasExplicitThreadId=false`, so the welcome screen
607
+ * shows. Pairs with the core `startNewThread()` to clear the conversation
608
+ * with no host wiring.
609
+ *
610
+ * Guarded identically to {@link setActiveThreadId}: a no-op when the
611
+ * threadId is prop-controlled.
612
+ */
613
+ startNewThread: () => void;
547
614
  }
548
615
  interface CopilotChatConfigurationProviderProps {
549
616
  children: ReactNode;
@@ -1130,7 +1197,7 @@ type CopilotChatViewProps = WithSlots<{
1130
1197
  * className string, a props object, or a replacement component.
1131
1198
  */
1132
1199
  intelligenceIndicator?: SlotValue<typeof IntelligenceIndicatorView>;
1133
- } & React$1.HTMLAttributes<HTMLDivElement>>;
1200
+ } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "inputMode">>;
1134
1201
  declare function CopilotChatView({
1135
1202
  messageView,
1136
1203
  input,
@@ -1242,15 +1309,31 @@ declare const CopilotChatToggleButton: React$1.ForwardRefExoticComponent<Copilot
1242
1309
  type HeaderSlots = {
1243
1310
  titleContent: typeof CopilotModalHeader.Title;
1244
1311
  closeButton: typeof CopilotModalHeader.CloseButton;
1312
+ drawerLauncher: typeof CopilotModalHeader.DrawerLauncher;
1245
1313
  };
1246
1314
  type HeaderRestProps = {
1247
1315
  title?: string;
1248
1316
  } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children">;
1249
- type CopilotModalHeaderProps = WithSlots<HeaderSlots, HeaderRestProps>;
1317
+ /**
1318
+ * Payload handed to the optional `children` render function. `drawerLauncher`
1319
+ * is nullable because the launcher is rendered only when a drawer has
1320
+ * registered — when none is present, custom layouts receive `null` and can omit
1321
+ * the launcher slot entirely.
1322
+ */
1323
+ type HeaderChildrenPayload = {
1324
+ titleContent: React$1.ReactElement;
1325
+ closeButton: React$1.ReactElement;
1326
+ drawerLauncher: React$1.ReactElement | null;
1327
+ title?: string;
1328
+ } & Omit<HeaderRestProps, "title">;
1329
+ type CopilotModalHeaderProps = Omit<WithSlots<HeaderSlots, HeaderRestProps>, "children"> & {
1330
+ children?: (props: HeaderChildrenPayload) => React$1.ReactNode;
1331
+ };
1250
1332
  declare function CopilotModalHeader({
1251
1333
  title,
1252
1334
  titleContent,
1253
1335
  closeButton,
1336
+ drawerLauncher,
1254
1337
  children,
1255
1338
  className,
1256
1339
  ...rest
@@ -1261,6 +1344,13 @@ declare namespace CopilotModalHeader {
1261
1344
  declare namespace CopilotModalHeader {
1262
1345
  const Title: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
1263
1346
  const CloseButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
1347
+ /**
1348
+ * The thread-list launcher button. Rendered in the header ONLY when a
1349
+ * `<CopilotThreadsDrawer>` wrapper has registered with the chat configuration; it
1350
+ * toggles the drawer open state. The stable `data-testid` is the focus-return
1351
+ * target for the drawer wrapper on cancel/back/backdrop/Escape.
1352
+ */
1353
+ const DrawerLauncher: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
1264
1354
  }
1265
1355
  //#endregion
1266
1356
  //#region src/v2/components/chat/CopilotSidebarView.d.ts
@@ -1366,6 +1456,320 @@ declare namespace CopilotPopup {
1366
1456
  var displayName: string;
1367
1457
  }
1368
1458
  //#endregion
1459
+ //#region src/v2/hooks/use-threads.d.ts
1460
+ /**
1461
+ * A conversation thread managed by the Intelligence platform.
1462
+ *
1463
+ * Each thread has a unique `id`, an optional human-readable `name`, and
1464
+ * timestamp fields tracking creation and update times.
1465
+ */
1466
+ interface Thread {
1467
+ id: string;
1468
+ agentId: string;
1469
+ name: string | null;
1470
+ archived: boolean;
1471
+ createdAt: string;
1472
+ updatedAt: string;
1473
+ /**
1474
+ * ISO-8601 timestamp of the most recent agent run on this thread. Absent
1475
+ * when the thread has never been run. Prefer this over `updatedAt` for
1476
+ * user-facing "last activity" displays — it is not bumped by metadata-only
1477
+ * actions like rename or archive.
1478
+ */
1479
+ lastRunAt?: string;
1480
+ }
1481
+ /**
1482
+ * Configuration for the {@link useThreads} hook.
1483
+ *
1484
+ * Thread operations are scoped to the runtime-authenticated user and the
1485
+ * provided agent on the Intelligence platform.
1486
+ */
1487
+ interface UseThreadsInput {
1488
+ /** The ID of the agent whose threads to list and manage. */
1489
+ agentId: string;
1490
+ /** When `true`, archived threads are included in the list. Defaults to `false`. */
1491
+ includeArchived?: boolean;
1492
+ /** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */
1493
+ limit?: number;
1494
+ /**
1495
+ * When `false`, the hook stays inert: no runtime context is dispatched, so
1496
+ * NO thread-list fetch or realtime subscription is issued. Used by gated
1497
+ * surfaces (e.g. an unlicensed `<CopilotThreadsDrawer>`) that must not touch the
1498
+ * network until the gate opens. Defaults to `true`.
1499
+ *
1500
+ * Flipping `enabled` back to `true` resumes normal fetching on the next
1501
+ * effect run; mutations are likewise short-circuited while disabled.
1502
+ */
1503
+ enabled?: boolean;
1504
+ }
1505
+ /**
1506
+ * Return value of the {@link useThreads} hook.
1507
+ *
1508
+ * The `threads` array is kept in sync with the platform via a realtime
1509
+ * WebSocket subscription (when available) and is sorted most-recently-updated
1510
+ * first. Mutations reject with an `Error` if the platform request fails.
1511
+ */
1512
+ interface UseThreadsResult {
1513
+ /**
1514
+ * Threads for the current user/agent pair, sorted by most recently
1515
+ * updated first. Updated in realtime when the platform pushes metadata
1516
+ * events. Includes archived threads only when `includeArchived` is set.
1517
+ */
1518
+ threads: Thread[];
1519
+ /**
1520
+ * `true` while the initial thread list is being fetched from the platform.
1521
+ * Subsequent realtime updates do not re-enter the loading state.
1522
+ */
1523
+ isLoading: boolean;
1524
+ /**
1525
+ * The most recent error from fetching threads or executing a mutation,
1526
+ * or `null` when there is no error. Reset to `null` on the next
1527
+ * successful fetch.
1528
+ *
1529
+ * This channel folds together developer/config errors (missing runtime URL,
1530
+ * runtime without thread endpoints) and genuine list-load/mutation failures.
1531
+ * End-user surfaces that must not leak config errors should prefer
1532
+ * {@link listError}, which excludes the config/runtime-setup errors.
1533
+ */
1534
+ error: Error | null;
1535
+ /**
1536
+ * The most recent genuine list-load or mutation error from the platform, or
1537
+ * `null`. Unlike {@link error}, this EXCLUDES developer/config errors (a
1538
+ * missing runtime URL, or a runtime that does not advertise thread
1539
+ * endpoints), so an end-user surface can render it directly without leaking
1540
+ * a developer-facing configuration message into the UI.
1541
+ */
1542
+ listError: Error | null;
1543
+ /**
1544
+ * `true` when there are more threads available to fetch via
1545
+ * {@link fetchMoreThreads}. Only meaningful when `limit` is set.
1546
+ */
1547
+ hasMoreThreads: boolean;
1548
+ /**
1549
+ * `true` while a subsequent page of threads is being fetched.
1550
+ */
1551
+ isFetchingMoreThreads: boolean;
1552
+ /**
1553
+ * `true` while at least one thread mutation (rename, archive, unarchive,
1554
+ * delete) is awaiting a server response. Mutations apply optimistically, so
1555
+ * this is primarily useful for disabling controls or showing a subtle
1556
+ * in-flight indicator.
1557
+ */
1558
+ isMutating: boolean;
1559
+ /**
1560
+ * Fetch the next page of threads. No-op when {@link hasMoreThreads} is
1561
+ * `false` or a fetch is already in progress.
1562
+ */
1563
+ fetchMoreThreads: () => void;
1564
+ /**
1565
+ * Re-fetch the thread list from the platform without clearing the current
1566
+ * list. Backs the drawer's error-state Retry and the Active/All filter
1567
+ * refetch. No-op until the runtime is connected.
1568
+ */
1569
+ refetchThreads: () => void;
1570
+ /**
1571
+ * Reset to a fresh, non-explicit client-side thread so the welcome screen
1572
+ * shows. Lazy creation: no row appears in {@link threads} until the new
1573
+ * thread's first run persists server-side.
1574
+ */
1575
+ startNewThread: () => void;
1576
+ /**
1577
+ * Rename a thread on the platform.
1578
+ * Resolves when the server confirms the update; rejects on failure.
1579
+ */
1580
+ renameThread: (threadId: string, name: string) => Promise<void>;
1581
+ /**
1582
+ * Archive a thread on the platform.
1583
+ * Archived threads are excluded from subsequent list results.
1584
+ * Resolves when the server confirms the update; rejects on failure.
1585
+ */
1586
+ archiveThread: (threadId: string) => Promise<void>;
1587
+ /**
1588
+ * Restore a previously archived thread on the platform.
1589
+ * The thread re-appears in default (non-archived) list results.
1590
+ * Resolves when the server confirms the update; rejects on failure.
1591
+ */
1592
+ unarchiveThread: (threadId: string) => Promise<void>;
1593
+ /**
1594
+ * Permanently delete a thread from the platform.
1595
+ * This is irreversible. Resolves when the server confirms deletion;
1596
+ * rejects on failure.
1597
+ */
1598
+ deleteThread: (threadId: string) => Promise<void>;
1599
+ }
1600
+ /**
1601
+ * React hook for listing and managing Intelligence platform threads.
1602
+ *
1603
+ * On mount the hook fetches the thread list for the runtime-authenticated user
1604
+ * and the given `agentId`. When the Intelligence platform exposes a WebSocket
1605
+ * URL, it also opens a realtime subscription so the `threads` array stays
1606
+ * current without polling — thread creates, renames, archives, and deletes
1607
+ * from any client are reflected immediately.
1608
+ *
1609
+ * Mutation methods (`renameThread`, `archiveThread`, `unarchiveThread`,
1610
+ * `deleteThread`) return promises that resolve once the platform confirms the
1611
+ * operation and reject with an `Error` on failure.
1612
+ *
1613
+ * @param input - Agent identifier and optional list controls.
1614
+ * @returns Thread list state and stable mutation callbacks.
1615
+ *
1616
+ * @example
1617
+ * ```tsx
1618
+ * import { useThreads } from "@copilotkit/react-core";
1619
+ *
1620
+ * function ThreadList() {
1621
+ * const { threads, isLoading, renameThread, deleteThread } = useThreads({
1622
+ * agentId: "agent-1",
1623
+ * });
1624
+ *
1625
+ * if (isLoading) return <p>Loading…</p>;
1626
+ *
1627
+ * return (
1628
+ * <ul>
1629
+ * {threads.map((t) => (
1630
+ * <li key={t.id}>
1631
+ * {t.name ?? "Untitled"}
1632
+ * <button onClick={() => renameThread(t.id, "New name")}>Rename</button>
1633
+ * <button onClick={() => deleteThread(t.id)}>Delete</button>
1634
+ * </li>
1635
+ * ))}
1636
+ * </ul>
1637
+ * );
1638
+ * }
1639
+ * ```
1640
+ */
1641
+ declare function useThreads({
1642
+ agentId,
1643
+ includeArchived,
1644
+ limit,
1645
+ enabled
1646
+ }: UseThreadsInput): UseThreadsResult;
1647
+ //#endregion
1648
+ //#region src/v2/components/chat/CopilotThreadsDrawer.d.ts
1649
+ /**
1650
+ * Per-row content render function. Receives a thread and returns the React
1651
+ * node to project into the element's `slot="row:{id}"`. Returning `null`
1652
+ * (or omitting the prop) falls back to the element's built-in row name.
1653
+ */
1654
+ type CopilotThreadsDrawerRowRenderer = (thread: Thread) => React$1.ReactNode;
1655
+ /**
1656
+ * Props for {@link CopilotThreadsDrawer}.
1657
+ *
1658
+ * The drawer is a thin controller around the framework-agnostic
1659
+ * `<copilotkit-threads-drawer>` custom element. It feeds the element domain data
1660
+ * (threads/loading/error from {@link useThreads}, the active thread from the
1661
+ * chat configuration) and routes the element's outbound DOM events back into
1662
+ * core thread operations and chat-configuration changes.
1663
+ */
1664
+ interface CopilotThreadsDrawerProps {
1665
+ /**
1666
+ * The agent whose threads to list and manage. Defaults to the agent of the
1667
+ * surrounding chat configuration, or the platform default when none is set.
1668
+ */
1669
+ agentId?: string;
1670
+ /**
1671
+ * Optional escape-hatch called when the user picks a thread row. The wrapper
1672
+ * additionally focuses the chat input. When omitted, the wrapper drives the
1673
+ * surrounding chat configuration directly (`setActiveThreadId`), so a bare
1674
+ * `<CopilotThreadsDrawer>` switches the rendered thread with no host wiring. Provide
1675
+ * this only to take control of the active thread yourself (e.g. a v1
1676
+ * `setThreadId`); when provided it is preferred over the provider.
1677
+ */
1678
+ onThreadSelect?: (threadId: string) => void;
1679
+ /**
1680
+ * Optional escape-hatch called when the user starts a new thread (the
1681
+ * element's "+ New" button). The wrapper always resets the core thread store
1682
+ * to a fresh, non-explicit client-side thread (`startNewThread`). When this
1683
+ * is omitted, the wrapper also resets the surrounding chat configuration to a
1684
+ * fresh non-explicit thread (`startNewThread`) so the welcome screen shows
1685
+ * with no host wiring. Provide this only to clear your own active thread;
1686
+ * when provided it is preferred over the provider.
1687
+ */
1688
+ onNewThread?: () => void;
1689
+ /** Called when the Upgrade CTA is clicked. */
1690
+ onLicensed?: () => void;
1691
+ /**
1692
+ * Destination the locked view's Upgrade CTA opens in a new tab. Defaults to
1693
+ * the element's built-in CopilotKit Intelligence docs URL when omitted. Set
1694
+ * to an empty string to suppress the default navigation and handle the click
1695
+ * yourself via `onLicensed`.
1696
+ */
1697
+ licenseUrl?: string;
1698
+ /**
1699
+ * Optional per-row content. Rendered as light-DOM children with
1700
+ * `slot="row:{id}"` so the element projects them in place of the default
1701
+ * row name. Return `null` for a given row to keep the element's default.
1702
+ */
1703
+ renderRow?: CopilotThreadsDrawerRowRenderer;
1704
+ /**
1705
+ * Accessible + default-header label for the drawer region. Sets the custom
1706
+ * element's `aria-label` and the default header text (shown when no
1707
+ * `slot="header"` content is projected). Defaults to the element's built-in
1708
+ * `"Threads"` when omitted.
1709
+ */
1710
+ label?: string;
1711
+ /**
1712
+ * Page size for thread pagination. When set, threads are fetched in pages of
1713
+ * this size and the drawer shows a "Load more" control while more remain.
1714
+ * When omitted, the full list loads at once and no pagination control shows.
1715
+ */
1716
+ limit?: number;
1717
+ /**
1718
+ * `data-testid` set on the underlying custom element (handy in tests and for
1719
+ * targeting from a host page). Defaults to `"copilot-threads-drawer"`.
1720
+ */
1721
+ "data-testid"?: string;
1722
+ }
1723
+ /**
1724
+ * React wrapper for the shadow-DOM `<copilotkit-threads-drawer>` threads drawer.
1725
+ *
1726
+ * Responsibilities:
1727
+ * - Registers the custom element on the client (SSR-safe; nothing renders
1728
+ * during prerender to avoid hydration mismatch).
1729
+ * - Feeds the element domain data: `threads`, `loading`, `error`,
1730
+ * `activeThreadId`, `licensed`, fetch-more state.
1731
+ * - Routes the element's nine outbound events to core thread operations
1732
+ * ({@link useThreads}) and chat-configuration changes.
1733
+ * - Registers with the surrounding chat configuration so the header
1734
+ * thread-list launcher appears, and binds the element `open` state to the
1735
+ * configuration's `drawerOpen`.
1736
+ *
1737
+ * License gating is two-pronged: the locked view shows when no license is configured
1738
+ * (the runtime reported no license status) OR the `threads` feature is
1739
+ * explicitly unlicensed. While unlicensed, the thread fetch is skipped entirely
1740
+ * so an unlicensed drawer issues no network requests.
1741
+ *
1742
+ * Thread switching needs no host wiring: when `onThreadSelect`/`onNewThread`
1743
+ * are omitted, the wrapper drives the surrounding chat configuration directly
1744
+ * ({@link CopilotChatConfigurationValue.setActiveThreadId} /
1745
+ * {@link CopilotChatConfigurationValue.startNewThread}), so a bare drawer
1746
+ * connects to the picked thread and shows the welcome screen on "+ New". Pass
1747
+ * the callbacks only to take control yourself.
1748
+ *
1749
+ * @example
1750
+ * ```tsx
1751
+ * // Callback-free: the drawer drives the chat configuration itself.
1752
+ * <CopilotKitProvider runtimeUrl="/api/copilotkit" publicLicenseKey="ck_pub_...">
1753
+ * <CopilotChat />
1754
+ * <CopilotThreadsDrawer />
1755
+ * </CopilotKitProvider>
1756
+ * ```
1757
+ */
1758
+ declare function CopilotThreadsDrawer({
1759
+ agentId,
1760
+ onThreadSelect,
1761
+ onNewThread,
1762
+ onLicensed,
1763
+ licenseUrl,
1764
+ renderRow,
1765
+ label,
1766
+ limit,
1767
+ "data-testid": dataTestId
1768
+ }: CopilotThreadsDrawerProps): React$1.ReactElement | null;
1769
+ declare namespace CopilotThreadsDrawer {
1770
+ var displayName: string;
1771
+ }
1772
+ //#endregion
1369
1773
  //#region src/v2/components/chat/CopilotChatAttachmentQueue.d.ts
1370
1774
  interface CopilotChatAttachmentQueueProps {
1371
1775
  attachments: Attachment[];
@@ -1499,7 +1903,11 @@ declare function useRenderCustomMessages(): ((params: UseRenderCustomMessagesPar
1499
1903
  //#region src/v2/types/react-tool-call-renderer.d.ts
1500
1904
  interface ReactToolCallRenderer<T = unknown> {
1501
1905
  name: string;
1502
- args: StandardSchemaV1<any, T>;
1906
+ /**
1907
+ * Schema describing the tool arguments. Optional — renderers registered for
1908
+ * tools without parameters (e.g. HITL confirm dialogs) have no schema.
1909
+ */
1910
+ args?: StandardSchemaV1<any, T>;
1503
1911
  /**
1504
1912
  * Optional agent ID to constrain this tool renderer to a specific agent.
1505
1913
  * If specified, this renderer will only be used for the specified agent.
@@ -1644,18 +2052,49 @@ declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
1644
2052
  }): ReactToolCallRenderer<InferSchemaOutput<S>>;
1645
2053
  //#endregion
1646
2054
  //#region src/v2/types/interrupt.d.ts
2055
+ /** Legacy custom-event interrupt payload (agent emits a custom `on_interrupt` event). */
1647
2056
  interface InterruptEvent<TValue = unknown> {
1648
2057
  name: string;
1649
2058
  value: TValue;
1650
2059
  }
2060
+ /**
2061
+ * Resolve the agent with user input for an interrupt.
2062
+ *
2063
+ * - Standard interrupts: records `{ status: "resolved", payload }` for the target
2064
+ * interrupt (defaults to the primary one). Resumes once every open interrupt is
2065
+ * addressed; returns the resume run result, or `void` while still awaiting others.
2066
+ * - Legacy interrupts: resumes immediately via `command.resume = payload`.
2067
+ */
2068
+ type InterruptResolveFn = (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
2069
+ /**
2070
+ * Cancel an interrupt.
2071
+ *
2072
+ * - Standard interrupts: records `{ status: "cancelled" }` for the target interrupt
2073
+ * (defaults to the primary one), then resumes once all are addressed.
2074
+ * - Legacy interrupts: dismisses the pending interrupt without resuming.
2075
+ */
2076
+ type InterruptCancelFn = (interruptId?: string) => Promise<RunAgentResult | void>;
1651
2077
  interface InterruptHandlerProps<TValue = unknown> {
2078
+ /**
2079
+ * Legacy event shape (`{ name, value }`). Always present for back-compat: for
2080
+ * standard interrupts, `value` is the primary `Interrupt` and `name` is `"on_interrupt"`.
2081
+ * Prefer `interrupt` / `interrupts` for standard interrupts.
2082
+ */
1652
2083
  event: InterruptEvent<TValue>;
1653
- resolve: (response: unknown) => Promise<RunAgentResult>;
2084
+ /** Primary standard interrupt (`interrupts[0]`), or `null` for legacy interrupts. */
2085
+ interrupt: Interrupt | null;
2086
+ /** All open standard interrupts (empty array for legacy interrupts). */
2087
+ interrupts: Interrupt[];
2088
+ resolve: InterruptResolveFn;
2089
+ cancel: InterruptCancelFn;
1654
2090
  }
1655
2091
  interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
1656
2092
  event: InterruptEvent<TValue>;
2093
+ interrupt: Interrupt | null;
2094
+ interrupts: Interrupt[];
1657
2095
  result: TResult;
1658
- resolve: (response: unknown) => Promise<RunAgentResult>;
2096
+ resolve: InterruptResolveFn;
2097
+ cancel: InterruptCancelFn;
1659
2098
  }
1660
2099
  //#endregion
1661
2100
  //#region src/v2/types/sandbox-function.d.ts
@@ -1727,7 +2166,7 @@ type InferRenderProps<T> = T extends StandardSchemaV1 ? InferSchemaOutput<T> : a
1727
2166
  * );
1728
2167
  * ```
1729
2168
  */
1730
- declare function useComponent<TSchema extends StandardSchemaV1 | undefined = undefined>(config: {
2169
+ declare function useComponent<TSchema extends StandardSchemaV1<any, Record<string, unknown>> | undefined = undefined>(config: {
1731
2170
  name: string;
1732
2171
  description?: string;
1733
2172
  parameters?: TSchema;
@@ -1982,230 +2421,57 @@ interface UseInterruptConfigBase<TValue = unknown, TResult = never> {
1982
2421
  /**
1983
2422
  * Render function for the interrupt UI.
1984
2423
  *
1985
- * This is called once an interrupt is finalized and accepted by `enabled` (if provided).
1986
- * Use `resolve` from render props to resume the agent run with user input.
2424
+ * Receives both the standard `interrupt`/`interrupts` and the legacy `event`.
2425
+ * Call `resolve(payload)` to resume with user input, or `cancel()` to cancel.
1987
2426
  */
1988
2427
  render: (props: InterruptRenderProps<TValue, InterruptResult<TValue, TResult>>) => React$1.ReactElement;
1989
2428
  /**
1990
2429
  * Optional pre-render handler invoked when an interrupt is received.
1991
- *
1992
- * Return either a sync value or an async value to pass into `render` as `result`.
2430
+ * Return a sync or async value to expose as `result` in `render`.
1993
2431
  * Rejecting/throwing falls back to `result = null`.
1994
2432
  */
1995
2433
  handler?: InterruptHandlerFn<TValue, TResult>;
1996
2434
  /**
1997
- * Optional predicate to filter which interrupts should be handled by this hook.
1998
- * Return `false` to ignore an interrupt.
2435
+ * Optional predicate to filter which interrupts this hook handles.
2436
+ * Receives the legacy-compatible event (for standard interrupts, `value` is
2437
+ * the primary `Interrupt`). Return `false` to ignore.
1999
2438
  */
2000
2439
  enabled?: (event: InterruptEvent<TValue>) => boolean;
2001
2440
  /** Optional agent id. Defaults to the current configured chat agent. */
2002
2441
  agentId?: string;
2003
2442
  }
2004
2443
  type UseInterruptConfig<TValue = unknown, TResult = never, TRenderInChat extends InterruptRenderInChat = undefined> = UseInterruptConfigBase<TValue, TResult> & {
2005
- /** When true (default), the interrupt UI renders inside `<CopilotChat>` automatically. Set to false to render it yourself. */renderInChat?: TRenderInChat;
2444
+ /** When true (default), the interrupt UI renders inside `<CopilotChat>` automatically. */renderInChat?: TRenderInChat;
2006
2445
  };
2007
2446
  /**
2008
- * Handles agent interrupts (`on_interrupt`) with optional filtering, preprocessing, and resume behavior.
2009
- *
2010
- * The hook listens to custom events on the active agent, stores interrupt payloads per run,
2011
- * and surfaces a render callback once the run finalizes. Call `resolve` from your UI to resume
2012
- * execution with user-provided data.
2013
- *
2014
- * - `renderInChat: true` (default): the element is published into `<CopilotChat>` and this hook returns `void`.
2015
- * - `renderInChat: false`: the hook returns the interrupt element so you can place it anywhere in your component tree.
2016
- *
2017
- * `event.value` is typed as `any` since the interrupt payload shape depends on your agent.
2018
- * Type-narrow it in your callbacks (e.g. `handler`, `enabled`, `render`) as needed.
2019
- *
2020
- * @typeParam TResult - Inferred from `handler` return type. Exposed as `result` in `render`.
2021
- * @param config - Interrupt configuration (renderer, optional handler/filter, and render mode).
2022
- * @returns When `renderInChat` is `false`, returns the interrupt element (or `null` when idle).
2023
- * Otherwise returns `void` and publishes the element into chat. In `render`, `result` is always
2024
- * either the handler's resolved return value or `null` (including when no handler is provided,
2025
- * when filtering skips the interrupt, or when handler execution fails).
2447
+ * Handles agent interrupts with optional filtering, preprocessing, and resume behavior.
2026
2448
  *
2027
- * @example
2028
- * ```tsx
2029
- * import { useInterrupt } from "@copilotkit/react-core/v2";
2030
- *
2031
- * function InterruptUI() {
2032
- * useInterrupt({
2033
- * render: ({ event, resolve }) => (
2034
- * <div>
2035
- * <p>{event.value.question}</p>
2036
- * <button onClick={() => resolve({ approved: true })}>Approve</button>
2037
- * <button onClick={() => resolve({ approved: false })}>Reject</button>
2038
- * </div>
2039
- * ),
2040
- * });
2449
+ * Supports both the AG-UI standard interrupt flow (`RUN_FINISHED` with
2450
+ * `outcome.type === "interrupt"`) and the legacy custom-event flow
2451
+ * (`on_interrupt`). For standard interrupts, `render` receives `interrupt`
2452
+ * (the primary one) and `interrupts` (the full open set); call `resolve(payload)`
2453
+ * to resume or `cancel()` to cancel. Resuming addresses the targeted interrupt
2454
+ * and, once every open interrupt is addressed, submits a single spec `resume`
2455
+ * array via `copilotkit.runAgent`.
2041
2456
  *
2042
- * return null;
2043
- * }
2044
- * ```
2457
+ * - `renderInChat: true` (default): the element is published into `<CopilotChat>`; returns `void`.
2458
+ * - `renderInChat: false`: the hook returns the interrupt element for manual placement.
2045
2459
  *
2046
2460
  * @example
2047
2461
  * ```tsx
2048
- * import { useInterrupt } from "@copilotkit/react-core/v2";
2049
- *
2050
- * function CustomPanel() {
2051
- * const interruptElement = useInterrupt({
2052
- * renderInChat: false,
2053
- * enabled: (event) => event.value.startsWith("approval:"),
2054
- * handler: async ({ event }) => ({ label: event.value.toUpperCase() }),
2055
- * render: ({ event, result, resolve }) => (
2056
- * <aside>
2057
- * <strong>{result?.label ?? ""}</strong>
2058
- * <button onClick={() => resolve({ value: event.value })}>Continue</button>
2059
- * </aside>
2060
- * ),
2061
- * });
2062
- *
2063
- * return <>{interruptElement}</>;
2064
- * }
2462
+ * useInterrupt({
2463
+ * render: ({ interrupt, resolve, cancel }) => (
2464
+ * <div>
2465
+ * <p>{interrupt?.message}</p>
2466
+ * <button onClick={() => resolve({ approved: true })}>Approve</button>
2467
+ * <button onClick={() => cancel()}>Cancel</button>
2468
+ * </div>
2469
+ * ),
2470
+ * });
2065
2471
  * ```
2066
2472
  */
2067
2473
  declare function useInterrupt<TResult = never, TRenderInChat extends InterruptRenderInChat = undefined>(config: UseInterruptConfig<any, TResult, TRenderInChat>): UseInterruptReturn<TRenderInChat>;
2068
2474
  //#endregion
2069
- //#region src/v2/hooks/use-threads.d.ts
2070
- /**
2071
- * A conversation thread managed by the Intelligence platform.
2072
- *
2073
- * Each thread has a unique `id`, an optional human-readable `name`, and
2074
- * timestamp fields tracking creation and update times.
2075
- */
2076
- interface Thread {
2077
- id: string;
2078
- agentId: string;
2079
- name: string | null;
2080
- archived: boolean;
2081
- createdAt: string;
2082
- updatedAt: string;
2083
- /**
2084
- * ISO-8601 timestamp of the most recent agent run on this thread. Absent
2085
- * when the thread has never been run. Prefer this over `updatedAt` for
2086
- * user-facing "last activity" displays — it is not bumped by metadata-only
2087
- * actions like rename or archive.
2088
- */
2089
- lastRunAt?: string;
2090
- }
2091
- /**
2092
- * Configuration for the {@link useThreads} hook.
2093
- *
2094
- * Thread operations are scoped to the runtime-authenticated user and the
2095
- * provided agent on the Intelligence platform.
2096
- */
2097
- interface UseThreadsInput {
2098
- /** The ID of the agent whose threads to list and manage. */
2099
- agentId: string;
2100
- /** When `true`, archived threads are included in the list. Defaults to `false`. */
2101
- includeArchived?: boolean;
2102
- /** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */
2103
- limit?: number;
2104
- }
2105
- /**
2106
- * Return value of the {@link useThreads} hook.
2107
- *
2108
- * The `threads` array is kept in sync with the platform via a realtime
2109
- * WebSocket subscription (when available) and is sorted most-recently-updated
2110
- * first. Mutations reject with an `Error` if the platform request fails.
2111
- */
2112
- interface UseThreadsResult {
2113
- /**
2114
- * Threads for the current user/agent pair, sorted by most recently
2115
- * updated first. Updated in realtime when the platform pushes metadata
2116
- * events. Includes archived threads only when `includeArchived` is set.
2117
- */
2118
- threads: Thread[];
2119
- /**
2120
- * `true` while the initial thread list is being fetched from the platform.
2121
- * Subsequent realtime updates do not re-enter the loading state.
2122
- */
2123
- isLoading: boolean;
2124
- /**
2125
- * The most recent error from fetching threads or executing a mutation,
2126
- * or `null` when there is no error. Reset to `null` on the next
2127
- * successful fetch.
2128
- */
2129
- error: Error | null;
2130
- /**
2131
- * `true` when there are more threads available to fetch via
2132
- * {@link fetchMoreThreads}. Only meaningful when `limit` is set.
2133
- */
2134
- hasMoreThreads: boolean;
2135
- /**
2136
- * `true` while a subsequent page of threads is being fetched.
2137
- */
2138
- isFetchingMoreThreads: boolean;
2139
- /**
2140
- * Fetch the next page of threads. No-op when {@link hasMoreThreads} is
2141
- * `false` or a fetch is already in progress.
2142
- */
2143
- fetchMoreThreads: () => void;
2144
- /**
2145
- * Rename a thread on the platform.
2146
- * Resolves when the server confirms the update; rejects on failure.
2147
- */
2148
- renameThread: (threadId: string, name: string) => Promise<void>;
2149
- /**
2150
- * Archive a thread on the platform.
2151
- * Archived threads are excluded from subsequent list results.
2152
- * Resolves when the server confirms the update; rejects on failure.
2153
- */
2154
- archiveThread: (threadId: string) => Promise<void>;
2155
- /**
2156
- * Permanently delete a thread from the platform.
2157
- * This is irreversible. Resolves when the server confirms deletion;
2158
- * rejects on failure.
2159
- */
2160
- deleteThread: (threadId: string) => Promise<void>;
2161
- }
2162
- /**
2163
- * React hook for listing and managing Intelligence platform threads.
2164
- *
2165
- * On mount the hook fetches the thread list for the runtime-authenticated user
2166
- * and the given `agentId`. When the Intelligence platform exposes a WebSocket
2167
- * URL, it also opens a realtime subscription so the `threads` array stays
2168
- * current without polling — thread creates, renames, archives, and deletes
2169
- * from any client are reflected immediately.
2170
- *
2171
- * Mutation methods (`renameThread`, `archiveThread`, `deleteThread`) return
2172
- * promises that resolve once the platform confirms the operation and reject
2173
- * with an `Error` on failure.
2174
- *
2175
- * @param input - Agent identifier and optional list controls.
2176
- * @returns Thread list state and stable mutation callbacks.
2177
- *
2178
- * @example
2179
- * ```tsx
2180
- * import { useThreads } from "@copilotkit/react-core";
2181
- *
2182
- * function ThreadList() {
2183
- * const { threads, isLoading, renameThread, deleteThread } = useThreads({
2184
- * agentId: "agent-1",
2185
- * });
2186
- *
2187
- * if (isLoading) return <p>Loading…</p>;
2188
- *
2189
- * return (
2190
- * <ul>
2191
- * {threads.map((t) => (
2192
- * <li key={t.id}>
2193
- * {t.name ?? "Untitled"}
2194
- * <button onClick={() => renameThread(t.id, "New name")}>Rename</button>
2195
- * <button onClick={() => deleteThread(t.id)}>Delete</button>
2196
- * </li>
2197
- * ))}
2198
- * </ul>
2199
- * );
2200
- * }
2201
- * ```
2202
- */
2203
- declare function useThreads({
2204
- agentId,
2205
- includeArchived,
2206
- limit
2207
- }: UseThreadsInput): UseThreadsResult;
2208
- //#endregion
2209
2475
  //#region src/v2/hooks/use-learn-from-user-action.d.ts
2210
2476
  /**
2211
2477
  * Input to {@link UseLearnFromUserActionRecorder}, the function returned
@@ -2703,6 +2969,22 @@ type A2UIUserAction = {
2703
2969
  context?: Record<string, unknown>;
2704
2970
  dataContextPath?: string;
2705
2971
  };
2972
+ /**
2973
+ * Intercept an A2UI user action before it reaches the agent.
2974
+ *
2975
+ * Called with the dispatched action and a `forward` helper that runs the agent
2976
+ * with the (optionally modified) action. The return value drives the default
2977
+ * forwarding:
2978
+ * - return `null` → the app handled it client-side (e.g. a `navigate` event);
2979
+ * the action is NOT forwarded to the agent.
2980
+ * - return an `A2UIUserAction` → that (possibly modified) action is forwarded.
2981
+ * - return `undefined` / `void` → the original action is forwarded unchanged.
2982
+ *
2983
+ * `forward` is provided for advanced cases where you want to do async work and
2984
+ * forward manually; if you call it yourself, return `null` to suppress the
2985
+ * default forward and avoid running the agent twice.
2986
+ */
2987
+ type A2UIActionInterceptor = (action: A2UIUserAction, forward: (action?: A2UIUserAction) => Promise<void>) => void | A2UIUserAction | null | Promise<void | A2UIUserAction | null>;
2706
2988
  type A2UIMessageRendererOptions = {
2707
2989
  theme: Theme; /** Optional component catalog to pass to A2UIProvider */
2708
2990
  catalog?: any; /** Optional custom loading component shown while the A2UI surface is building. */
@@ -2712,6 +2994,12 @@ type A2UIMessageRendererOptions = {
2712
2994
  * "Retrying…" sub-label appears + how much retry/debug detail to surface.
2713
2995
  */
2714
2996
  recovery?: A2UIRecoveryRendererOptions;
2997
+ /**
2998
+ * Intercept actions before they reach the agent. Lets an app handle an action
2999
+ * client-side (e.g. `navigate`) instead of forwarding every action. See
3000
+ * {@link A2UIActionInterceptor}.
3001
+ */
3002
+ onAction?: A2UIActionInterceptor;
2715
3003
  };
2716
3004
  declare function createA2UIMessageRenderer(options: A2UIMessageRendererOptions): ReactActivityMessageRenderer<any>;
2717
3005
  //#endregion
@@ -2725,7 +3013,7 @@ declare function createA2UIMessageRenderer(options: A2UIMessageRendererOptions):
2725
3013
  *
2726
3014
  * TODO: Remove this `Omit` once this is resolved.
2727
3015
  */
2728
- interface CopilotKitProps extends Omit<CopilotKitProviderProps, "children"> {
3016
+ interface CopilotKitProps extends Omit<CopilotKitProviderProps, "children" | "onError"> {
2729
3017
  /** Your CopilotKit public license key. */
2730
3018
  publicApiKey?: string;
2731
3019
  /** Your public license key for accessing Enterprise Intelligence Platform features. */
@@ -2889,5 +3177,5 @@ declare function CopilotKit({
2889
3177
  }: CopilotKitProps): react_jsx_runtime0.JSX.Element;
2890
3178
  declare const defaultCopilotContextCategories: string[];
2891
3179
  //#endregion
2892
- export { InterruptEvent as $, CopilotChatSuggestionPill as $t, UseLearnFromUserActionRecorder as A, LangGraphInterruptRenderHandlerProps as An, CopilotSidebarViewProps as At, AgentContextInput as B, SystemMessageFunction as Bn, CopilotChatViewProps as Bt, UseAttachmentsReturn as C, CopilotContextParams as Cn, CopilotPopup as Ct, useLearnFromUserActionInCurrentThread as D, LangGraphInterruptActionSetter as Dn, CopilotPopupView as Dt, UseLearnFromUserActionInCurrentThreadRecorder as E, LangGraphInterruptAction as En, CopilotSidebarProps as Et, useThreads as F, CrewsResponseStatus as Fn, DefaultCloseIcon as Ft, useAgent as G, ActionRenderPropsNoArgs as Gn, IntelligenceIndicator as Gt, useAgentContext as H, Tree as Hn, CopilotChatMessageView as Ht, UseInterruptConfig as I, CrewsStateItem as In, DefaultOpenIcon as It, useRenderTool as J, CatchAllActionRenderProps as Jn, IntelligenceIndicatorStatus as Jt, useHumanInTheLoop as K, ActionRenderPropsNoArgsWait as Kn, IntelligenceIndicatorProps as Kt, useInterrupt as L, CrewsTaskStateItem as Ln, CopilotChat as Lt, Thread as M, QueuedInterruptEvent as Mn, CopilotModalHeaderProps as Mt, UseThreadsInput as N, CrewsAgentState as Nn, CopilotChatToggleButton as Nt, LearnFromUserActionInput as O, LangGraphInterruptActionSetterArgs as On, CopilotPopupViewProps as Ot, UseThreadsResult as P, CrewsResponse as Pn, CopilotChatToggleButtonProps as Pt, SandboxFunction as Q, RenderFunctionStatus as Qn, CopilotChatSuggestionViewProps as Qt, useConfigureSuggestions as R, CrewsToolStateItem as Rn, CopilotChatProps as Rt, UseAttachmentsProps as S, CopilotContext as Sn, CopilotChatAttachmentQueue as St, LearnFromUserActionInCurrentThreadInput as T, CoAgentStateRender as Tn, CopilotSidebar as Tt, useCapabilities as U, TreeNode as Un, CopilotChatMessageViewProps as Ut, JsonSerializable as V, DocumentPointer as Vn, AutoScrollMode as Vt, UseAgentUpdate as W, ActionRenderProps as Wn, INTELLIGENCE_TURN_HEAD as Wt, useFrontendTool as X, FrontendAction as Xn, IntelligenceIndicatorViewProps as Xt, useComponent as Y, CatchAllFrontendAction as Yn, IntelligenceIndicatorView as Yt, useRenderActivityMessage as Z, FrontendActionAvailability as Zn, CopilotChatSuggestionView as Zt, CopilotKitCoreReactSubscriber as _, AudioRecorderError as _n, WildcardToolCallRender as _t, A2UIUserAction as a, CopilotChatAssistantMessage as an, ReactActivityMessageRenderer as at, UseLearningContainersArgs as b, CoagentInChatRenderFunction as bn, AttachmentsConfig$1 as bt, SandboxFunctionsContext as c, CopilotChatToolCallsViewProps as cn, ReactCustomMessageRenderer as ct, CopilotKitProviderProps as d, ToolsMenuItem as dn, MCPAppsActivityContent as dt, CopilotChatSuggestionPillProps as en, InterruptHandlerProps as et, A2UIRecoveryRendererOptions as f, CopilotChatConfigurationProvider as fn, MCPAppsActivityContentSchema as ft, CopilotKitCoreReactConfig as g, useCopilotChatConfiguration as gn, CopilotKitInspectorProps as gt, CopilotKitCoreReact as h, CopilotChatLabels as hn, CopilotKitInspector as ht, A2UIMessageRendererOptions as i, CopilotChatUserMessageProps as in, ReactFrontendTool as it, useLearnFromUserAction as j, LangGraphInterruptRenderProps as jn, CopilotModalHeader as jt, LearnFromUserActionResult as k, LangGraphInterruptRender as kn, CopilotSidebarView as kt, useSandboxFunctions as l, CopilotChatInput as ln, ReactCustomMessageRendererPosition as lt, useCopilotKit as m, CopilotChatConfigurationValue as mn, MCPAppsActivityType as mt, defaultCopilotContextCategories as n, CopilotChatReasoningMessageProps as nn, defineToolCallRenderer as nt, createA2UIMessageRenderer as o, CopilotChatAssistantMessageProps as on, ReactToolCallRenderer as ot, CopilotKitContextValue as p, CopilotChatConfigurationProviderProps as pn, MCPAppsActivityRenderer as pt, useDefaultRenderTool as q, ActionRenderPropsWait as qn, getIntelligenceTurnAnchors as qt, CopilotKitProps as r, CopilotChatUserMessage as rn, ReactHumanInTheLoop as rt, InspectorAnchor as s, CopilotChatToolCallsView as sn, useRenderCustomMessages as st, CopilotKit as t, CopilotChatReasoningMessage as tn, InterruptRenderProps as tt, CopilotKitProvider as u, CopilotChatInputProps as un, useRenderToolCall as ut, UseLearningContainersInCurrentThreadArgs as v, AudioRecorderState as vn, Attachment$1 as vt, useAttachments as w, useCopilotContext as wn, CopilotPopupProps as wt, useLearningContainers as x, CopilotApiConfig as xn, CopilotChatAttachmentRenderer as xt, useLearningContainersInCurrentThread as y, CopilotChatAudioRecorder as yn, AttachmentModality as yt, useSuggestions as z, CopilotChatSuggestionConfiguration as zn, CopilotChatView as zt };
2893
- //# sourceMappingURL=copilotkit-M1FiciGd.d.mts.map
3180
+ export { InterruptHandlerProps as $, ActionRenderPropsNoArgs as $n, IntelligenceIndicator as $t, LearnFromUserActionResult as A, CopilotContext as An, useThreads as At, useCapabilities as B, QueuedInterruptEvent as Bn, CopilotModalHeaderProps as Bt, UseAttachmentsProps as C, CopilotChatLabels as Cn, CopilotChatAttachmentQueue as Ct, UseLearnFromUserActionInCurrentThreadRecorder as D, CopilotChatAudioRecorder as Dn, Thread as Dt, LearnFromUserActionInCurrentThreadInput as E, AudioRecorderState as En, CopilotThreadsDrawerRowRenderer as Et, useConfigureSuggestions as F, LangGraphInterruptActionSetter as Fn, CopilotPopupView as Ft, useRenderTool as G, CrewsTaskStateItem as Gn, CopilotChat as Gt, useAgent as H, CrewsResponse as Hn, CopilotChatToggleButtonProps as Ht, useSuggestions as I, LangGraphInterruptActionSetterArgs as In, CopilotPopupViewProps as It, useRenderActivityMessage as J, SystemMessageFunction as Jn, CopilotChatViewProps as Jt, useComponent as K, CrewsToolStateItem as Kn, CopilotChatProps as Kt, AgentContextInput as L, LangGraphInterruptRender as Ln, CopilotSidebarView as Lt, useLearnFromUserAction as M, useCopilotContext as Mn, CopilotPopupProps as Mt, UseInterruptConfig as N, CoAgentStateRender as Nn, CopilotSidebar as Nt, useLearnFromUserActionInCurrentThread as O, CoagentInChatRenderFunction as On, UseThreadsInput as Ot, useInterrupt as P, LangGraphInterruptAction as Pn, CopilotSidebarProps as Pt, InterruptEvent as Q, ActionRenderProps as Qn, INTELLIGENCE_TURN_HEAD as Qt, JsonSerializable as R, LangGraphInterruptRenderHandlerProps as Rn, CopilotSidebarViewProps as Rt, useLearningContainers as S, CopilotChatConfigurationValue as Sn, CopilotChatAttachmentRenderer as St, useAttachments as T, AudioRecorderError as Tn, CopilotThreadsDrawerProps as Tt, useHumanInTheLoop as U, CrewsResponseStatus as Un, DefaultCloseIcon as Ut, UseAgentUpdate as V, CrewsAgentState as Vn, CopilotChatToggleButton as Vt, useDefaultRenderTool as W, CrewsStateItem as Wn, DefaultOpenIcon as Wt, Interrupt as X, Tree as Xn, CopilotChatMessageView as Xt, SandboxFunction as Y, DocumentPointer as Yn, AutoScrollMode as Yt, InterruptCancelFn as Z, TreeNode as Zn, CopilotChatMessageViewProps as Zt, CopilotKitCoreReactConfig as _, CopilotChatInput as _n, CopilotKitInspectorProps as _t, A2UIMessageRendererOptions as a, CopilotChatSuggestionView as an, FrontendActionAvailability as ar, ReactFrontendTool as at, useLearningContainersInCurrentThread as b, CopilotChatConfigurationProvider as bn, AttachmentModality as bt, InspectorAnchor as c, CopilotChatSuggestionPillProps as cn, useRenderCustomMessages as ct, CopilotKitProvider as d, CopilotChatUserMessage as dn, useRenderToolCall as dt, IntelligenceIndicatorProps as en, ActionRenderPropsNoArgsWait as er, InterruptRenderProps as et, CopilotKitProviderProps as f, CopilotChatUserMessageProps as fn, MCPAppsActivityContent as ft, CopilotKitCoreReact as g, CopilotChatToolCallsViewProps as gn, CopilotKitInspector as gt, useCopilotKit as h, CopilotChatToolCallsView as hn, MCPAppsActivityType as ht, A2UIActionInterceptor as i, IntelligenceIndicatorViewProps as in, FrontendAction as ir, ReactHumanInTheLoop as it, UseLearnFromUserActionRecorder as j, CopilotContextParams as jn, CopilotPopup as jt, LearnFromUserActionInput as k, CopilotApiConfig as kn, UseThreadsResult as kt, SandboxFunctionsContext as l, CopilotChatReasoningMessage as ln, ReactCustomMessageRenderer as lt, CopilotKitContextValue as m, CopilotChatAssistantMessageProps as mn, MCPAppsActivityRenderer as mt, defaultCopilotContextCategories as n, IntelligenceIndicatorStatus as nn, CatchAllActionRenderProps as nr, ResumeEntry as nt, A2UIUserAction as o, CopilotChatSuggestionViewProps as on, RenderFunctionStatus as or, ReactActivityMessageRenderer as ot, A2UIRecoveryRendererOptions as p, CopilotChatAssistantMessage as pn, MCPAppsActivityContentSchema as pt, useFrontendTool as q, CopilotChatSuggestionConfiguration as qn, CopilotChatView as qt, CopilotKitProps as r, IntelligenceIndicatorView as rn, CatchAllFrontendAction as rr, defineToolCallRenderer as rt, createA2UIMessageRenderer as s, CopilotChatSuggestionPill as sn, ReactToolCallRenderer as st, CopilotKit as t, getIntelligenceTurnAnchors as tn, ActionRenderPropsWait as tr, InterruptResolveFn as tt, useSandboxFunctions as u, CopilotChatReasoningMessageProps as un, ReactCustomMessageRendererPosition as ut, CopilotKitCoreReactSubscriber as v, CopilotChatInputProps as vn, WildcardToolCallRender as vt, UseAttachmentsReturn as w, useCopilotChatConfiguration as wn, CopilotThreadsDrawer as wt, UseLearningContainersArgs as x, CopilotChatConfigurationProviderProps as xn, AttachmentsConfig$1 as xt, UseLearningContainersInCurrentThreadArgs as y, ToolsMenuItem as yn, Attachment$1 as yt, useAgentContext as z, LangGraphInterruptRenderProps as zn, CopilotModalHeader as zt };
3181
+ //# sourceMappingURL=copilotkit-DnLpJ2Cl.d.mts.map