@opengeni/react 7.1.2-canary.36079201993001 → 7.1.2

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/composer.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  useChatComposer,
41
41
  useChatComposerController,
42
42
  useVoiceInput
43
- } from "./chunk-6N3AZUOV.js";
43
+ } from "./chunk-4ACTWOOW.js";
44
44
  import {
45
45
  BillingClassMark,
46
46
  ModelPolicyPicker,
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ import {
114
114
  useWorkspaceModelCatalog,
115
115
  userMessageLikelyNeedsDisclosure,
116
116
  v4aToGitFileDiff
117
- } from "./chunk-AWIX4UAC.js";
117
+ } from "./chunk-VHEY4CB3.js";
118
118
  import "./chunk-GEN54DU5.js";
119
119
  import "./chunk-GBPCZH3Y.js";
120
120
  import "./chunk-ZYRGEKWS.js";
@@ -142,7 +142,7 @@ import {
142
142
  useSession,
143
143
  useSessionEvents,
144
144
  useTurnQueue
145
- } from "./chunk-SJ5HE4ZA.js";
145
+ } from "./chunk-VI7HELBI.js";
146
146
  import {
147
147
  OpenGeniProvider
148
148
  } from "./chunk-PAJU5KKL.js";
@@ -178,7 +178,7 @@ import {
178
178
  useSlashCommands,
179
179
  useTranscription,
180
180
  useVoiceInput
181
- } from "./chunk-6N3AZUOV.js";
181
+ } from "./chunk-4ACTWOOW.js";
182
182
  import {
183
183
  BillingClassMark,
184
184
  ModelPolicyPicker,
@@ -8174,7 +8174,7 @@ import {
8174
8174
  } from "lucide-react";
8175
8175
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
8176
8176
  var LazyBrowserViewer = lazy2(async () => {
8177
- const { BrowserViewer } = await import("./browser-viewer-K2H3SLIW.js");
8177
+ const { BrowserViewer } = await import("./browser-viewer-TZ6T76E3.js");
8178
8178
  return { default: BrowserViewer };
8179
8179
  });
8180
8180
  var LazyComputerViewer = lazy2(async () => {
@@ -7,7 +7,7 @@ import {
7
7
  useBrowserSession,
8
8
  useBrowserSessions,
9
9
  useSiteAuthConnections
10
- } from "./chunk-ETA37UZ7.js";
10
+ } from "./chunk-CP6IFD2Z.js";
11
11
  import {
12
12
  ComputerViewer,
13
13
  useComputerFrameStream,
@@ -19,16 +19,16 @@ import {
19
19
  setStartupDetails,
20
20
  useStartupDetails,
21
21
  userMessageLikelyNeedsDisclosure
22
- } from "./chunk-AWIX4UAC.js";
22
+ } from "./chunk-VHEY4CB3.js";
23
23
  import "./chunk-GEN54DU5.js";
24
24
  import "./chunk-GBPCZH3Y.js";
25
25
  import "./chunk-ZYRGEKWS.js";
26
26
  import "./chunk-WYWRYUNQ.js";
27
27
  import {
28
28
  createOlderHistoryLoadReceipt
29
- } from "./chunk-SJ5HE4ZA.js";
29
+ } from "./chunk-VI7HELBI.js";
30
30
  import "./chunk-PAJU5KKL.js";
31
- import "./chunk-6N3AZUOV.js";
31
+ import "./chunk-4ACTWOOW.js";
32
32
  import "./chunk-3LL47F4U.js";
33
33
  import "./chunk-AKOMC3VO.js";
34
34
  import "./chunk-IOLPHOF4.js";
package/dist/session.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  useSession,
30
30
  useSessionEvents,
31
31
  useTurnQueue
32
- } from "./chunk-SJ5HE4ZA.js";
32
+ } from "./chunk-VI7HELBI.js";
33
33
  import {
34
34
  FILE_ONLY_MESSAGE_TEXT,
35
35
  composeSendInput,
@@ -375,8 +375,6 @@ export type AuthNeededItem = {
375
375
  authorizationUrl: string | null;
376
376
  /** Agent-selected catalog recommendation. The host still owns authorization. */
377
377
  capability?: NonNullable<ToolAuthNeededPayload["capability"]> | null | undefined;
378
- /** Human-reviewed custom integration proposal. Never treated as catalog authority. */
379
- setupRequest?: ToolAuthNeededPayload["setupRequest"] | null | undefined;
380
378
  occurredAt: string;
381
379
  };
382
380
  export type TurnOutcome = "complete" | "failed" | "cancelled";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/react",
3
- "version": "7.1.2-canary.36079201993001",
3
+ "version": "7.1.2",
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": {
@@ -133,8 +133,8 @@
133
133
  "@dnd-kit/utilities": "3.2.2",
134
134
  "@fontsource-variable/noto-sans-arabic": "5.2.10",
135
135
  "@fontsource-variable/noto-sans-jp": "5.2.10",
136
- "@opengeni/connect": "^0.3.0-canary.36079201993001",
137
- "@opengeni/sdk": "^7.1.1-canary.36079201993001",
136
+ "@opengeni/connect": "^0.3.0",
137
+ "@opengeni/sdk": "^7.1.1",
138
138
  "clsx": "^2.1.1",
139
139
  "dequal": "2.0.3",
140
140
  "lucide-react": "^1.8.0",
@@ -342,8 +342,12 @@ export function BrowserViewer({
342
342
  setResumeAttempt((visible) =>
343
343
  visible?.sessionId === selectedRegistrySession.id ? null : visible,
344
344
  );
345
+ return;
346
+ }
347
+ if (selectedRegistrySession.lifecycle === "suspended") {
348
+ void wakeBrowser(selectedRegistrySession);
345
349
  }
346
- }, [selectedRegistrySession]);
350
+ }, [selectedRegistrySession, wakeBrowser]);
347
351
 
