@opengeni/react 0.28.2 → 0.29.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/dist/{chunk-4F2YLLHP.js → chunk-AVLMIWYO.js} +3 -12
- package/dist/chunk-AVLMIWYO.js.map +1 -0
- package/dist/{chunk-PMSGE233.js → chunk-CSJBF3QJ.js} +2 -2
- package/dist/{chunk-XVVQP7A4.js → chunk-IPVOVOW6.js} +2 -2
- package/dist/{chunk-OCHBZ2X7.js → chunk-OKXCECLG.js} +22 -7
- package/dist/chunk-OKXCECLG.js.map +1 -0
- package/dist/{chunk-WAA247AB.js → chunk-ZMNPFZWL.js} +62 -2
- package/dist/{chunk-WAA247AB.js.map → chunk-ZMNPFZWL.js.map} +1 -1
- package/dist/composer.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/{session-C3tIXLim.d.ts → session-DaONt-dY.d.ts} +1 -1
- package/dist/{session-ui-B_7cfN5u.d.ts → session-ui-B5_roA95.d.ts} +1 -1
- package/dist/session-ui.d.ts +2 -2
- package/dist/session-ui.js +2 -2
- package/dist/session.d.ts +2 -2
- package/dist/session.js +3 -3
- package/dist/{use-turn-queue-Drm_ypue.d.ts → use-turn-queue-D_1a8W_l.d.ts} +20 -2
- package/package.json +2 -2
- package/src/components/message-timeline.tsx +78 -0
- package/src/hooks/use-composer.ts +1 -15
- package/src/index.ts +2 -0
- package/src/session.ts +2 -0
- package/src/timeline/index.ts +2 -0
- package/src/timeline/projection.ts +26 -6
- package/src/timeline/types.ts +26 -0
- package/dist/chunk-4F2YLLHP.js.map +0 -1
- package/dist/chunk-OCHBZ2X7.js.map +0 -1
- /package/dist/{chunk-PMSGE233.js.map → chunk-CSJBF3QJ.js.map} +0 -0
- /package/dist/{chunk-XVVQP7A4.js.map → chunk-IPVOVOW6.js.map} +0 -0
package/dist/composer.js
CHANGED
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
defaultChatComposerMessages,
|
|
24
24
|
useChatComposer,
|
|
25
25
|
useChatComposerController
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IPVOVOW6.js";
|
|
27
27
|
import "./chunk-TK7G6XLT.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-AVLMIWYO.js";
|
|
29
29
|
import "./chunk-HQFPO7VX.js";
|
|
30
30
|
import "./chunk-M7X4JZOD.js";
|
|
31
31
|
export {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,18 +5,18 @@ import { WorkspaceControlEvent, EffectiveSessionControl, ClientModel, ScheduledT
|
|
|
5
5
|
export { MachineKind, MachineMetricsSeriesResponse, MachineState, MachineView, MachinesResponse, MetricSample } from '@opengeni/sdk';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import { ReactNode, ClipboardEvent, RefObject } from 'react';
|
|
8
|
-
import { P as PendingApproval } from './session-
|
|
9
|
-
export { B as BrowserSessionEventWindow, a as PendingHumanInputRequest, S as SESSION_EVENT_BROWSER_MAX_BYTES, b as SESSION_EVENT_BROWSER_MAX_COUNT, c as SESSION_EVENT_BROWSER_PENDING_MAX_BYTES, d as SESSION_EVENT_BROWSER_PENDING_MAX_COUNT, e as SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, u as boundBrowserSessionEventWindow, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-
|
|
8
|
+
import { P as PendingApproval } from './session-DaONt-dY.js';
|
|
9
|
+
export { B as BrowserSessionEventWindow, a as PendingHumanInputRequest, S as SESSION_EVENT_BROWSER_MAX_BYTES, b as SESSION_EVENT_BROWSER_MAX_COUNT, c as SESSION_EVENT_BROWSER_PENDING_MAX_BYTES, d as SESSION_EVENT_BROWSER_PENDING_MAX_COUNT, e as SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, u as boundBrowserSessionEventWindow, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-DaONt-dY.js';
|
|
10
10
|
import { C as ComposerState, S as SessionEventFeedOptions } from './use-composer-ClHy1rkL.js';
|
|
11
11
|
export { a as ComposerSendExtras, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-ClHy1rkL.js';
|
|
12
12
|
import { C as ComposerControlLinks, a as ComposerTranscriptionControlProps, S as SlashCommand, b as SlashCommandContext, c as ChatComposerMessages, d as SlashArg, e as CommandContext } from './composer-BMzimGTO.js';
|
|
13
13
|
export { f as CommandResult, g as ComposerTranscriptionControl, h as ComposerTranscriptionMessages, i as ConfirmState, I as INITIAL_TRANSCRIPTION_CONTROL_STATE, N as Notice, O as OPEN_WORKSTREAM_CONTROL_EVENT, j as SlashCommandHandlers, T as TranscriptionControlAction, k as TranscriptionControlState, l as TranscriptionControlTransition, U as UseSlashCommandsOptions, m as UseSlashCommandsResult, n as UseTranscriptionOptions, o as UseTranscriptionResult, p as appendFinalTranscript, q as defaultChatComposerMessages, t as transitionTranscriptionControl, u as useSlashCommands, r as useTranscription } from './composer-BMzimGTO.js';
|
|
14
14
|
import { U as UseFileAttachmentsResult } from './use-file-attachments-BmT8WtqO.js';
|
|
15
15
|
export { F as FileAttachment, a as UseFileAttachmentsOptions, u as useFileAttachments } from './use-file-attachments-BmT8WtqO.js';
|
|
16
|
-
import { A as ActivityItem } from './use-turn-queue-
|
|
17
|
-
export { a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem,
|
|
18
|
-
import { c as createToolRegistry, T as ToolRegistry } from './session-ui-
|
|
19
|
-
export { B as BUILT_IN_TURN_SUMMARY_FACET_IDS, a as BuiltInTurnSummaryFacetId, C as CreateToolRegistryOptions, H as HumanInputAnswerDraft, b as HumanInputForm, d as HumanInputFormMessages, e as HumanInputFormProps, M as MessageTimeline, f as MessageTimelineProps, Q as QueueSurface, g as QueueSurfaceProps, h as TimelineRow, i as ToolRegistryEntry, j as ToolRenderer, k as ToolRendererProps, l as TurnSummary, m as TurnSummaryContext, n as TurnSummaryFacet, o as TurnSummaryFacetConfiguration, p as TurnSummaryFacetResult, q as TurnSummaryOptions, r as TurnSummaryProps, s as answersFromDrafts, t as defaultHumanInputFormMessages, u as rawTypeOf } from './session-ui-
|
|
16
|
+
import { A as ActivityItem } from './use-turn-queue-D_1a8W_l.js';
|
|
17
|
+
export { a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, M as MachineInputBatchItem, c as MachineInputMember, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem, d as SessionStatusItem, T as TimelineGroup, e as TimelineItem, f as ToolCallItem, g as TurnEndItem, h as TurnOutcome, U as UseTurnQueueOptions, i as UseTurnQueueResult, j as UserMessageItem, W as WorkerItem, k as isTurnQueueEvent, u as useTurnQueue } from './use-turn-queue-D_1a8W_l.js';
|
|
18
|
+
import { c as createToolRegistry, T as ToolRegistry } from './session-ui-B5_roA95.js';
|
|
19
|
+
export { B as BUILT_IN_TURN_SUMMARY_FACET_IDS, a as BuiltInTurnSummaryFacetId, C as CreateToolRegistryOptions, H as HumanInputAnswerDraft, b as HumanInputForm, d as HumanInputFormMessages, e as HumanInputFormProps, M as MessageTimeline, f as MessageTimelineProps, Q as QueueSurface, g as QueueSurfaceProps, h as TimelineRow, i as ToolRegistryEntry, j as ToolRenderer, k as ToolRendererProps, l as TurnSummary, m as TurnSummaryContext, n as TurnSummaryFacet, o as TurnSummaryFacetConfiguration, p as TurnSummaryFacetResult, q as TurnSummaryOptions, r as TurnSummaryProps, s as answersFromDrafts, t as defaultHumanInputFormMessages, u as rawTypeOf } from './session-ui-B5_roA95.js';
|
|
20
20
|
export { CONNECTION_STATUS_META, ConnectionDot, ConnectionDotProps, ConnectionStatus, ConnectionStatusMeta, ConnectionStatusPill, ConnectionStatusPillProps, DeviceFlowPhase, EnrollmentConsent, EnrollmentConsentMachine, EnrollmentConsentPhase, EnrollmentConsentProps, EnrollmentDeviceFlow, EnrollmentDeviceFlowProps, HEALTH_TOKEN, HealthLevel, HealthVerdict, MACHINE_STATE_BADGE_META, METRICS, METRIC_WINDOWS, MachineCard, MachineCardProps, MachineDetail, MachineDetailProps, MachineDockBar, MachineDockBarProps, MachineHealthPill, MachineHealthPillProps, MachineMetrics, MachineMetricsProps, MachineStateBadgeMeta, MachineStatusPill, MachineStatusPillProps, MachinesClientLike, MachinesDashboard, MachinesDashboardProps, MetricDef, MetricHistoryChart, MetricHistoryChartProps, MetricKey, MetricSparkline, MetricSparklineProps, MetricWindow, SeriesPoint, SharedMachineDisclosure, SharedMachineDisclosureProps, UseMachinesOptions, UseMachinesResult, WINDOW_LABEL, connectionStatusForState, deriveHealth, healthPulses, pointsFor, useMachines } from './machines.js';
|
|
21
21
|
import { ClassValue } from 'clsx';
|
|
22
22
|
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
useChatComposerController,
|
|
37
37
|
useSlashCommands,
|
|
38
38
|
useTranscription
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-IPVOVOW6.js";
|
|
40
40
|
import {
|
|
41
41
|
CONNECTION_STATUS_META,
|
|
42
42
|
ConnectionDot,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
useLightboxOptional,
|
|
113
113
|
useThemeType,
|
|
114
114
|
v4aToGitFileDiff
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-ZMNPFZWL.js";
|
|
116
116
|
import {
|
|
117
117
|
cn
|
|
118
118
|
} from "./chunk-TK7G6XLT.js";
|
|
@@ -142,14 +142,14 @@ import {
|
|
|
142
142
|
useSessionLineage,
|
|
143
143
|
useSessionMcpApprovalPolicy,
|
|
144
144
|
useTurnQueue
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-CSJBF3QJ.js";
|
|
146
146
|
import {
|
|
147
147
|
FILE_ONLY_MESSAGE_TEXT,
|
|
148
148
|
composeSendInput,
|
|
149
149
|
shouldSteerOnKey,
|
|
150
150
|
shouldSubmitOnKey,
|
|
151
151
|
useComposer
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-AVLMIWYO.js";
|
|
153
153
|
import {
|
|
154
154
|
useMutationRunner,
|
|
155
155
|
useOpenGeni,
|
|
@@ -164,7 +164,7 @@ import {
|
|
|
164
164
|
groupTimeline,
|
|
165
165
|
sessionStatusFromEvents,
|
|
166
166
|
toolDisplayName
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-OKXCECLG.js";
|
|
168
168
|
import {
|
|
169
169
|
CREDIT_EXHAUSTION_MESSAGE,
|
|
170
170
|
formatBytes,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { k as EmbeddedSessionReadClientOverride, a as EmbeddedSessionClientOverride, l as EmbeddedGoalClientOverride, m as EmbeddedSessionMcpApprovalPolicyClientOverride, n as EmbeddedSessionLineageClientOverride, o as EmbeddedHumanInputClientOverride } from './session-context-CAjlaeZb.js';
|
|
2
2
|
import { Session, SessionEvent, StreamConnectionState, SessionStatus, SessionGoal, SessionControlResponse, SessionMcpServerMetadata, SessionMcpApprovalPolicy, UpdateSessionMcpApprovalPolicyResponse, SessionLineageResponse, HumanInputQuestion, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from '@opengeni/sdk';
|
|
3
3
|
import { S as SessionEventFeedOptions } from './use-composer-ClHy1rkL.js';
|
|
4
|
-
import {
|
|
4
|
+
import { e as TimelineItem, T as TimelineGroup } from './use-turn-queue-D_1a8W_l.js';
|
|
5
5
|
import './use-file-attachments-BmT8WtqO.js';
|
|
6
6
|
|
|
7
7
|
type UseSessionOptions = EmbeddedSessionReadClientOverride & SessionEventFeedOptions & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { SessionHumanInputRequest, SubmitHumanInputResponseRequest, HumanInputQuestion, HumanInputAnswer, SessionEvent, SessionStatus } from '@opengeni/sdk';
|
|
3
3
|
import { ReactNode, ComponentType } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { i as UseTurnQueueResult, f as ToolCallItem, A as ActivityItem, h as TurnOutcome, e as TimelineItem, a as AgentMessageItem, j as UserMessageItem, b as AuthNeededItem } from './use-turn-queue-D_1a8W_l.js';
|
|
5
5
|
import { C as ComposerState } from './use-composer-ClHy1rkL.js';
|
|
6
6
|
|
|
7
7
|
/** The sole pending-input surface: compact above Goal, Agents, and composer. */
|
package/dist/session-ui.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { B as BUILT_IN_TURN_SUMMARY_FACET_IDS, a as BuiltInTurnSummaryFacetId, H as HumanInputAnswerDraft, b as HumanInputForm, d as HumanInputFormMessages, e as HumanInputFormProps, M as MessageTimeline, f as MessageTimelineProps, Q as QueueSurface, g as QueueSurfaceProps, h as TimelineRow, m as TurnSummaryContext, n as TurnSummaryFacet, o as TurnSummaryFacetConfiguration, p as TurnSummaryFacetResult, q as TurnSummaryOptions } from './session-ui-
|
|
1
|
+
export { B as BUILT_IN_TURN_SUMMARY_FACET_IDS, a as BuiltInTurnSummaryFacetId, H as HumanInputAnswerDraft, b as HumanInputForm, d as HumanInputFormMessages, e as HumanInputFormProps, M as MessageTimeline, f as MessageTimelineProps, Q as QueueSurface, g as QueueSurfaceProps, h as TimelineRow, m as TurnSummaryContext, n as TurnSummaryFacet, o as TurnSummaryFacetConfiguration, p as TurnSummaryFacetResult, q as TurnSummaryOptions } from './session-ui-B5_roA95.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '@opengeni/sdk';
|
|
4
4
|
import 'react';
|
|
5
|
-
import './use-turn-queue-
|
|
5
|
+
import './use-turn-queue-D_1a8W_l.js';
|
|
6
6
|
import './session-context-CAjlaeZb.js';
|
|
7
7
|
import './use-composer-ClHy1rkL.js';
|
package/dist/session-ui.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
MessageTimeline,
|
|
5
5
|
QueueSurface,
|
|
6
6
|
TimelineRow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZMNPFZWL.js";
|
|
8
8
|
import "./chunk-TK7G6XLT.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-OKXCECLG.js";
|
|
10
10
|
import "./chunk-M7X4JZOD.js";
|
|
11
11
|
import "./chunk-YDNWMKXO.js";
|
|
12
12
|
export {
|
package/dist/session.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { a as ClientOverride, b as FileAttachmentClientLike, E as FileAttachmentClientOverride, c as GoalClientLike, l as GoalClientOverride, o as HumanInputClientOverride, d as HumanInputSessionClientLike, e as SessionClientLike, g as SessionLineageClientLike, n as SessionLineageClientOverride, h as SessionMcpApprovalPolicyClientLike, m as SessionMcpApprovalPolicyClientOverride, i as SessionReadClientLike, k as SessionReadClientOverride } from './session-context-CAjlaeZb.js';
|
|
2
|
-
export { P as PendingApproval, a as PendingHumanInputRequest, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-
|
|
2
|
+
export { P as PendingApproval, a as PendingHumanInputRequest, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-DaONt-dY.js';
|
|
3
3
|
export { a as ComposerSendExtras, C as ComposerState, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-ClHy1rkL.js';
|
|
4
4
|
export { F as FileAttachment, a as UseFileAttachmentsOptions, U as UseFileAttachmentsResult, u as useFileAttachments } from './use-file-attachments-BmT8WtqO.js';
|
|
5
|
-
export { A as ActivityItem, a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, M as MemoryItem, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem,
|
|
5
|
+
export { A as ActivityItem, a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, M as MachineInputBatchItem, c as MachineInputMember, l as MemoryItem, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem, d as SessionStatusItem, T as TimelineGroup, e as TimelineItem, f as ToolCallItem, g as TurnEndItem, h as TurnOutcome, U as UseTurnQueueOptions, i as UseTurnQueueResult, j as UserMessageItem, m as WorkerCompletionItem, W as WorkerItem, k as isTurnQueueEvent, u as useTurnQueue } from './use-turn-queue-D_1a8W_l.js';
|
|
6
6
|
import '@opengeni/sdk';
|
package/dist/session.js
CHANGED
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
useSessionLineage,
|
|
19
19
|
useSessionMcpApprovalPolicy,
|
|
20
20
|
useTurnQueue
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CSJBF3QJ.js";
|
|
22
22
|
import {
|
|
23
23
|
FILE_ONLY_MESSAGE_TEXT,
|
|
24
24
|
composeSendInput,
|
|
25
25
|
shouldSteerOnKey,
|
|
26
26
|
shouldSubmitOnKey,
|
|
27
27
|
useComposer
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AVLMIWYO.js";
|
|
29
29
|
import "./chunk-HQFPO7VX.js";
|
|
30
30
|
import {
|
|
31
31
|
buildTimeline,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
groupTimeline,
|
|
35
35
|
sessionStatusFromEvents,
|
|
36
36
|
toolDisplayName
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OKXCECLG.js";
|
|
38
38
|
import "./chunk-M7X4JZOD.js";
|
|
39
39
|
export {
|
|
40
40
|
FILE_ONLY_MESSAGE_TEXT,
|
|
@@ -189,6 +189,24 @@ type NoticeItem = {
|
|
|
189
189
|
};
|
|
190
190
|
occurredAt: string;
|
|
191
191
|
};
|
|
192
|
+
type MachineInputMember = {
|
|
193
|
+
id: string;
|
|
194
|
+
kind: "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result";
|
|
195
|
+
classification: "success" | "failure" | "action_required" | "info";
|
|
196
|
+
sourceId: string;
|
|
197
|
+
summary: string;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* One or more durable non-human inputs that joined the following agent turn.
|
|
201
|
+
* This is communication, not a warning or a protocol-debug payload.
|
|
202
|
+
*/
|
|
203
|
+
type MachineInputBatchItem = {
|
|
204
|
+
kind: "machine-input-batch";
|
|
205
|
+
id: string;
|
|
206
|
+
turnId: string | null;
|
|
207
|
+
members: MachineInputMember[];
|
|
208
|
+
occurredAt: string;
|
|
209
|
+
};
|
|
192
210
|
/**
|
|
193
211
|
* A tool call hit a missing or lapsed connection. The broker reports that
|
|
194
212
|
* condition as a tool error and the turn continues; reconnecting never resumes
|
|
@@ -227,7 +245,7 @@ type TurnEndItem = {
|
|
|
227
245
|
failureText: string | null;
|
|
228
246
|
occurredAt: string;
|
|
229
247
|
};
|
|
230
|
-
type TimelineItem = UserMessageItem | AgentMessageItem | ReasoningItem | ToolCallItem | WorkerItem | WorkerCompletionItem | SandboxItem | SessionStatusItem | GoalItem | NoticeItem | AuthNeededItem | MemoryItem | FleetDecisionItem | TurnEndItem;
|
|
248
|
+
type TimelineItem = UserMessageItem | AgentMessageItem | ReasoningItem | ToolCallItem | WorkerItem | WorkerCompletionItem | SandboxItem | SessionStatusItem | GoalItem | NoticeItem | MachineInputBatchItem | AuthNeededItem | MemoryItem | FleetDecisionItem | TurnEndItem;
|
|
231
249
|
/** Activity items cluster between chat messages (reasoning, tools, workers, sandbox, memory). */
|
|
232
250
|
type ActivityItem = ReasoningItem | ToolCallItem | WorkerItem | SandboxItem | MemoryItem | FleetDecisionItem;
|
|
233
251
|
type TimelineGroup = {
|
|
@@ -291,4 +309,4 @@ type UseTurnQueueResult = {
|
|
|
291
309
|
*/
|
|
292
310
|
declare function useTurnQueue(sessionId: string | null | undefined, options?: UseTurnQueueOptions): UseTurnQueueResult;
|
|
293
311
|
|
|
294
|
-
export { type ActivityItem as A, type GoalItem as G, type
|
|
312
|
+
export { type ActivityItem as A, type GoalItem as G, type MachineInputBatchItem as M, type NoticeItem as N, type QueueMutationKind as Q, type ReasoningItem as R, type SandboxItem as S, type TimelineGroup as T, type UseTurnQueueOptions as U, type WorkerItem as W, type AgentMessageItem as a, type AuthNeededItem as b, type MachineInputMember as c, type SessionStatusItem as d, type TimelineItem as e, type ToolCallItem as f, type TurnEndItem as g, type TurnOutcome as h, type UseTurnQueueResult as i, type UserMessageItem as j, isTurnQueueEvent as k, type MemoryItem as l, type WorkerCompletionItem as m, useTurnQueue as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "React hooks and styled components for OpenGeni: live session streaming, chat composer, message timeline, session status, and fleet views — token-themed (CSS variables), dark-first, built on Tailwind v4 + Radix + Motion.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@dnd-kit/utilities": "3.2.2",
|
|
67
67
|
"@fontsource-variable/noto-sans-arabic": "5.2.10",
|
|
68
68
|
"@fontsource-variable/noto-sans-jp": "5.2.10",
|
|
69
|
-
"@opengeni/sdk": "^0.
|
|
69
|
+
"@opengeni/sdk": "^0.29.0",
|
|
70
70
|
"clsx": "^2.1.1",
|
|
71
71
|
"lucide-react": "^1.8.0",
|
|
72
72
|
"motion": "^12.0.0",
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
type AgentMessageItem,
|
|
43
43
|
type AuthNeededItem,
|
|
44
44
|
type GoalItem,
|
|
45
|
+
type MachineInputBatchItem,
|
|
45
46
|
type NoticeItem,
|
|
46
47
|
type TimelineGroup,
|
|
47
48
|
type TimelineItem,
|
|
@@ -843,6 +844,8 @@ export function TimelineRow({
|
|
|
843
844
|
return <SessionStatusRow item={item} />;
|
|
844
845
|
case "goal":
|
|
845
846
|
return <GoalRow item={item} />;
|
|
847
|
+
case "machine-input-batch":
|
|
848
|
+
return <MachineInputBatchRow item={item} />;
|
|
846
849
|
case "notice":
|
|
847
850
|
return <NoticeRow item={item} />;
|
|
848
851
|
case "auth-needed":
|
|
@@ -1165,6 +1168,81 @@ function GoalRow({ item }: { item: GoalItem }) {
|
|
|
1165
1168
|
);
|
|
1166
1169
|
}
|
|
1167
1170
|
|
|
1171
|
+
const MACHINE_INPUT_META: Record<MachineInputBatchItem["members"][number]["kind"], string> = {
|
|
1172
|
+
scheduled_occurrence: "Scheduled update",
|
|
1173
|
+
goal_continuation: "Goal continued",
|
|
1174
|
+
agent_message: "Agent update",
|
|
1175
|
+
agent_steer_instruction: "Agent direction",
|
|
1176
|
+
child_terminal_result: "Agent finished",
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
function MachineInputBatchRow({ item }: { item: MachineInputBatchItem }) {
|
|
1180
|
+
const enter = useEntranceAnimation();
|
|
1181
|
+
const visible = item.members.slice(0, 3);
|
|
1182
|
+
return (
|
|
1183
|
+
<div
|
|
1184
|
+
className={cn(
|
|
1185
|
+
enter && "animate-og-enter",
|
|
1186
|
+
"rounded-og-md border border-og-border/70 bg-og-surface-1/55 px-3 py-2.5",
|
|
1187
|
+
)}
|
|
1188
|
+
>
|
|
1189
|
+
{item.members.length > 1 && (
|
|
1190
|
+
<div className="mb-2 text-xs font-medium text-og-fg-subtle">
|
|
1191
|
+
{item.members.length} updates joined this turn
|
|
1192
|
+
</div>
|
|
1193
|
+
)}
|
|
1194
|
+
<div className="space-y-2">
|
|
1195
|
+
{visible.map((member) => (
|
|
1196
|
+
<MachineInputRow key={member.id} member={member} />
|
|
1197
|
+
))}
|
|
1198
|
+
</div>
|
|
1199
|
+
{item.members.length > visible.length && (
|
|
1200
|
+
<details className="mt-2 pl-8 text-xs text-og-fg-muted">
|
|
1201
|
+
<summary className="cursor-pointer select-none hover:text-og-fg">
|
|
1202
|
+
Show {item.members.length - visible.length} more
|
|
1203
|
+
</summary>
|
|
1204
|
+
<div className="mt-2 space-y-2">
|
|
1205
|
+
{item.members.slice(visible.length).map((member) => (
|
|
1206
|
+
<MachineInputRow key={member.id} member={member} />
|
|
1207
|
+
))}
|
|
1208
|
+
</div>
|
|
1209
|
+
</details>
|
|
1210
|
+
)}
|
|
1211
|
+
</div>
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
function MachineInputRow({ member }: { member: MachineInputBatchItem["members"][number] }) {
|
|
1216
|
+
const source = readableMachineInputSource(member.sourceId);
|
|
1217
|
+
return (
|
|
1218
|
+
<div className="flex min-w-0 items-start gap-2.5">
|
|
1219
|
+
<span className="mt-2 size-1.5 shrink-0 rounded-full bg-og-fg-subtle" aria-hidden />
|
|
1220
|
+
<div className="min-w-0 flex-1">
|
|
1221
|
+
<span className="text-xs font-medium text-og-fg-muted">
|
|
1222
|
+
{MACHINE_INPUT_META[member.kind]}
|
|
1223
|
+
</span>
|
|
1224
|
+
{source && <span className="ml-1.5 text-xs text-og-fg-subtle">from {source}</span>}
|
|
1225
|
+
{member.summary && (
|
|
1226
|
+
<p className="mt-0.5 whitespace-pre-wrap break-words text-sm leading-5 text-og-fg">
|
|
1227
|
+
{truncate(cleanMachineInputSummary(member.summary), 320)}
|
|
1228
|
+
</p>
|
|
1229
|
+
)}
|
|
1230
|
+
</div>
|
|
1231
|
+
</div>
|
|
1232
|
+
);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
function readableMachineInputSource(sourceId: string): string | null {
|
|
1236
|
+
const value = sourceId.trim();
|
|
1237
|
+
if (!value || /^[0-9a-f]{8}-[0-9a-f-]{27,}$/i.test(value)) return null;
|
|
1238
|
+
if (/^(goal|schedule|system):/i.test(value)) return null;
|
|
1239
|
+
return value.replaceAll("_", " ");
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
function cleanMachineInputSummary(summary: string): string {
|
|
1243
|
+
return summary.replace(/^\[[A-Z][A-Z _-]*(?:\s+\d+\/\d+)?\]\s*/, "").trim();
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1168
1246
|
function NoticeRow({ item }: { item: NoticeItem }) {
|
|
1169
1247
|
const enter = useEntranceAnimation();
|
|
1170
1248
|
const tone =
|
|
@@ -773,14 +773,8 @@ export function useComposer(
|
|
|
773
773
|
// The wire contract requires non-empty text (z.string().min(1)) and the
|
|
774
774
|
// worker rejects whitespace-only text; a file-only message therefore
|
|
775
775
|
// carries a minimal default so the attachments still get delivered.
|
|
776
|
-
const acknowledgedDraft = draftRef.current;
|
|
777
|
-
const sendExtras =
|
|
778
|
-
acknowledgedDraft?.toolsProvided === true &&
|
|
779
|
-
!Object.prototype.hasOwnProperty.call(extras, "tools")
|
|
780
|
-
? { ...extras, tools: acknowledgedDraft.tools }
|
|
781
|
-
: extras;
|
|
782
776
|
pendingClientEventId.current ??= generateClientEventId();
|
|
783
|
-
const input = composeSendInput(sendText, pendingClientEventId.current,
|
|
777
|
+
const input = composeSendInput(sendText, pendingClientEventId.current, extras, {
|
|
784
778
|
...(options.effectiveControl?.controlEtag
|
|
785
779
|
? { controlEtag: options.effectiveControl.controlEtag }
|
|
786
780
|
: {}),
|
|
@@ -1033,13 +1027,10 @@ export function useComposer(
|
|
|
1033
1027
|
const hasDraftContent = useCallback((): boolean => {
|
|
1034
1028
|
const current = draftRef.current;
|
|
1035
1029
|
const extras = resolveSendExtras(sendExtrasRef.current);
|
|
1036
|
-
const toolsProvidedByHost = Object.prototype.hasOwnProperty.call(extras, "tools");
|
|
1037
|
-
const tools = toolsProvidedByHost ? (extras.tools ?? []) : (current?.tools ?? []);
|
|
1038
1030
|
return (
|
|
1039
1031
|
valueRef.current.length > 0 ||
|
|
1040
1032
|
restoredResourcesRef.current.length > 0 ||
|
|
1041
1033
|
(extras.resources?.length ?? 0) > 0 ||
|
|
1042
|
-
tools.length > 0 ||
|
|
1043
1034
|
(current?.sourceTurnId !== null && current?.sourceTurnId !== undefined)
|
|
1044
1035
|
);
|
|
1045
1036
|
}, []);
|
|
@@ -1201,8 +1192,6 @@ function draftPayload(draft: ComposerDraft): SaveComposerDraftRequest {
|
|
|
1201
1192
|
expectedRevision: draft.revision,
|
|
1202
1193
|
text: draft.text,
|
|
1203
1194
|
resources: draft.resources,
|
|
1204
|
-
tools: draft.tools,
|
|
1205
|
-
toolsProvided: draft.toolsProvided,
|
|
1206
1195
|
model: draft.model,
|
|
1207
1196
|
reasoningEffort: draft.reasoningEffort,
|
|
1208
1197
|
};
|
|
@@ -1214,13 +1203,10 @@ function composerDraftPayload(
|
|
|
1214
1203
|
restoredResources: ResourceRef[],
|
|
1215
1204
|
extras: ComposerSendExtras,
|
|
1216
1205
|
): SaveComposerDraftRequest {
|
|
1217
|
-
const toolsProvidedByHost = Object.prototype.hasOwnProperty.call(extras, "tools");
|
|
1218
1206
|
return {
|
|
1219
1207
|
expectedRevision: base.revision,
|
|
1220
1208
|
text,
|
|
1221
1209
|
resources: mergeResources(restoredResources, extras.resources ?? []),
|
|
1222
|
-
tools: toolsProvidedByHost ? (extras.tools ?? []) : base.tools,
|
|
1223
|
-
toolsProvided: toolsProvidedByHost ? true : base.toolsProvided,
|
|
1224
1210
|
model: extras.model ?? base.model,
|
|
1225
1211
|
reasoningEffort: extras.reasoningEffort ?? base.reasoningEffort,
|
|
1226
1212
|
};
|
package/src/index.ts
CHANGED
package/src/session.ts
CHANGED
package/src/timeline/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
ActivityItem,
|
|
12
12
|
AuthNeededItem,
|
|
13
13
|
GoalItem,
|
|
14
|
+
MachineInputBatchItem,
|
|
14
15
|
MemoryItem,
|
|
15
16
|
SandboxItem,
|
|
16
17
|
SessionStatusItem,
|
|
@@ -128,11 +129,10 @@ export function buildTimeline(events: SessionEvent[]): TimelineItem[] {
|
|
|
128
129
|
if (inputs.length === 0) break;
|
|
129
130
|
closeStreamingTail();
|
|
130
131
|
items.push({
|
|
131
|
-
kind: "
|
|
132
|
+
kind: "machine-input-batch",
|
|
132
133
|
id: event.id,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
details: { label: "Inputs", value: inputs },
|
|
134
|
+
turnId,
|
|
135
|
+
members: inputs,
|
|
136
136
|
occurredAt: event.occurredAt,
|
|
137
137
|
});
|
|
138
138
|
break;
|
|
@@ -1053,17 +1053,37 @@ function stringValue(value: unknown): string {
|
|
|
1053
1053
|
return typeof value === "string" ? value : "";
|
|
1054
1054
|
}
|
|
1055
1055
|
|
|
1056
|
-
function machineInputMembers(value: unknown) {
|
|
1056
|
+
function machineInputMembers(value: unknown): MachineInputBatchItem["members"] {
|
|
1057
|
+
const kinds = new Set<MachineInputBatchItem["members"][number]["kind"]>([
|
|
1058
|
+
"scheduled_occurrence",
|
|
1059
|
+
"goal_continuation",
|
|
1060
|
+
"agent_message",
|
|
1061
|
+
"agent_steer_instruction",
|
|
1062
|
+
"child_terminal_result",
|
|
1063
|
+
]);
|
|
1064
|
+
const classifications = new Set<MachineInputBatchItem["members"][number]["classification"]>([
|
|
1065
|
+
"success",
|
|
1066
|
+
"failure",
|
|
1067
|
+
"action_required",
|
|
1068
|
+
"info",
|
|
1069
|
+
]);
|
|
1057
1070
|
return Array.isArray(value)
|
|
1058
1071
|
? value.flatMap((candidate) => {
|
|
1059
1072
|
const member = asRecord(candidate);
|
|
1060
1073
|
return typeof member.id === "string" &&
|
|
1061
1074
|
typeof member.kind === "string" &&
|
|
1075
|
+
kinds.has(member.kind as MachineInputBatchItem["members"][number]["kind"]) &&
|
|
1076
|
+
typeof member.classification === "string" &&
|
|
1077
|
+
classifications.has(
|
|
1078
|
+
member.classification as MachineInputBatchItem["members"][number]["classification"],
|
|
1079
|
+
) &&
|
|
1062
1080
|
typeof member.sourceId === "string"
|
|
1063
1081
|
? [
|
|
1064
1082
|
{
|
|
1065
1083
|
id: member.id,
|
|
1066
|
-
kind: member.kind
|
|
1084
|
+
kind: member.kind as MachineInputBatchItem["members"][number]["kind"],
|
|
1085
|
+
classification:
|
|
1086
|
+
member.classification as MachineInputBatchItem["members"][number]["classification"],
|
|
1067
1087
|
sourceId: member.sourceId,
|
|
1068
1088
|
summary: stringValue(member.summary),
|
|
1069
1089
|
},
|
package/src/timeline/types.ts
CHANGED
|
@@ -226,6 +226,31 @@ export type NoticeItem = {
|
|
|
226
226
|
occurredAt: string;
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
+
export type MachineInputMember = {
|
|
230
|
+
id: string;
|
|
231
|
+
kind:
|
|
232
|
+
| "scheduled_occurrence"
|
|
233
|
+
| "goal_continuation"
|
|
234
|
+
| "agent_message"
|
|
235
|
+
| "agent_steer_instruction"
|
|
236
|
+
| "child_terminal_result";
|
|
237
|
+
classification: "success" | "failure" | "action_required" | "info";
|
|
238
|
+
sourceId: string;
|
|
239
|
+
summary: string;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* One or more durable non-human inputs that joined the following agent turn.
|
|
244
|
+
* This is communication, not a warning or a protocol-debug payload.
|
|
245
|
+
*/
|
|
246
|
+
export type MachineInputBatchItem = {
|
|
247
|
+
kind: "machine-input-batch";
|
|
248
|
+
id: string;
|
|
249
|
+
turnId: string | null;
|
|
250
|
+
members: MachineInputMember[];
|
|
251
|
+
occurredAt: string;
|
|
252
|
+
};
|
|
253
|
+
|
|
229
254
|
/**
|
|
230
255
|
* A tool call hit a missing or lapsed connection. The broker reports that
|
|
231
256
|
* condition as a tool error and the turn continues; reconnecting never resumes
|
|
@@ -278,6 +303,7 @@ export type TimelineItem =
|
|
|
278
303
|
| SessionStatusItem
|
|
279
304
|
| GoalItem
|
|
280
305
|
| NoticeItem
|
|
306
|
+
| MachineInputBatchItem
|
|
281
307
|
| AuthNeededItem
|
|
282
308
|
| MemoryItem
|
|
283
309
|
| FleetDecisionItem
|