@opengeni/react 6.0.0-canary.1 → 6.1.0-canary.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 +17 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/{chunk-VRBL3F5E.js → chunk-5GAL23FF.js} +10 -2
- package/dist/{chunk-VRBL3F5E.js.map → chunk-5GAL23FF.js.map} +1 -1
- package/dist/{chunk-IHQII5WO.js → chunk-G5JFM6ZE.js} +29 -4
- package/dist/chunk-G5JFM6ZE.js.map +1 -0
- package/dist/{chunk-UMECRJRV.js → chunk-HJ5VJ4JB.js} +21 -12
- package/dist/chunk-HJ5VJ4JB.js.map +1 -0
- package/dist/{chunk-R4KRSFGA.js → chunk-IP4BUBKH.js} +3 -3
- package/dist/{chunk-CC7AVRIJ.js → chunk-KZ4QDBGM.js} +87 -14
- package/dist/chunk-KZ4QDBGM.js.map +1 -0
- package/dist/{chunk-PZ27MCZP.js → chunk-L5VJYZIW.js} +34 -4
- package/dist/chunk-L5VJYZIW.js.map +1 -0
- package/dist/{chunk-45XEUVTK.js → chunk-UWVY3OXF.js} +12 -5
- package/dist/chunk-UWVY3OXF.js.map +1 -0
- package/dist/components/message-timeline.d.ts +2 -2
- package/dist/composer.js +4 -4
- package/dist/connect-panel.d.ts +2 -1
- package/dist/connect-setup.d.ts +3 -1
- package/dist/connect.d.ts +1 -0
- package/dist/connect.js +620 -424
- package/dist/connect.js.map +1 -1
- package/dist/connection-catalog.d.ts +6 -1
- package/dist/connection-installed.d.ts +1 -0
- package/dist/connection-logo.d.ts +4 -2
- package/dist/discovery-cache.d.ts +5 -0
- package/dist/index.js +7 -7
- package/dist/{model-policy-picker-menu-3R336DP2.js → model-policy-picker-menu-RVOQ4ZZG.js} +4 -4
- package/dist/model-policy.d.ts +6 -2
- package/dist/model-policy.js +1 -1
- package/dist/plugin-discovery.d.ts +4 -0
- package/dist/realtime.js +2 -2
- package/dist/session-ui.js +6 -6
- package/dist/session.js +1 -1
- package/dist/skill-discovery.d.ts +11 -0
- package/dist/timeline/projection.d.ts +3 -1
- package/dist/timeline/turn-summary.d.ts +2 -2
- package/package.json +3 -3
- package/src/capability-catalog-row.tsx +94 -0
- package/src/components/markdown.tsx +32 -3
- package/src/components/message-timeline.tsx +88 -4
- package/src/components/model-picker.tsx +11 -3
- package/src/components/model-policy-picker-menu.tsx +10 -3
- package/src/components/session-conversation.tsx +1 -3
- package/src/components/session-status.tsx +2 -2
- package/src/connect-panel.tsx +19 -8
- package/src/connect-setup.tsx +49 -14
- package/src/connect.ts +6 -0
- package/src/connection-catalog.tsx +61 -39
- package/src/connection-installed.tsx +2 -0
- package/src/connection-logo.tsx +14 -10
- package/src/discovery-cache.ts +42 -0
- package/src/hooks/use-session-events.ts +24 -2
- package/src/model-policy.ts +21 -0
- package/src/plugin-details.tsx +8 -5
- package/src/plugin-discovery.tsx +87 -71
- package/src/skill-discovery.tsx +101 -56
- package/src/timeline/projection.ts +31 -1
- package/src/timeline/turn-summary.tsx +3 -3
- package/styles/compiled.css +27 -0
- package/styles/connect.css +56 -15
- package/dist/chunk-45XEUVTK.js.map +0 -1
- package/dist/chunk-CC7AVRIJ.js.map +0 -1
- package/dist/chunk-IHQII5WO.js.map +0 -1
- package/dist/chunk-PZ27MCZP.js.map +0 -1
- package/dist/chunk-UMECRJRV.js.map +0 -1
- /package/dist/{chunk-R4KRSFGA.js.map → chunk-IP4BUBKH.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-3R336DP2.js.map → model-policy-picker-menu-RVOQ4ZZG.js.map} +0 -0
|
@@ -408,10 +408,13 @@ function timelineAnnotationToolOutputText(output) {
|
|
|
408
408
|
const text = (marker >= 0 ? raw.slice(marker + "\nOutput:\n".length) : raw.startsWith("Output:\n") ? raw.slice("Output:\n".length) : raw).replace(TIMELINE_ANNOTATION_ANSI_SEQUENCE, "");
|
|
409
409
|
return text.length > 0 ? text : null;
|
|
410
410
|
}
|
|
411
|
-
function buildTimeline(events) {
|
|
411
|
+
function buildTimeline(events, options = {}) {
|
|
412
412
|
const items = [];
|
|
413
413
|
const prescan = prescanTurnAnchors(events);
|
|
414
414
|
const ordered = orderTimelineEvents(events, prescan);
|
|
415
|
+
let completeHistoryPrefix = options.partialStart !== true;
|
|
416
|
+
const knownMessagePrefixTurns = /* @__PURE__ */ new Set();
|
|
417
|
+
const incompleteMessageKeys = /* @__PURE__ */ new Set();
|
|
415
418
|
const pendingWaitOutcomeByTurn = /* @__PURE__ */ new Map();
|
|
416
419
|
const latestAgentResponseByTurn = /* @__PURE__ */ new Map();
|
|
417
420
|
const identifiedMessages = /* @__PURE__ */ new Map();
|
|
@@ -529,6 +532,11 @@ function buildTimeline(events) {
|
|
|
529
532
|
for (const event of ordered) {
|
|
530
533
|
const payload = asRecord2(event.payload);
|
|
531
534
|
const turnId = event.turnId ?? null;
|
|
535
|
+
if (event.type === "session.created") {
|
|
536
|
+
completeHistoryPrefix = true;
|
|
537
|
+
} else if (event.type === "turn.started" || event.type === "user.message" && payload.delivery !== "steer" && payload.routing !== "accepted_for_steering") {
|
|
538
|
+
knownMessagePrefixTurns.add(turnId);
|
|
539
|
+
}
|
|
532
540
|
startupEvent = event;
|
|
533
541
|
startupTurnId = turnId;
|
|
534
542
|
startupAttemptId = (typeof event.turnAttemptId === "string" ? event.turnAttemptId : null) ?? stringValue(payload.attemptId);
|
|
@@ -618,6 +626,10 @@ function buildTimeline(events) {
|
|
|
618
626
|
}
|
|
619
627
|
const messageId = stringValue(payload.messageId);
|
|
620
628
|
const messageKey = messageId ? JSON.stringify([turnId, messageId]) : null;
|
|
629
|
+
if (!completeHistoryPrefix && !knownMessagePrefixTurns.has(turnId) || messageKey && incompleteMessageKeys.has(messageKey)) {
|
|
630
|
+
if (messageKey) incompleteMessageKeys.add(messageKey);
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
621
633
|
const identified = messageKey ? identifiedMessages.get(messageKey) : void 0;
|
|
622
634
|
if (identified) {
|
|
623
635
|
if (identified.annotationSource?.eventType !== "agent.message.completed") {
|
|
@@ -657,6 +669,7 @@ function buildTimeline(events) {
|
|
|
657
669
|
break;
|
|
658
670
|
}
|
|
659
671
|
case "agent.message.completed": {
|
|
672
|
+
knownMessagePrefixTurns.add(turnId);
|
|
660
673
|
const text = stringValue(payload.text);
|
|
661
674
|
const messageId = stringValue(payload.messageId);
|
|
662
675
|
const messageKey = messageId ? JSON.stringify([turnId, messageId]) : null;
|
|
@@ -2271,6 +2284,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2271
2284
|
const [eventWindow, setEventWindow] = useState(EMPTY_EVENT_WINDOW);
|
|
2272
2285
|
const [connectionState, setConnectionState] = useState("idle");
|
|
2273
2286
|
const [error, setError] = useState(null);
|
|
2287
|
+
const [newerError, setNewerError] = useState(null);
|
|
2274
2288
|
const [hasOlder, setHasOlder] = useState(false);
|
|
2275
2289
|
const [hasNewer, setHasNewer] = useState(false);
|
|
2276
2290
|
const [sessionStatusProjection, setSessionStatusProjection] = useState(
|
|
@@ -2308,6 +2322,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2308
2322
|
const [stateStreamKey, setStateStreamKey] = useState(streamKey);
|
|
2309
2323
|
useEffect(() => {
|
|
2310
2324
|
navigationGenerationRef.current += 1;
|
|
2325
|
+
setNewerError(null);
|
|
2311
2326
|
loadingOlderRef.current = false;
|
|
2312
2327
|
loadingNewerRef.current = false;
|
|
2313
2328
|
loadingOldestRef.current = false;
|
|
@@ -2720,6 +2735,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2720
2735
|
initialWindowLoadedRef.current = true;
|
|
2721
2736
|
viewModeRef.current = "history";
|
|
2722
2737
|
loadingOldestRef.current = false;
|
|
2738
|
+
setNewerError(null);
|
|
2723
2739
|
startTransition(() => {
|
|
2724
2740
|
if (status !== void 0) {
|
|
2725
2741
|
setSessionStatusProjection(status);
|
|
@@ -2764,6 +2780,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2764
2780
|
return false;
|
|
2765
2781
|
}
|
|
2766
2782
|
if (window.events.length === 0) {
|
|
2783
|
+
setNewerError(null);
|
|
2767
2784
|
hasNewerRef.current = false;
|
|
2768
2785
|
setHasNewer(false);
|
|
2769
2786
|
streamResumeSequenceRef.current = afterSequence;
|
|
@@ -2806,6 +2823,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2806
2823
|
resumeLive = true;
|
|
2807
2824
|
}
|
|
2808
2825
|
loadingNewerRef.current = false;
|
|
2826
|
+
setNewerError(null);
|
|
2809
2827
|
startTransition(() => {
|
|
2810
2828
|
if (status !== void 0) {
|
|
2811
2829
|
setSessionStatusProjection(status);
|
|
@@ -2821,6 +2839,12 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2821
2839
|
});
|
|
2822
2840
|
published = true;
|
|
2823
2841
|
return newer;
|
|
2842
|
+
} catch (reason) {
|
|
2843
|
+
if (navigationGenerationRef.current !== generation) {
|
|
2844
|
+
return false;
|
|
2845
|
+
}
|
|
2846
|
+
setNewerError(reason instanceof Error ? reason : new Error(String(reason)));
|
|
2847
|
+
throw reason;
|
|
2824
2848
|
} finally {
|
|
2825
2849
|
if (!published && navigationGenerationRef.current === generation) {
|
|
2826
2850
|
loadingNewerRef.current = false;
|
|
@@ -2834,6 +2858,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2834
2858
|
}
|
|
2835
2859
|
loadingLatestRef.current = true;
|
|
2836
2860
|
setLoadingLatest(true);
|
|
2861
|
+
setNewerError(null);
|
|
2837
2862
|
let published = false;
|
|
2838
2863
|
try {
|
|
2839
2864
|
streamAbortRef.current?.abort();
|
|
@@ -2866,7 +2891,12 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2866
2891
|
}, [after, sessionId]);
|
|
2867
2892
|
const identityMatches = stateStreamKey === streamKey;
|
|
2868
2893
|
const visibleEvents = identityMatches ? eventWindow.events : EMPTY_EVENTS;
|
|
2869
|
-
const timeline = useMemo(
|
|
2894
|
+
const timeline = useMemo(
|
|
2895
|
+
() => buildTimeline(visibleEvents, {
|
|
2896
|
+
partialStart: hasOlder || eventWindow.truncated || after > 0
|
|
2897
|
+
}),
|
|
2898
|
+
[visibleEvents, hasOlder, eventWindow.truncated, after]
|
|
2899
|
+
);
|
|
2870
2900
|
return {
|
|
2871
2901
|
events: visibleEvents,
|
|
2872
2902
|
timeline,
|
|
@@ -2887,7 +2917,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
2887
2917
|
loadOldest,
|
|
2888
2918
|
loadingLatest: !identityMatches ? false : loadingLatest,
|
|
2889
2919
|
jumpToLatest,
|
|
2890
|
-
error: identityMatches ? error : null
|
|
2920
|
+
error: identityMatches ? newerError ?? error : null
|
|
2891
2921
|
};
|
|
2892
2922
|
}
|
|
2893
2923
|
function boundBrowserSessionEventWindow(events, options = {}) {
|
|
@@ -3756,4 +3786,4 @@ export {
|
|
|
3756
3786
|
isHumanInputEvent,
|
|
3757
3787
|
useHumanInputRequests
|
|
3758
3788
|
};
|
|
3759
|
-
//# sourceMappingURL=chunk-
|
|
3789
|
+
//# sourceMappingURL=chunk-L5VJYZIW.js.map
|