@athenaintel/react 0.17.0 → 0.19.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 (128) hide show
  1. package/README.md +179 -43
  2. package/dist/AthenaContext-B1QMhIP-.cjs.map +1 -1
  3. package/dist/AthenaContext-MOslgOmE.js.map +1 -1
  4. package/dist/SuperGroupingCard-BsWbHyV_.js +795 -0
  5. package/dist/SuperGroupingCard-BsWbHyV_.js.map +1 -0
  6. package/dist/SuperGroupingCard-CRRFUgjN.cjs +794 -0
  7. package/dist/SuperGroupingCard-CRRFUgjN.cjs.map +1 -0
  8. package/dist/chat/StatewireApprovalCard.d.ts +59 -2
  9. package/dist/chat/StatewireClientToolBridge.d.ts +3 -3
  10. package/dist/chat/StatewireQueuedMessages.d.ts +105 -6
  11. package/dist/chat/statewire-approval.d.ts +1 -1
  12. package/dist/chat/statewire-banners.d.ts +5 -9
  13. package/dist/chat/statewire-client-tools.d.ts +15 -21
  14. package/dist/chat/super-grouping/CollapsibleGroup.d.ts +52 -11
  15. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +78 -21
  16. package/dist/chat/super-grouping/activity-timeline.d.ts +91 -0
  17. package/dist/chat/super-grouping/grouping-function.d.ts +13 -10
  18. package/dist/chat/super-grouping/index.d.ts +12 -0
  19. package/dist/chat/super-grouping/toolkit-map.d.ts +8 -1
  20. package/dist/chat/use-statewire-approval-request.d.ts +44 -0
  21. package/dist/chat-ui/header/conversation-history-panel.d.ts +11 -1
  22. package/dist/chat-ui/index.d.ts +9 -0
  23. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +24 -0
  24. package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +5 -0
  25. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +1 -1
  26. package/dist/chat-ui/mentions/suggestions/shims.d.ts +0 -4
  27. package/dist/chat-ui/messages/continue-pill.d.ts +13 -0
  28. package/dist/chat-ui/messages/message-components.d.ts +7 -2
  29. package/dist/chat-ui/messages/runtime-message.d.ts +21 -0
  30. package/dist/chat-ui/messages/statewire-continue-run.d.ts +82 -0
  31. package/dist/chat-ui/messages/user-edit-composer.d.ts +5 -2
  32. package/dist/chat-ui/statewire.d.ts +19 -0
  33. package/dist/chat-ui/thread/chat-composer-dock.d.ts +1 -1
  34. package/dist/chat-ui/thread/chat-thread-shell.d.ts +7 -1
  35. package/dist/chat-ui/thread/statewire-history-edge.d.ts +52 -0
  36. package/dist/chat-ui-statewire.cjs +25 -0
  37. package/dist/chat-ui-statewire.cjs.map +1 -0
  38. package/dist/chat-ui-statewire.js +25 -0
  39. package/dist/chat-ui-statewire.js.map +1 -0
  40. package/dist/chat-ui.cjs +292 -252
  41. package/dist/chat-ui.cjs.map +1 -1
  42. package/dist/chat-ui.js +289 -248
  43. package/dist/chat-ui.js.map +1 -1
  44. package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
  45. package/dist/diagnostics/errors.d.ts +4 -4
  46. package/dist/index.cjs +20237 -26233
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.ts +25 -14
  49. package/dist/index.js +18465 -24458
  50. package/dist/index.js.map +1 -1
  51. package/dist/lib/athena-urls.d.ts +0 -2
  52. package/dist/lib/posthog/wrap-posthog-client.d.ts +3 -1
  53. package/dist/misc-tool-uis-B2e0Okkn.cjs +43 -0
  54. package/dist/misc-tool-uis-B2e0Okkn.cjs.map +1 -0
  55. package/dist/misc-tool-uis-gAiQw0Yl.js +44 -0
  56. package/dist/misc-tool-uis-gAiQw0Yl.js.map +1 -0
  57. package/dist/provider/AthenaContext.d.ts +0 -7
  58. package/dist/provider/AthenaProvider.d.ts +28 -52
  59. package/dist/provider/config.d.ts +19 -15
  60. package/dist/provider/statewire-lifecycle-context.d.ts +3 -4
  61. package/dist/provider/statewire-window-context.d.ts +12 -0
  62. package/dist/provider/types.d.ts +0 -1
  63. package/dist/runtime/statewire-auth-headers.d.ts +38 -0
  64. package/dist/runtime/statewire-lifecycle.d.ts +25 -1
  65. package/dist/runtime/statewire-run-config.d.ts +18 -5
  66. package/dist/runtime/statewire-session-key.d.ts +13 -0
  67. package/dist/runtime/useAthenaStatewireRuntime.d.ts +42 -16
  68. package/dist/statewire-continue-run-D34gS7_1.js +132 -0
  69. package/dist/statewire-continue-run-D34gS7_1.js.map +1 -0
  70. package/dist/statewire-continue-run-nE9VCKUh.cjs +131 -0
  71. package/dist/statewire-continue-run-nE9VCKUh.cjs.map +1 -0
  72. package/dist/statewire-history-edge-C8uyTEjX.cjs +1711 -0
  73. package/dist/statewire-history-edge-C8uyTEjX.cjs.map +1 -0
  74. package/dist/statewire-history-edge-CPohUKMt.js +1712 -0
  75. package/dist/statewire-history-edge-CPohUKMt.js.map +1 -0
  76. package/dist/styles.css +1 -1
  77. package/dist/super-grouping.cjs +22 -0
  78. package/dist/super-grouping.cjs.map +1 -0
  79. package/dist/super-grouping.js +22 -0
  80. package/dist/super-grouping.js.map +1 -0
  81. package/dist/threads/ThreadList.d.ts +6 -1
  82. package/dist/threads/mint-thread-id.d.ts +8 -0
  83. package/dist/threads/statewire-thread-list.d.ts +26 -9
  84. package/dist/threads/thread-id-context.d.ts +9 -0
  85. package/dist/threads/use-statewire-conversation-history.d.ts +2 -0
  86. package/dist/threads/useAthenaThreadManager.d.ts +24 -12
  87. package/dist/tool-fallback-DkQ3DLkn.js +4281 -0
  88. package/dist/tool-fallback-DkQ3DLkn.js.map +1 -0
  89. package/dist/tool-fallback-kfhpJQZa.cjs +4297 -0
  90. package/dist/tool-fallback-kfhpJQZa.cjs.map +1 -0
  91. package/dist/tools/index.d.ts +14 -0
  92. package/dist/tools/misc-tool-uis.d.ts +2 -0
  93. package/dist/tools/primitives.d.ts +41 -0
  94. package/dist/tools/tool-fallback.d.ts +78 -6
  95. package/dist/tools/tool-icons.d.ts +10 -0
  96. package/dist/tools/tool-uis.d.ts +1 -23
  97. package/dist/tools.cjs +41 -0
  98. package/dist/tools.cjs.map +1 -0
  99. package/dist/tools.js +41 -0
  100. package/dist/tools.js.map +1 -0
  101. package/dist/trash-2-B5OaNAL7.cjs +5096 -0
  102. package/dist/trash-2-B5OaNAL7.cjs.map +1 -0
  103. package/dist/trash-2-CCwSURL-.js +5081 -0
  104. package/dist/trash-2-CCwSURL-.js.map +1 -0
  105. package/dist/{use-rest-conversation-history-BdnG8jEP.cjs → use-rest-conversation-history-Cm8qMRxp.cjs} +985 -5405
  106. package/dist/use-rest-conversation-history-Cm8qMRxp.cjs.map +1 -0
  107. package/dist/{use-rest-conversation-history-DpEswBqQ.js → use-rest-conversation-history-veDZS-oL.js} +1035 -5455
  108. package/dist/use-rest-conversation-history-veDZS-oL.js.map +1 -0
  109. package/dist/wrench-BEf72cyP.cjs +417 -0
  110. package/dist/wrench-BEf72cyP.cjs.map +1 -0
  111. package/dist/wrench-CbrOlVYm.js +418 -0
  112. package/dist/wrench-CbrOlVYm.js.map +1 -0
  113. package/dist/x-Dfd2NzK0.cjs +42 -0
  114. package/dist/x-Dfd2NzK0.cjs.map +1 -0
  115. package/dist/x-_DntAa_a.js +43 -0
  116. package/dist/x-_DntAa_a.js.map +1 -0
  117. package/package.json +29 -11
  118. package/dist/chat/super-grouping/tool-status-labels.d.ts +0 -1
  119. package/dist/runtime/converter.d.ts +0 -5
  120. package/dist/runtime/external-message-converter.d.ts +0 -21
  121. package/dist/runtime/schemas.d.ts +0 -24
  122. package/dist/runtime/transport.d.ts +0 -39
  123. package/dist/runtime/useAthenaRuntime.d.ts +0 -47
  124. package/dist/threads/adapter.d.ts +0 -42
  125. package/dist/threads/useActiveThreadStateHydration.d.ts +0 -12
  126. package/dist/threads/useThreadTitlePolling.d.ts +0 -14
  127. package/dist/use-rest-conversation-history-BdnG8jEP.cjs.map +0 -1
  128. package/dist/use-rest-conversation-history-DpEswBqQ.js.map +0 -1