348
352
  const browser = useBrowserSession({
349
353
  ...override,
@@ -248,7 +248,6 @@ export function ComposerTranscriptionControl({
248
248
  >
249
249
  <button
250
250
  type="button"
251
- disabled={composer.disabled && !retrying}
252
251
  onClick={() =>
253
252
  savedTranscript
254
253
  ? void transcription.insertSavedTranscript()
@@ -266,7 +265,7 @@ export function ComposerTranscriptionControl({
266
265
  className={cn(
267
266
  "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
268
267
  "bg-og-fg text-og-bg transition-colors duration-150 motion-reduce:transition-none",
269
- "hover:bg-og-fg-muted disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11",
268
+ "hover:bg-og-fg-muted pointer-coarse:size-11",
270
269
  )}
271
270
  >
272
271
  {savedTranscript ? (
@@ -281,13 +280,12 @@ export function ComposerTranscriptionControl({
281
280
  <Tip tip={messages.discardRecovered}>
282
281
  <button
283
282
  type="button"
284
- disabled={composer.disabled}
285
283
  onClick={() => void transcription.discard()}
286
284
  aria-label={messages.discardRecovered}
287
285
  className={cn(
288
286
  "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
289
287
  "text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
290
- "hover:bg-og-surface-3 hover:text-og-status-failed disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11",
288
+ "hover:bg-og-surface-3 hover:text-og-status-failed pointer-coarse:size-11",
291
289
  )}
292
290
  >
293
291
  <Trash2Icon className="size-3.5" />
@@ -457,9 +457,9 @@ export function useChatComposerController({
457
457
  (event: DragEvent<HTMLDivElement>) => {
458
458
  if (!attachments || !dragCarriesFiles(event)) return;
459
459
  event.preventDefault();
460
- if (!disabled) setDragging(true);
460
+ setDragging(true);
461
461
  },
462
- [attachments, disabled],
462
+ [attachments],
463
463
  );
464
464
  const handleDragLeave = useCallback(
465
465
  (event: DragEvent<HTMLDivElement>) => {
@@ -474,16 +474,11 @@ export function useChatComposerController({
474
474
  if (!attachments || !dragCarriesFiles(event)) return;
475
475
  event.preventDefault();
476
476
  setDragging(false);
477
- if (!disabled && event.dataTransfer.files.length > 0)
478
- attachments.addFiles(event.dataTransfer.files);
477
+ if (event.dataTransfer.files.length > 0) attachments.addFiles(event.dataTransfer.files);
479
478
  },
480
- [attachments, disabled],
479
+ [attachments],
481
480
  );
482
481
 
483
- useEffect(() => {
484
- if (disabled) setDragging(false);
485
- }, [disabled]);
486
-
487
482
  const [notice, setNotice] = useState<Notice | null>(null);
488
483
  const [helpOpen, setHelpOpen] = useState(false);
489
484
  const [confirmState, setConfirmState] = useState<ConfirmState>(null);
@@ -629,18 +624,17 @@ export function useChatComposerController({
629
624
  );
630
625
  const handlePaste = useCallback(
631
626
  (event: ClipboardEvent<HTMLTextAreaElement>) => {
632
- if (disabled) return;
633
627
  onPaste?.(event);
634
628
  attachments?.addFromPaste(event);
635
629
  },
636
- [attachments, disabled, onPaste],
630
+ [attachments, onPaste],
637
631
  );
638
632
  const handleFileChange = useCallback(
639
633
  (event: ChangeEvent<HTMLInputElement>) => {
640
- if (!disabled && event.target.files) attachments?.addFiles(event.target.files);
634
+ if (event.target.files) attachments?.addFiles(event.target.files);
641
635
  event.target.value = "";
642
636
  },
643
- [attachments, disabled],
637
+ [attachments],
644
638
  );
645
639
 
646
640
  const helpCommands = useMemo(
@@ -981,7 +975,6 @@ export function Attachments() {
981
975
  <AttachmentChips
982
976
  attachments={controller.attachments.attachments}
983
977
  messages={controller.messages}
984
- disabled={controller.disabled}
985
978
  onRemove={controller.attachments.remove}
986
979
  onRetry={controller.attachments.retry}
987
980
  onRetainPreview={controller.attachments.retainPreview}
@@ -1686,7 +1679,6 @@ function ConfirmBar({
1686
1679
  function AttachmentChips({
1687
1680
  attachments,
1688
1681
  messages,
1689
- disabled,
1690
1682
  onRemove,
1691
1683
  onRetry,
1692
1684
  onRetainPreview,
@@ -1694,7 +1686,6 @@ function AttachmentChips({
1694
1686
  }: {
1695
1687
  attachments: UseFileAttachmentsResult["attachments"];
1696
1688
  messages: ChatComposerMessages;
1697
- disabled: boolean;
1698
1689
  onRemove: (id: string) => void;
1699
1690
  onRetry?: ((id: string) => void) | undefined;
1700
1691
  onRetainPreview: UseFileAttachmentsResult["retainPreview"];
@@ -1846,8 +1837,7 @@ function AttachmentChips({
1846
1837
  <button
1847
1838
  type="button"
1848
1839
  onClick={() => onRetry(attachment.id)}
1849
- disabled={disabled}
1850
- className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-10"
1840
+ className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10"
1851
1841
  aria-label={messages.retryAttachment(attachment.name)}
1852
1842
  >
1853
1843
  <RotateCwIcon className="size-3.5" />
@@ -1857,8 +1847,7 @@ function AttachmentChips({
1857
1847
  <button
1858
1848
  type="button"
1859
1849
  onClick={() => onRemove(attachment.id)}
1860
- disabled={disabled}
1861
- className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-10"
1850
+ className="shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10"
1862
1851
  aria-label={messages.removeAttachment(attachment.name)}
1863
1852
  >
1864
1853
  <XIcon className="size-3.5" />
@@ -19,7 +19,6 @@ import {
19
19
  STREAM_KIND_BROWSER,
20
20
  STREAM_ROLE_CLIENT,
21
21
  } from "../lib/relay-wire";
22
- import { usePageLiveActivity } from "./internal";
23
22
 
24
23
  export type BrowserFrameConnectionState =
25
24
  | "idle"
@@ -74,8 +73,7 @@ export function useBrowserFrameStream(
74
73
  options: UseBrowserFrameStreamOptions,
75
74
  ): UseBrowserFrameStreamResult {
76
75
  const { client, workspaceId } = useEmbeddedBrowserInteraction(options);
77
- const pageLive = usePageLiveActivity();
78
- const enabled = (options.enabled ?? true) && pageLive;
76
+ const enabled = options.enabled ?? true;
79
77
  const [nonce, setNonce] = useState(0);
80
78
  const [result, setResult] = useState<Omit<UseBrowserFrameStreamResult, "reconnect">>({
81
79
  state: "idle",
@@ -163,7 +163,6 @@ export function useVoiceInput({
163
163
  const automaticRetryAttemptRef = useRef(0);
164
164
  const ownerHeartbeatTimerRef = useRef<ReturnType<typeof setInterval> | null>(null);
165
165
  const controllerRef = useRef<AbortController | null>(null);
166
- const disabledRef = useRef(disabled);
167
166
  const valueRef = useRef(value);
168
167
  const storeRef = useRef<VoiceRecordingStore | null>(null);
169
168
  const storePromiseRef = useRef<Promise<VoiceRecordingStore> | null>(null);
@@ -177,7 +176,6 @@ export function useVoiceInput({
177
176
  const statusRef = useRef(status);
178
177
  valueRef.current = value;
179
178
  statusRef.current = status;
180
- disabledRef.current = disabled;
181
179
  workspaceIdRef.current = workspaceId;
182
180
 
183
181
  const ensureOwnerId = useCallback(async (): Promise<string> => {
@@ -470,14 +468,6 @@ export function useVoiceInput({
470
468
  return;
471
469
  }
472
470
 
473
- // Session creation can disable the composer while a recording is
474
- // transcribing. Keep the durable transcript for explicit insertion
475
- // later; never append text after Send captured its visible snapshot.
476
- if (disabledRef.current) {
477
- setStatus("transcript-ready");
478
- return;
479
- }
480
-
481
471
  const next = appendFinalTranscript(valueRef.current, response.text);
482
472
  if (next !== valueRef.current) {
483
473
  valueRef.current = next;
@@ -954,7 +944,6 @@ export function useVoiceInput({
954
944
  const insertSavedTranscript = useCallback(async (): Promise<void> => {
955
945
  const manifest = manifestRef.current;
956
946
  if (
957
- disabledRef.current ||
958
947
  !manifest ||
959
948
  manifest.workspaceId !== workspaceId ||
960
949
  manifest.finalizationState !== "transcript-ready" ||
@@ -966,7 +955,7 @@ export function useVoiceInput({
966
955
  controllerRef.current?.abort();
967
956
  controllerRef.current = null;
968
957
  const store = await ensureStore();
969
- if (generation !== generationRef.current || disabledRef.current) return;
958
+ if (generation !== generationRef.current) return;
970
959
  const next = appendFinalTranscript(valueRef.current, manifest.transcriptText);
971
960
  if (next !== valueRef.current) {
972
961
  valueRef.current = next;
@@ -15,8 +15,6 @@ export function compactionSkipSubtitle(
15
15
  return "No active history to compact";
16
16
  case "replacement_not_smaller":
17
17
  return "Checkpoint would not reduce memory size";
18
- case "replacement_exceeds_model_budget":
19
- return "Checkpoint exceeds this model's context budget. Chat history is unchanged.";
20
18
  case "replacement_unchanged":
21
19
  return "Checkpoint made no progress";
22
20
  case "summarization_failed":
@@ -1016,7 +1016,6 @@ export function buildTimeline(
1016
1016
  case "tool.auth_needed":
1017
1017
  case "credential.auth_needed": {
1018
1018
  const capability = capabilityAuthorizationRequest(payload.capability);
1019
- const setupRequest = customMcpSetupRequest(payload.setupRequest);
1020
1019
  if (
1021
1020
  event.type === "tool.auth_needed" &&
1022
1021
  !stringValue(payload.toolName) &&
@@ -1046,12 +1045,11 @@ export function buildTimeline(
1046
1045
  payload.connectionSubjectScope === "workspace"
1047
1046
  ? payload.connectionSubjectScope
1048
1047
  : null,
1049
- source:
1050
- capability || setupRequest
1051
- ? "capability"
1052
- : event.type === "tool.auth_needed"
1053
- ? "tool"
1054
- : "credential",
1048
+ source: capability
1049
+ ? "capability"
1050
+ : event.type === "tool.auth_needed"
1051
+ ? "tool"
1052
+ : "credential",
1055
1053
  providerDomain: stringValue(payload.providerDomain),
1056
1054
  connectionId: typeof payload.connectionId === "string" ? payload.connectionId : null,
1057
1055
  authoritySource: payload.authoritySource === "host" ? "host" : null,
@@ -1066,7 +1064,6 @@ export function buildTimeline(
1066
1064
  authorizationUrl:
1067
1065
  typeof payload.authorizationUrl === "string" ? payload.authorizationUrl : null,
1068
1066
  capability,
1069
- setupRequest,
1070
1067
  occurredAt: event.occurredAt,
1071
1068
  });
1072
1069
  break;
@@ -2626,29 +2623,6 @@ function capabilityAuthorizationRequest(
2626
2623
  };
2627
2624
  }
2628
2625
 
2629
- function customMcpSetupRequest(value: unknown): NonNullable<AuthNeededItem["setupRequest"]> | null {
2630
- if (!value || typeof value !== "object" || Array.isArray(value)) return null;
2631
- const input = value as Record<string, unknown>;
2632
- if (
2633
- input.kind !== "mcp" ||
2634
- typeof input.name !== "string" ||
2635
- typeof input.rationale !== "string" ||
2636
- typeof input.endpointUrl !== "string"
2637
- )
2638
- return null;
2639
- try {
2640
- if (new URL(input.endpointUrl).protocol !== "https:") return null;
2641
- } catch {
2642
- return null;
2643
- }
2644
- return {
2645
- kind: "mcp",
2646
- name: input.name,
2647
- endpointUrl: input.endpointUrl,
2648
- rationale: input.rationale,
2649
- };
2650
- }
2651
-
2652
2626
  function stringList(value: unknown): string[] {
2653
2627
  return Array.isArray(value)
2654
2628
  ? value.filter((entry): entry is string => typeof entry === "string" && entry.trim().length > 0)
@@ -475,8 +475,6 @@ export type AuthNeededItem = {
475
475
  authorizationUrl: string | null;
476
476
  /** Agent-selected catalog recommendation. The host still owns authorization. */
477
477
  capability?: NonNullable<ToolAuthNeededPayload["capability"]> | null | undefined;
478
- /** Human-reviewed custom integration proposal. Never treated as catalog authority. */
479
- setupRequest?: ToolAuthNeededPayload["setupRequest"] | null | undefined;
480
478
  occurredAt: string;
481
479
  };
482
480