@athenaintel/react 0.55.0 → 0.57.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.
- package/README.md +84 -1
- package/dist/agent-runtime/src/answer-label.cjs +8 -2
- package/dist/agent-runtime/src/answer-label.cjs.map +1 -1
- package/dist/agent-runtime/src/answer-label.d.ts +10 -4
- package/dist/agent-runtime/src/answer-label.js +8 -2
- package/dist/agent-runtime/src/answer-label.js.map +1 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs +6 -3
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js +6 -3
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
- package/dist/agent-runtime/src/edit-command.cjs +40 -19
- package/dist/agent-runtime/src/edit-command.cjs.map +1 -1
- package/dist/agent-runtime/src/edit-command.d.ts +2 -0
- package/dist/agent-runtime/src/edit-command.js +41 -20
- package/dist/agent-runtime/src/edit-command.js.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +8 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +9 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js +8 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/history-store.cjs +426 -0
- package/dist/agent-runtime/src/history-store.cjs.map +1 -0
- package/dist/agent-runtime/src/history-store.d.ts +282 -0
- package/dist/agent-runtime/src/history-store.js +426 -0
- package/dist/agent-runtime/src/history-store.js.map +1 -0
- package/dist/agent-runtime/src/inbound-channel.cjs +96 -0
- package/dist/agent-runtime/src/inbound-channel.cjs.map +1 -0
- package/dist/agent-runtime/src/inbound-channel.d.ts +75 -0
- package/dist/agent-runtime/src/inbound-channel.js +96 -0
- package/dist/agent-runtime/src/inbound-channel.js.map +1 -0
- package/dist/agent-runtime/src/index.d.ts +6 -5
- package/dist/agent-runtime/src/interrupts.cjs +45 -3
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
- package/dist/agent-runtime/src/interrupts.d.ts +51 -4
- package/dist/agent-runtime/src/interrupts.js +46 -4
- package/dist/agent-runtime/src/interrupts.js.map +1 -1
- package/dist/agent-runtime/src/message-window.cjs +43 -5
- package/dist/agent-runtime/src/message-window.cjs.map +1 -1
- package/dist/agent-runtime/src/message-window.d.ts +26 -2
- package/dist/agent-runtime/src/message-window.js +44 -6
- package/dist/agent-runtime/src/message-window.js.map +1 -1
- package/dist/agent-runtime/src/offline-status.cjs.map +1 -1
- package/dist/agent-runtime/src/offline-status.d.ts +110 -4
- package/dist/agent-runtime/src/offline-status.js.map +1 -1
- package/dist/agent-runtime/src/runtime.d.ts +1 -0
- package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +8 -8
- package/dist/agent-runtime/src/tool-metadata.cjs +16 -0
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.js +16 -0
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs +8 -16
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +1 -9
- package/dist/agent-runtime/src/use-deep-agent-thread.js +9 -17
- package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs +86 -79
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-window-sync.d.ts +2 -27
- package/dist/agent-runtime/src/use-deep-agent-window-sync.js +89 -82
- package/dist/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -1
- package/dist/auth/AthenaSSOProvider.cjs +54 -12
- package/dist/auth/AthenaSSOProvider.cjs.map +1 -1
- package/dist/auth/AthenaSSOProvider.d.ts +23 -2
- package/dist/auth/AthenaSSOProvider.js +54 -12
- package/dist/auth/AthenaSSOProvider.js.map +1 -1
- package/dist/auth/index.cjs +2 -0
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sign-back-in.cjs +141 -0
- package/dist/auth/sign-back-in.cjs.map +1 -0
- package/dist/auth/sign-back-in.d.ts +117 -0
- package/dist/auth/sign-back-in.js +141 -0
- package/dist/auth/sign-back-in.js.map +1 -0
- package/dist/chat/AthenaChat.cjs +7 -2
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.js +7 -2
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.cjs +6 -2
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +8 -1
- package/dist/chat/StatewireApprovalCard.js +7 -3
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.cjs +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.d.ts +6 -5
- package/dist/chat/super-grouping/CollapsibleGroup.js +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.js.map +1 -1
- package/dist/chat/super-grouping/earlier-steps-button.cjs +5 -6
- package/dist/chat/super-grouping/earlier-steps-button.cjs.map +1 -1
- package/dist/chat/super-grouping/earlier-steps-button.d.ts +6 -6
- package/dist/chat/super-grouping/earlier-steps-button.js +5 -6
- package/dist/chat/super-grouping/earlier-steps-button.js.map +1 -1
- package/dist/chat/super-grouping/toolkit-map.cjs +1 -0
- package/dist/chat/super-grouping/toolkit-map.cjs.map +1 -1
- package/dist/chat/super-grouping/toolkit-map.js +1 -0
- package/dist/chat/super-grouping/toolkit-map.js.map +1 -1
- package/dist/chat/super-grouping/use-turn-steps.cjs +3 -3
- package/dist/chat/super-grouping/use-turn-steps.js +1 -1
- package/dist/chat-ui/index.cjs +4 -0
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +1 -0
- package/dist/chat-ui/index.js +5 -1
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/messages/inbound-channel-message.cjs +219 -0
- package/dist/chat-ui/messages/inbound-channel-message.cjs.map +1 -0
- package/dist/chat-ui/messages/inbound-channel-message.d.ts +60 -0
- package/dist/chat-ui/messages/inbound-channel-message.js +219 -0
- package/dist/chat-ui/messages/inbound-channel-message.js.map +1 -0
- package/dist/chat-ui/messages/inbound-channel-reader.cjs +184 -0
- package/dist/chat-ui/messages/inbound-channel-reader.cjs.map +1 -0
- package/dist/chat-ui/messages/inbound-channel-reader.d.ts +65 -0
- package/dist/chat-ui/messages/inbound-channel-reader.js +184 -0
- package/dist/chat-ui/messages/inbound-channel-reader.js.map +1 -0
- package/dist/chat-ui/messages/message-components.cjs +18 -14
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.d.ts +7 -0
- package/dist/chat-ui/messages/message-components.js +19 -15
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +0 -4
- package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +5 -7
- package/dist/chat-ui/thread/statewire-history-edge.js +1 -5
- package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
- package/dist/composer/sign-back-in-draft.cjs +62 -0
- package/dist/composer/sign-back-in-draft.cjs.map +1 -0
- package/dist/composer/sign-back-in-draft.d.ts +34 -0
- package/dist/composer/sign-back-in-draft.js +62 -0
- package/dist/composer/sign-back-in-draft.js.map +1 -0
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +6 -1
- package/dist/diagnostics/athena-diagnostics.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +60 -14
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.js +60 -14
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/statewire-window-context.cjs.map +1 -1
- package/dist/provider/statewire-window-context.d.ts +8 -8
- package/dist/provider/statewire-window-context.js.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/runtime/auth.cjs +11 -0
- package/dist/runtime/auth.cjs.map +1 -1
- package/dist/runtime/auth.d.ts +18 -1
- package/dist/runtime/auth.js +11 -0
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +0 -2
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +5 -5
- package/dist/runtime/useAthenaStatewireRuntime.js +0 -2
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/agent-runtime/src/history-pages.cjs +0 -279
- package/dist/agent-runtime/src/history-pages.cjs.map +0 -1
- package/dist/agent-runtime/src/history-pages.d.ts +0 -252
- package/dist/agent-runtime/src/history-pages.js +0 -279
- package/dist/agent-runtime/src/history-pages.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -45,6 +45,7 @@ const statewireThreadList = require("./threads/statewire-thread-list.cjs");
|
|
|
45
45
|
const DrivingOnChip = require("./chat/DrivingOnChip.cjs");
|
|
46
46
|
const WaitingOnYouBanner = require("./chat/WaitingOnYouBanner.cjs");
|
|
47
47
|
const wakeMarker = require("./chat-ui/messages/wake-marker.cjs");
|
|
48
|
+
const inboundChannelMessage = require("./chat-ui/messages/inbound-channel-message.cjs");
|
|
48
49
|
const offlineHistory = require("./offline/offline-history.cjs");
|
|
49
50
|
const chatOutbox = require("./offline/chat-outbox.cjs");
|
|
50
51
|
const tiptapText = require("./chat/tiptap-text.cjs");
|
|
@@ -145,6 +146,7 @@ const conversationList = require("./agent-runtime/src/conversation-list.cjs");
|
|
|
145
146
|
const toolMetadata = require("./agent-runtime/src/tool-metadata.cjs");
|
|
146
147
|
const githubWakeEvent = require("./agent-runtime/src/github-wake-event.cjs");
|
|
147
148
|
const threadExtras = require("./agent-runtime/src/thread-extras.cjs");
|
|
149
|
+
const inboundChannel = require("./agent-runtime/src/inbound-channel.cjs");
|
|
148
150
|
const toolAppearance = require("./tools/tool-appearance.cjs");
|
|
149
151
|
const subagents = require("./agent-runtime/src/subagents.cjs");
|
|
150
152
|
const chatOutboxSignals = require("./agent-runtime/src/chat-outbox-signals.cjs");
|
|
@@ -250,6 +252,9 @@ exports.WaitingOnYouBanner = WaitingOnYouBanner.WaitingOnYouBanner;
|
|
|
250
252
|
exports.WaitingOnYouBannerView = WaitingOnYouBanner.WaitingOnYouBannerView;
|
|
251
253
|
exports.WakeMarkerCard = wakeMarker.WakeMarkerCard;
|
|
252
254
|
exports.WakeMarkerMessage = wakeMarker.WakeMarkerMessage;
|
|
255
|
+
exports.InboundChannelLine = inboundChannelMessage.InboundChannelLine;
|
|
256
|
+
exports.InboundChannelSubject = inboundChannelMessage.InboundChannelSubject;
|
|
257
|
+
exports.withInboundMessageBody = inboundChannelMessage.withInboundMessageBody;
|
|
253
258
|
exports.OFFLINE_SNAPSHOT_READ_WAIT_MS = offlineHistory.OFFLINE_SNAPSHOT_READ_WAIT_MS;
|
|
254
259
|
exports.OfflineSnapshotBanner = offlineHistory.OfflineSnapshotBanner;
|
|
255
260
|
exports.formatOfflineSnapshotTime = offlineHistory.formatOfflineSnapshotTime;
|
|
@@ -578,6 +583,9 @@ exports.githubWakeMarkerText = githubWakeEvent.githubWakeMarkerText;
|
|
|
578
583
|
exports.isGithubWakeMessage = githubWakeEvent.isGithubWakeMessage;
|
|
579
584
|
exports.readGithubWakeEvent = githubWakeEvent.readGithubWakeEvent;
|
|
580
585
|
exports.hasStatewireThreadExtras = threadExtras.hasStatewireThreadExtras;
|
|
586
|
+
exports.inboundMessageBody = inboundChannel.inboundMessageBody;
|
|
587
|
+
exports.isInboundChannelMessage = inboundChannel.isInboundChannelMessage;
|
|
588
|
+
exports.stripInboundContext = inboundChannel.stripInboundContext;
|
|
581
589
|
exports.useToolAppearance = toolAppearance.useToolAppearance;
|
|
582
590
|
exports.useTurnToolCallsAwaitingApproval = subagents.useTurnToolCallsAwaitingApproval;
|
|
583
591
|
exports.windowInFrontSignal = chatOutboxSignals.windowInFrontSignal;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export { WaitingOnYouBanner, WaitingOnYouBannerView } from './chat/WaitingOnYouB
|
|
|
62
62
|
export type { WaitingOnYouBannerProps, WaitingOnYouBannerViewProps, } from './chat/WaitingOnYouBanner';
|
|
63
63
|
export { WakeMarkerCard, WakeMarkerMessage } from './chat-ui/messages/wake-marker';
|
|
64
64
|
export type { WakeMarkerCardProps } from './chat-ui/messages/wake-marker';
|
|
65
|
+
export { InboundChannelLine, InboundChannelSubject, withInboundMessageBody, } from './chat-ui/messages/inbound-channel-message';
|
|
66
|
+
export { inboundMessageBody, isInboundChannelMessage, stripInboundContext, } from './agent-runtime/src/index';
|
|
65
67
|
export { formatOfflineSnapshotTime, OFFLINE_SNAPSHOT_READ_WAIT_MS, OfflineSnapshotBanner, useAthenaOfflineSnapshotAt, } from './offline/offline-history';
|
|
66
68
|
export type { AthenaOfflineHistory, OfflineSnapshotBannerProps, } from './offline/offline-history';
|
|
67
69
|
export { type AthenaChatOutbox, clearChatOutbox, clearUnopenableChatOutbox, type ChatOutboxMessageSummary, countChatOutboxMessages, listChatOutboxMessages, subscribeChatOutbox, } from './offline/chat-outbox';
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ import { threadSummaryFromConversation, useAthenaStatewireThreadList, useRefresh
|
|
|
43
43
|
import { DrivingOnChip } from "./chat/DrivingOnChip.js";
|
|
44
44
|
import { WaitingOnYouBanner, WaitingOnYouBannerView } from "./chat/WaitingOnYouBanner.js";
|
|
45
45
|
import { WakeMarkerCard, WakeMarkerMessage } from "./chat-ui/messages/wake-marker.js";
|
|
46
|
+
import { InboundChannelLine, InboundChannelSubject, withInboundMessageBody } from "./chat-ui/messages/inbound-channel-message.js";
|
|
46
47
|
import { OFFLINE_SNAPSHOT_READ_WAIT_MS, OfflineSnapshotBanner, formatOfflineSnapshotTime, useAthenaOfflineSnapshotAt } from "./offline/offline-history.js";
|
|
47
48
|
import { clearChatOutbox, clearUnopenableChatOutbox, countChatOutboxMessages, listChatOutboxMessages, subscribeChatOutbox } from "./offline/chat-outbox.js";
|
|
48
49
|
import { TiptapText } from "./chat/tiptap-text.js";
|
|
@@ -143,6 +144,7 @@ import { deriveConversationAttention } from "./agent-runtime/src/conversation-li
|
|
|
143
144
|
import { describeToolArgs, formatToolName, getToolDisplayMeta, toolActiveLabel, toolCompletedLabel } from "./agent-runtime/src/tool-metadata.js";
|
|
144
145
|
import { githubWakeEventLabel, githubWakeMarkerText, isGithubWakeMessage, readGithubWakeEvent } from "./agent-runtime/src/github-wake-event.js";
|
|
145
146
|
import { hasStatewireThreadExtras } from "./agent-runtime/src/thread-extras.js";
|
|
147
|
+
import { inboundMessageBody, isInboundChannelMessage, stripInboundContext } from "./agent-runtime/src/inbound-channel.js";
|
|
146
148
|
import { useToolAppearance } from "./tools/tool-appearance.js";
|
|
147
149
|
import { useTurnToolCallsAwaitingApproval } from "./agent-runtime/src/subagents.js";
|
|
148
150
|
import { windowInFrontSignal } from "./agent-runtime/src/chat-outbox-signals.js";
|
|
@@ -215,6 +217,8 @@ export {
|
|
|
215
217
|
INBOX_QUERY,
|
|
216
218
|
INBOX_UNREAD_QUERY,
|
|
217
219
|
ImageViewer,
|
|
220
|
+
InboundChannelLine,
|
|
221
|
+
InboundChannelSubject,
|
|
218
222
|
Inbox,
|
|
219
223
|
InboxButton,
|
|
220
224
|
InstallPackageToolUI,
|
|
@@ -421,12 +425,14 @@ export {
|
|
|
421
425
|
groupSessionsBy,
|
|
422
426
|
hasStatewireThreadExtras,
|
|
423
427
|
humanizeToolName,
|
|
428
|
+
inboundMessageBody,
|
|
424
429
|
inboxStateChip,
|
|
425
430
|
installAthenaDiagnosticsGlobal,
|
|
426
431
|
isAthenaCitationUrl,
|
|
427
432
|
isAthenaSdkError,
|
|
428
433
|
isCriticalPosthogEvent,
|
|
429
434
|
isGithubWakeMessage,
|
|
435
|
+
isInboundChannelMessage,
|
|
430
436
|
isPendingInterrupt,
|
|
431
437
|
isSdkInlineTool,
|
|
432
438
|
isThreadArchiveUnavailableError,
|
|
@@ -491,6 +497,7 @@ export {
|
|
|
491
497
|
splitSheetPrefix,
|
|
492
498
|
splitTurnSegments,
|
|
493
499
|
statewireClientToolWireEntries,
|
|
500
|
+
stripInboundContext,
|
|
494
501
|
subscribeChatOutbox,
|
|
495
502
|
summarizeToolCall,
|
|
496
503
|
taskProgress,
|
|
@@ -574,6 +581,7 @@ export {
|
|
|
574
581
|
useTurnToolCallsAwaitingApproval,
|
|
575
582
|
windowInFrontSignal,
|
|
576
583
|
withCaptureGateBypass,
|
|
584
|
+
withInboundMessageBody,
|
|
577
585
|
workedDurationMs,
|
|
578
586
|
workspaceComputers,
|
|
579
587
|
wrapPosthogClient
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -22,6 +22,8 @@ const statewireThreadConfigLane = require("../runtime/statewire-thread-config-la
|
|
|
22
22
|
const mintThreadId = require("../threads/mint-thread-id.cjs");
|
|
23
23
|
const statewireLifecycleContext = require("./statewire-lifecycle-context.cjs");
|
|
24
24
|
const composerHandoff = require("../composer/composer-handoff.cjs");
|
|
25
|
+
const signBackInDraft = require("../composer/sign-back-in-draft.cjs");
|
|
26
|
+
const signBackIn = require("../auth/sign-back-in.cjs");
|
|
25
27
|
const statewireHistoryContext = require("./statewire-history-context.cjs");
|
|
26
28
|
const earlierStepsButton = require("../chat/super-grouping/earlier-steps-button.cjs");
|
|
27
29
|
const useTurnSteps = require("../chat/super-grouping/use-turn-steps.cjs");
|
|
@@ -49,7 +51,7 @@ const durableThreadSnapshotCache = require("../agent-runtime/src/durable-thread-
|
|
|
49
51
|
const threadSnapshotCache = require("../agent-runtime/src/thread-snapshot-cache.cjs");
|
|
50
52
|
const chatOutboxAttachments = require("../agent-runtime/src/chat-outbox-attachments.cjs");
|
|
51
53
|
const toolOutputs = require("../agent-runtime/src/tool-outputs.cjs");
|
|
52
|
-
const
|
|
54
|
+
const historyStore = require("../agent-runtime/src/history-store.cjs");
|
|
53
55
|
const threadStatus = require("../agent-runtime/src/thread-status.cjs");
|
|
54
56
|
const useDeepAgentChatOutbox = require("../agent-runtime/src/use-deep-agent-chat-outbox.cjs");
|
|
55
57
|
const useDeepAgentConfig = require("../agent-runtime/src/use-deep-agent-config.cjs");
|
|
@@ -114,6 +116,36 @@ function ComposerHandoffDrain() {
|
|
|
114
116
|
}, [aui, ready, store, threadId]);
|
|
115
117
|
return null;
|
|
116
118
|
}
|
|
119
|
+
function ComposerDraftCarry({ isNewChat }) {
|
|
120
|
+
const aui = react.useAui();
|
|
121
|
+
const threadId = require$$0.useContext(threadIdContext.AthenaStatewireThreadIdContext);
|
|
122
|
+
const principal = statewireSessionKey.statewireSessionPrincipal(require$$0.useContext(AthenaAuthContext.AthenaAuthContext));
|
|
123
|
+
const ready = composerHandoff.useComposerReady();
|
|
124
|
+
require$$0.useEffect(() => {
|
|
125
|
+
if (!principal || !threadId) return;
|
|
126
|
+
const keep = () => {
|
|
127
|
+
signBackInDraft.keepDraftForSignBackIn({
|
|
128
|
+
principal,
|
|
129
|
+
threadId,
|
|
130
|
+
isNewChat,
|
|
131
|
+
text: aui.composer.getState().text ?? ""
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
window.addEventListener(signBackIn.ATHENA_SIGN_BACK_IN_EVENT, keep);
|
|
135
|
+
return () => window.removeEventListener(signBackIn.ATHENA_SIGN_BACK_IN_EVENT, keep);
|
|
136
|
+
}, [aui, principal, threadId, isNewChat]);
|
|
137
|
+
require$$0.useEffect(() => {
|
|
138
|
+
if (!ready || !principal || !threadId) return;
|
|
139
|
+
const kept = signBackInDraft.takeDraftKeptForSignBackIn({ principal, threadId, isNewChat });
|
|
140
|
+
if (kept === null) return;
|
|
141
|
+
void composerHandoff.applyComposerWrite({
|
|
142
|
+
target: aui,
|
|
143
|
+
store: null,
|
|
144
|
+
write: { text: kept, replace: false, send: false, focus: false }
|
|
145
|
+
});
|
|
146
|
+
}, [aui, ready, principal, threadId, isNewChat]);
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
117
149
|
const EMPTY_MODES = [];
|
|
118
150
|
const CHAT_OUTBOX_ATTACHMENT_READ_TIMEOUT_MS = 1e4;
|
|
119
151
|
function withEntry(record, key, value) {
|
|
@@ -152,7 +184,6 @@ function AthenaStatewireRuntimeMount({
|
|
|
152
184
|
extraRunConfig,
|
|
153
185
|
snapshotCache,
|
|
154
186
|
toolOutputs: toolOutputs2,
|
|
155
|
-
historyPages: historyPages2,
|
|
156
187
|
chatOutbox: chatOutbox2 = null,
|
|
157
188
|
sessionLane,
|
|
158
189
|
subagentLaneHistory
|
|
@@ -210,7 +241,6 @@ function AthenaStatewireRuntimeMount({
|
|
|
210
241
|
extraRunConfig,
|
|
211
242
|
snapshotCache,
|
|
212
243
|
toolOutputs: toolOutputs2,
|
|
213
|
-
historyPages: historyPages2,
|
|
214
244
|
subagentLaneHistory,
|
|
215
245
|
// The runtime already records every transport error on the diagnostics
|
|
216
246
|
// bus (with the channel-teardown split), so this layer only maps it to
|
|
@@ -421,7 +451,7 @@ function AthenaStatewireStandalone({
|
|
|
421
451
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
422
452
|
[modeKey, modeScope, modePicks, sessionChannels, published, setModePick, setSessionChannel]
|
|
423
453
|
);
|
|
424
|
-
const scope = published && /* @__PURE__ */ jsxRuntime.jsx(react.AuiProvider, { value: published.client, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(threadIdContext.AthenaStatewireThreadIdContext.Provider, { value: published.threadId, children: /* @__PURE__ */ jsxRuntime.jsx(statewireLifecycleContext.AthenaStatewireLifecycleContext.Provider, { value: published.lifecycle, children: /* @__PURE__ */ jsxRuntime.jsx(threadStatus.DeepAgentConnectionContext.Provider, { value: published.lifecycle.connection, children: /* @__PURE__ */ jsxRuntime.jsx(statewireServerLaneContext.AthenaStatewireServerLaneContext.Provider, { value: published.serverLane, children: /* @__PURE__ */ jsxRuntime.jsx(statewireWindowContext.StatewireToolOutputsContext.Provider, { value: runtimeProps.toolOutputs, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
454
|
+
const scope = published && /* @__PURE__ */ jsxRuntime.jsx(react.AuiProvider, { value: published.client, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(threadIdContext.AthenaStatewireThreadIdContext.Provider, { value: published.threadId, children: /* @__PURE__ */ jsxRuntime.jsx(statewireLifecycleContext.AthenaStatewireLifecycleContext.Provider, { value: published.lifecycle, children: /* @__PURE__ */ jsxRuntime.jsx(threadStatus.DeepAgentConnectionContext.Provider, { value: published.lifecycle.connection, children: /* @__PURE__ */ jsxRuntime.jsx(statewireServerLaneContext.AthenaStatewireServerLaneContext.Provider, { value: published.serverLane, children: /* @__PURE__ */ jsxRuntime.jsx(statewireWindowContext.StatewireToolOutputsContext.Provider, { value: runtimeProps.toolOutputs, children: /* @__PURE__ */ jsxRuntime.jsx(useTurnSteps.TurnStepsControlContext.Provider, { value: earlierStepsButton.EarlierStepsButton, children: /* @__PURE__ */ jsxRuntime.jsx(statewireHistoryContext.StatewireHistoryContext.Provider, { value: runtimeProps.historyStore, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.TooltipProvider, { children: [
|
|
425
455
|
/* @__PURE__ */ jsxRuntime.jsx(StatewireClientToolBridge.StatewireClientToolBridge, { tools: clientTools, threadId: published.threadId }),
|
|
426
456
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
427
457
|
StatewireThreadConfigLaneSync.StatewireThreadConfigLaneSync,
|
|
@@ -434,6 +464,7 @@ function AthenaStatewireStandalone({
|
|
|
434
464
|
published.threadId
|
|
435
465
|
),
|
|
436
466
|
/* @__PURE__ */ jsxRuntime.jsx(ComposerHandoffDrain, {}),
|
|
467
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComposerDraftCarry, { isNewChat: published.isNewChat }),
|
|
437
468
|
/* @__PURE__ */ jsxRuntime.jsx(useDeepAgentChatOutbox.DeepAgentChatOutboxContext.Provider, { value: published.outbox, children: /* @__PURE__ */ jsxRuntime.jsx(chatModeContext.AthenaChatModeSelectionContext.Provider, { value: chatModeSelection, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
438
469
|
sessionPersistenceContext.AthenaSessionPersistenceContext.Provider,
|
|
439
470
|
{
|
|
@@ -441,7 +472,7 @@ function AthenaStatewireStandalone({
|
|
|
441
472
|
children
|
|
442
473
|
}
|
|
443
474
|
) }) })
|
|
444
|
-
] }) }) }) }) }) }) }) }) }) })
|
|
475
|
+
] }) }) }) }) }) }) }) }) }) });
|
|
445
476
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
446
477
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
447
478
|
AthenaStatewireRuntimeMount,
|
|
@@ -659,11 +690,23 @@ function AthenaProvider({
|
|
|
659
690
|
data: { transport: "statewire", thread_list: enableThreadList }
|
|
660
691
|
});
|
|
661
692
|
}, [enableThreadList]);
|
|
662
|
-
const bridge = auth.useParentBridge({
|
|
663
|
-
trustedOrigins: configuredTrustedParentOrigins
|
|
664
|
-
});
|
|
665
693
|
const authContext = require$$0.useContext(AthenaAuthContext.AthenaAuthContext);
|
|
666
694
|
const authProviderToken = (authContext == null ? void 0 : authContext.accessToken) ?? null;
|
|
695
|
+
const bridge = auth.useParentBridge({
|
|
696
|
+
trustedOrigins: configuredTrustedParentOrigins,
|
|
697
|
+
// The Marathon bridge sends the page through sign-in itself only when its
|
|
698
|
+
// token is the chat's credential: a sign-in provider above decides on its
|
|
699
|
+
// own, and a host credential keeps working when the bridge's session ends.
|
|
700
|
+
signBackInOnSessionEnd: signBackIn.bridgeOwnsCredential({
|
|
701
|
+
signInProviderAbove: authContext !== null,
|
|
702
|
+
token: configuredToken,
|
|
703
|
+
getToken: configuredGetToken,
|
|
704
|
+
apiKey: configuredApiKey
|
|
705
|
+
})
|
|
706
|
+
});
|
|
707
|
+
require$$0.useEffect(() => {
|
|
708
|
+
signBackIn.restoreSignBackInHash();
|
|
709
|
+
}, []);
|
|
667
710
|
const offlineHistoryRef = require$$0.useRef(offlineHistory$1);
|
|
668
711
|
offlineHistoryRef.current = offlineHistory$1;
|
|
669
712
|
const isOfflineNow = () => {
|
|
@@ -747,14 +790,18 @@ function AthenaProvider({
|
|
|
747
790
|
);
|
|
748
791
|
const [composerHandoff$1] = require$$0.useState(composerHandoff.createComposerHandoffStore);
|
|
749
792
|
const [toolOutputs$1] = require$$0.useState(() => toolOutputs.createDeepAgentToolOutputStore());
|
|
750
|
-
const [
|
|
751
|
-
const [historyStore] = require$$0.useState(statewireHistoryContext.createStatewireHistoryStore);
|
|
793
|
+
const [historyStore$1] = require$$0.useState(statewireHistoryContext.createStatewireHistoryStore);
|
|
752
794
|
const principal = ((_a = authContext == null ? void 0 : authContext.user) == null ? void 0 : _a.userId) ?? "";
|
|
795
|
+
const pagedIdentity = require$$0.useRef(null);
|
|
753
796
|
require$$0.useEffect(() => {
|
|
754
797
|
snapshotCache.clear();
|
|
755
798
|
toolOutputs$1.clear();
|
|
756
|
-
|
|
757
|
-
|
|
799
|
+
const previous = pagedIdentity.current;
|
|
800
|
+
if (previous !== null && (previous.principal !== principal || previous.apiKey !== configuredApiKey)) {
|
|
801
|
+
historyStore.clearDeepAgentHistoryStores();
|
|
802
|
+
}
|
|
803
|
+
pagedIdentity.current = { principal, apiKey: configuredApiKey };
|
|
804
|
+
}, [snapshotCache, toolOutputs$1, principal, configuredApiKey]);
|
|
758
805
|
const sessionPrincipal = statewireSessionKey.statewireSessionPrincipal(authContext);
|
|
759
806
|
const [sessionLane] = require$$0.useState(
|
|
760
807
|
() => statewireSessionLane.createStatewireSessionLaneGate({ pending: sessionPrincipal === null })
|
|
@@ -837,8 +884,7 @@ function AthenaProvider({
|
|
|
837
884
|
extraRunConfig: configuredExtraRunConfig,
|
|
838
885
|
snapshotCache,
|
|
839
886
|
toolOutputs: toolOutputs$1,
|
|
840
|
-
|
|
841
|
-
historyStore,
|
|
887
|
+
historyStore: historyStore$1,
|
|
842
888
|
chatOutbox: chatOutboxHost,
|
|
843
889
|
sessionLane,
|
|
844
890
|
subagentLaneHistory,
|