@@ -31,6 +31,12 @@ export interface ChatThreadShellProps {
31
31
  viewportOverlay?: ReactNode;
32
32
  /** Empty-thread state, rendered via ThreadPrimitive.Empty when provided. */
33
33
  welcome?: ReactNode;
34
+ /**
35
+ * Rendered inside the message column right above the messages — the
36
+ * windowed wire's history edge (`StatewireHistoryEdge`): the "N earlier
37
+ * messages" row that pages older history in and fetches cut tool outputs.
38
+ */
39
+ beforeMessages?: ReactNode;
34
40
  /** Message renderers for ThreadPrimitive.Messages. */
35
41
  components: ChatThreadMessageComponents;
36
42
  /**
@@ -106,4 +112,4 @@ export interface ChatThreadShellProps {
106
112
  * layout, scroll behaviour, and empty/running states stay identical across
107
113
  * surfaces so fixes land once.
108
114
  */
109
- export declare function ChatThreadShell({ overlay, header, banners, viewportOverlay, welcome, components, renderMessages, belowViewport, composer, panelClassName, maxWidth, turnAnchor, viewportClassName, contentClassName, runningIndicator, scrollToBottom, viewportFooter, viewportFooterClassName, readOnly, }: ChatThreadShellProps): import("react/jsx-runtime").JSX.Element;
115
+ export declare function ChatThreadShell({ overlay, header, banners, viewportOverlay, welcome, beforeMessages, components, renderMessages, belowViewport, composer, panelClassName, maxWidth, turnAnchor, viewportClassName, contentClassName, runningIndicator, scrollToBottom, viewportFooter, viewportFooterClassName, readOnly, }: ChatThreadShellProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,52 @@
1
+ import { type DeepAgentHistoryLoadEvent, type DeepAgentToolOutputStore } from "@athenaintel/agent-runtime";
2
+ import type { FC } from "react";
3
+ /** The attribute `ChatThreadShell` stamps on the scroll viewport. */
4
+ export declare const THREAD_VIEWPORT_ATTR = "data-aui-thread-viewport";
5
+ /**
6
+ * How far above the viewport the edge row counts as near: the row sits above
7
+ * the first loaded message, so reaching it means the user has scrolled past
8
+ * everything loaded and the next page should already be on its way.
9
+ */
10
+ export declare const HISTORY_EDGE_NEAR_MARGIN_PX = 1500;
11
+ export interface HistoryEdgeRowProps {
12
+ /** Messages older than the loaded window the server still holds. */
13
+ olderCount: number;
14
+ /** A page of older history is in flight. */
15
+ loading: boolean;
16
+ onLoadOlder: () => void;
17
+ className?: string;
18
+ /** The row element, for the viewport observer. */
19
+ rowRef?: (element: HTMLElement | null) => void;
20
+ }
21
+ /**
22
+ * The top edge of the LOADED history on a windowed wire: how many older
23
+ * messages the server still holds, a manual way to load the next page, and
24
+ * the in-flight state. Renders nothing when the whole transcript is loaded
25
+ * (or the wire is not windowed).
26
+ */
27
+ export declare const HistoryEdgeRow: FC<HistoryEdgeRowProps>;
28
+ export interface StatewireHistoryEdgeProps {
29
+ /**
30
+ * The thread's tool-output store (the one its converter substitutes from).
31
+ * Defaults to `AthenaProvider`'s; hosts mounting the runtime themselves pass
32
+ * the store they gave `useDeepAgentRuntime({ toolOutputs })`.
33
+ */
34
+ toolOutputs?: DeepAgentToolOutputStore;
35
+ className?: string;
36
+ /** A `history/load` settled (telemetry). */
37
+ onHistoryLoad?: (event: DeepAgentHistoryLoadEvent) => void;
38
+ }
39
+ /**
40
+ * The client half of the windowed wire for a DOM thread — mounted once per
41
+ * thread, inside the scroll viewport above the messages (`ChatThreadShell`'s
42
+ * `beforeMessages` slot):
43
+ *
44
+ * - renders the "N earlier messages" edge row and loads the next page when
45
+ * the row comes near the viewport (scrolling up) or on its button, keeping
46
+ * the reading position when the page lands above the view;
47
+ * - fetches cut tool outputs whole for the rendered cards, so they re-render
48
+ * complete through the converter (`toolOutputs`).
49
+ *
50
+ * Inert on a wire that is not windowed: no row, no reads.
51
+ */
52
+ export declare const StatewireHistoryEdge: FC<StatewireHistoryEdgeProps>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const statewireHistoryEdge = require("./statewire-history-edge-C8uyTEjX.cjs");
4
+ const statewireContinueRun = require("./statewire-continue-run-nE9VCKUh.cjs");
5
+ require("./trash-2-B5OaNAL7.cjs");
6
+ require("react");
7
+ require("@assistant-ui/tap");
8
+ require("statewire");
9
+ require("@assistant-ui/react-statewire");
10
+ require("@assistant-ui/store");
11
+ require("@assistant-ui/core");
12
+ exports.ContinuePill = statewireHistoryEdge.ContinuePill;
13
+ exports.HITL_PENDING_RESUME_GRACE_MS = statewireHistoryEdge.HITL_PENDING_RESUME_GRACE_MS;
14
+ exports.HistoryEdgeRow = statewireHistoryEdge.HistoryEdgeRow;
15
+ exports.RuntimeMessageCard = statewireHistoryEdge.RuntimeMessageCard;
16
+ exports.StatewireApprovalCard = statewireHistoryEdge.StatewireApprovalCard;
17
+ exports.StatewireHistoryEdge = statewireHistoryEdge.StatewireHistoryEdge;
18
+ exports.StatewireQueuedMessages = statewireHistoryEdge.StatewireQueuedMessages;
19
+ exports.StatewireToolOutputsContext = statewireHistoryEdge.StatewireToolOutputsContext;
20
+ exports.useStatewireApprovalRequest = statewireHistoryEdge.useStatewireApprovalRequest;
21
+ exports.useStatewireToolOutputs = statewireHistoryEdge.useStatewireToolOutputs;
22
+ exports.StatewireContinueRunAffordance = statewireContinueRun.StatewireContinueRunAffordance;
23
+ exports.StatewireContinueRunButton = statewireContinueRun.StatewireContinueRunButton;
24
+ exports.StatewireRunEndedFooter = statewireContinueRun.StatewireRunEndedFooter;
25
+ //# sourceMappingURL=chat-ui-statewire.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-ui-statewire.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,25 @@
1
+ import { C, H, a, R, S, b, c, d, u, e } from "./statewire-history-edge-CPohUKMt.js";
2
+ import { S as S2, a as a2, b as b2 } from "./statewire-continue-run-D34gS7_1.js";
3
+ import "./trash-2-CCwSURL-.js";
4
+ import "react";
5
+ import "@assistant-ui/tap";
6
+ import "statewire";
7
+ import "@assistant-ui/react-statewire";
8
+ import "@assistant-ui/store";
9
+ import "@assistant-ui/core";
10
+ export {
11
+ C as ContinuePill,
12
+ H as HITL_PENDING_RESUME_GRACE_MS,
13
+ a as HistoryEdgeRow,
14
+ R as RuntimeMessageCard,
15
+ S as StatewireApprovalCard,
16
+ S2 as StatewireContinueRunAffordance,
17
+ a2 as StatewireContinueRunButton,
18
+ b as StatewireHistoryEdge,
19
+ c as StatewireQueuedMessages,
20
+ b2 as StatewireRunEndedFooter,
21
+ d as StatewireToolOutputsContext,
22
+ u as useStatewireApprovalRequest,
23
+ e as useStatewireToolOutputs
24
+ };
25
+ //# sourceMappingURL=chat-ui-statewire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-ui-statewire.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}