@lumerahq/ui 0.13.0-dev.2 → 0.14.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 CHANGED
@@ -78,6 +78,12 @@ helpers under `@lumerahq/ui/lib` support direct list/snapshot requests and a
78
78
  capped CSV export. A disabled collection can still have visible history; its
79
79
  status means only that future changes are not being captured.
80
80
 
81
+ `changed_fields` describes update events only. For created and deleted records,
82
+ show the action itself and use the after or before snapshot for expanded detail.
83
+ The actor identifies the principal that performed the mutation, so human, agent,
84
+ and automation actions intentionally remain distinct; display the friendly
85
+ name/email or typed fallback and retain the full actor id for traceability.
86
+
81
87
  ### Assistant Chat
82
88
 
83
89
  Use `AssistantPage` for a full-page chat, `AssistantWidget` for a floating widget, or `AssistantChat` when embedding the chat surface inside custom chrome.
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import React__default, { useContext, createContext, forwardRef, createElement, memo, useId as useId$1, useTransition, useMemo, useRef, useEffect, useState, cloneElement, isValidElement, useCallback, Suspense, lazy, Fragment as Fragment$1, useLayoutEffect } from "react";
4
- import { u as useAgentChat, a as useAgentChatSessions, b as useAutomationRun } from "./use-automation-run-IypX1vtN.js";
4
+ import { u as useAgentChat, a as useAgentChatSessions, b as useAutomationRun } from "./use-automation-run-BeBkcUQz.js";
5
5
  import { t as twMerge, p as clsx, o as cn$2, a as formatCellValue$2 } from "./formatters-D4T821Dv.js";
6
- import { f as getDownloadUrl, t as pbSql, p as parentApiRequest, d as parentApiStream, B as BridgeError, z as automationStatuses, L as getAutomationRunFileDownloadUrl, R as listAutomationRunFiles } from "./automations-EgDXJ43_.js";
6
+ import { f as getDownloadUrl, v as pbSql, p as parentApiRequest, d as parentApiStream, B as BridgeError, C as automationStatuses, N as getAutomationRunFileDownloadUrl, T as listAutomationRunFiles } from "./automations-DGUEnAYR.js";
7
7
  import * as ReactDOM from "react-dom";
8
8
  import { createPortal } from "react-dom";
9
9
  const mergeClasses = (...classes) => classes.filter((className, index2, array) => {
@@ -24010,7 +24010,7 @@ var lr = (e) => {
24010
24010
  for (; t > 0 && e[t - 1] === `
24011
24011
  `; ) t--;
24012
24012
  return e.slice(0, t);
24013
- }, cr = lazy(() => import("./highlighted-body-OFNGDK62-TFNZl-GI.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), st = ({ code: e, language: t, className: o, children: n, isIncomplete: r = false, startLine: s2, lineNumbers: a, ...l }) => {
24013
+ }, cr = lazy(() => import("./highlighted-body-OFNGDK62-B9aPs2O1.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), st = ({ code: e, language: t, className: o, children: n, isIncomplete: r = false, startLine: s2, lineNumbers: a, ...l }) => {
24014
24014
  let i = y2(), d2 = useMemo(() => lr(e), [e]), c2 = useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: d2.split(`
24015
24015
  `).map((p2) => [{ content: p2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [d2]);
24016
24016
  return jsx(nt.Provider, { value: { code: e }, children: jsxs(ot, { isIncomplete: r, language: t, children: [jsx(rt, { language: t }), n ? jsx("div", { className: i("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: jsx("div", { className: i("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: n }) }) : null, jsx(Suspense, { fallback: jsx(At, { className: o, language: t, lineNumbers: a, result: c2, startLine: s2, ...l }), children: jsx(cr, { className: o, code: d2, language: t, lineNumbers: a, raw: c2, startLine: s2, ...l }) })] }) });
@@ -24372,7 +24372,7 @@ var vo = ({ children: e, className: t, showControls: o, showCopy: n = true, show
24372
24372
  let l = y2(), i = o && n, d2 = o && r, c2 = o && s2, p2 = i || d2 || c2;
24373
24373
  return jsxs("div", { className: l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"), "data-streamdown": "table-wrapper", children: [p2 ? jsxs("div", { className: l("flex items-center justify-end gap-1"), children: [i ? jsx(Te, {}) : null, d2 ? jsx(Pe, {}) : null, c2 ? jsx(Co, { showCopy: i, showDownload: d2, children: e }) : null] }) : null, jsx("div", { className: l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"), children: jsx("table", { className: l("w-full divide-y divide-border", t), "data-streamdown": "table", ...a, children: e }) })] });
24374
24374
  };
24375
- var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-9ec0sPET.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24375
+ var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-RyLkx3ak.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24376
24376
  function qe(e, t) {
24377
24377
  if (!(e != null && e.position || t != null && t.position)) return true;
24378
24378
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -1,4 +1,4 @@
1
- import { X as requestApi } from "./automations-EgDXJ43_.js";
1
+ import { Z as requestApi } from "./automations-DGUEnAYR.js";
2
2
  const RECORD_AUDIT_EXPORT_LIMIT = 1e4;
3
3
  const RECORD_AUDIT_MAX_COLLECTIONS = 20;
4
4
  const normalizeRecordAuditPageSize = (value = 50) => Math.min(200, Math.max(1, Math.trunc(value) || 50));
@@ -428,6 +428,143 @@ const directApiStream = (request2, handlers) => {
428
428
  close: () => controller.abort()
429
429
  };
430
430
  };
431
+ const isDirectMode = () => typeof window !== "undefined" && !isEmbedded() && !isStandaloneDevMode() && !isPlaygroundMode();
432
+ const directHostApiRequest = async (request2) => {
433
+ log("Direct mode: same-origin fetch", { url: request2.url, method: request2.method });
434
+ try {
435
+ const built = buildFetchBodyAndHeaders(request2);
436
+ const response = await fetch(request2.url, {
437
+ method: request2.method,
438
+ credentials: "same-origin",
439
+ headers: {
440
+ ...built.headers,
441
+ "X-Lumera-Client": "lumera-custom-app"
442
+ },
443
+ body: built.body
444
+ });
445
+ const text = await response.text();
446
+ let body = text;
447
+ try {
448
+ body = JSON.parse(text);
449
+ } catch {
450
+ }
451
+ return {
452
+ id: "direct-host",
453
+ ok: response.ok,
454
+ status: response.status,
455
+ body,
456
+ error: response.ok ? void 0 : text
457
+ };
458
+ } catch (err) {
459
+ return {
460
+ id: "direct-host",
461
+ ok: false,
462
+ status: 0,
463
+ error: err instanceof Error ? err.message : "Network error"
464
+ };
465
+ }
466
+ };
467
+ const directHostApiStream = (request2, handlers) => {
468
+ const id = generateId();
469
+ const controller = new AbortController();
470
+ void (async () => {
471
+ try {
472
+ const response = await fetch(request2.url, {
473
+ method: request2.method,
474
+ credentials: "same-origin",
475
+ headers: {
476
+ "Content-Type": "application/json",
477
+ Accept: "text/event-stream",
478
+ "X-Lumera-Client": "lumera-custom-app",
479
+ ...request2.headers
480
+ },
481
+ body: request2.body ? JSON.stringify(request2.body) : void 0,
482
+ signal: controller.signal
483
+ });
484
+ if (!response.ok) {
485
+ if (response.status === 409) {
486
+ return;
487
+ }
488
+ const message = await response.text().catch(() => `HTTP ${response.status}`);
489
+ handlers.onError?.(new BridgeError(message || `HTTP ${response.status}`, response.status));
490
+ return;
491
+ }
492
+ handlers.onOpen?.({
493
+ id,
494
+ ok: response.ok,
495
+ status: response.status,
496
+ headers: responseHeadersToRecord(response.headers)
497
+ });
498
+ const reader = response.body?.getReader();
499
+ if (!reader) {
500
+ handlers.onError?.(new BridgeError("Streaming response had no body", response.status));
501
+ return;
502
+ }
503
+ const decoder = new TextDecoder();
504
+ for (; ; ) {
505
+ const { done, value } = await reader.read();
506
+ if (done) break;
507
+ handlers.onChunk(decoder.decode(value, { stream: true }));
508
+ }
509
+ const trailing = decoder.decode();
510
+ if (trailing) handlers.onChunk(trailing);
511
+ } catch (err) {
512
+ if (err instanceof Error && err.name === "AbortError") return;
513
+ handlers.onError?.(new BridgeError(err instanceof Error ? err.message : "Network error"));
514
+ } finally {
515
+ handlers.onClose?.();
516
+ }
517
+ })();
518
+ return {
519
+ id,
520
+ close: () => controller.abort()
521
+ };
522
+ };
523
+ let directModeInitFired = false;
524
+ const fireDirectModeInit = () => {
525
+ if (directModeInitFired || !isDirectMode()) return;
526
+ directModeInitFired = true;
527
+ void (async () => {
528
+ let payload;
529
+ try {
530
+ const response = await fetch("/api/me", { credentials: "same-origin" });
531
+ if (response.ok || response.status === 401) {
532
+ let me;
533
+ try {
534
+ me = await response.json();
535
+ } catch {
536
+ me = void 0;
537
+ }
538
+ if (me) {
539
+ payload = {
540
+ company: me.company_id ? { id: me.company_id, apiName: me.company_api_name } : void 0,
541
+ user: me.user ?? void 0,
542
+ app: {
543
+ projectExternalId: me.project_external_id,
544
+ accessLevel: me.access_level
545
+ },
546
+ subjectType: me.subject_type
547
+ };
548
+ }
549
+ }
550
+ } catch (err) {
551
+ log("Direct mode: /api/me failed", err);
552
+ }
553
+ if (hasStoredHostPayload) return;
554
+ log("Direct mode: firing init payload", payload);
555
+ cacheHostPayload(payload, { origin: window.location.origin });
556
+ initListeners.forEach((listener) => listener(payload));
557
+ })();
558
+ };
559
+ const redirectToLogin = (returnTo) => {
560
+ if (typeof window === "undefined") return;
561
+ const target = returnTo ?? window.location.pathname + window.location.search;
562
+ window.location.href = `/api/auth/app-session/login?return_to=${encodeURIComponent(target)}`;
563
+ };
564
+ const logout = async () => {
565
+ if (typeof window === "undefined") return;
566
+ await fetch("/api/auth/app-session/logout", { method: "POST", credentials: "same-origin" });
567
+ };
431
568
  const fireDevModeInit = () => {
432
569
  if (devModeInitFired || !isStandaloneDevMode()) return;
433
570
  devModeInitFired = true;
@@ -628,6 +765,12 @@ const postReadyMessage = () => {
628
765
  fireDevModeInit();
629
766
  return;
630
767
  }
768
+ if (isDirectMode()) {
769
+ log("Direct mode: skipping postMessage, resolving identity from /api/me");
770
+ ensureListener();
771
+ fireDirectModeInit();
772
+ return;
773
+ }
631
774
  ensureListener();
632
775
  if (isPlaygroundMode()) {
633
776
  log("Playground mode: initializing via VirtualBackend");
@@ -687,6 +830,16 @@ const onInitMessage = (listener) => {
687
830
  fireDevModeInit();
688
831
  return () => initListeners.delete(listener);
689
832
  }
833
+ if (isDirectMode()) {
834
+ ensureListener();
835
+ initListeners.add(listener);
836
+ if (hasStoredHostPayload) {
837
+ setTimeout(() => listener(storedHostPayload), 0);
838
+ } else {
839
+ fireDirectModeInit();
840
+ }
841
+ return () => initListeners.delete(listener);
842
+ }
690
843
  ensureListener();
691
844
  initListeners.add(listener);
692
845
  if (hasStoredHostPayload) {
@@ -701,8 +854,11 @@ const parentApiRequest = async (request2) => {
701
854
  if (isPlaygroundMode()) {
702
855
  return playgroundApiRequest(request2);
703
856
  }
704
- if (typeof window === "undefined" || !isEmbedded()) {
705
- throw new BridgeError("App must be embedded in the Lumera host to make API requests");
857
+ if (typeof window === "undefined") {
858
+ throw new BridgeError("Bridge API requests are only available in the browser");
859
+ }
860
+ if (!isEmbedded()) {
861
+ return directHostApiRequest(request2);
706
862
  }
707
863
  ensureListener();
708
864
  const id = generateId();
@@ -744,8 +900,11 @@ const parentApiStream = (request2, handlers) => {
744
900
  if (isPlaygroundMode()) {
745
901
  return playgroundApiStream(handlers);
746
902
  }
747
- if (typeof window === "undefined" || !isEmbedded()) {
748
- throw new BridgeError("App must be embedded in the Lumera host to stream API responses");
903
+ if (typeof window === "undefined") {
904
+ throw new BridgeError("Bridge API streams are only available in the browser");
905
+ }
906
+ if (!isEmbedded()) {
907
+ return directHostApiStream(request2, handlers);
749
908
  }
750
909
  ensureListener();
751
910
  const id = generateId();
@@ -1264,30 +1423,32 @@ async function listRunsByExternalId(params) {
1264
1423
  });
1265
1424
  }
1266
1425
  export {
1267
- cancelAutomationRun as A,
1426
+ uploadFile as A,
1268
1427
  BridgeError as B,
1269
- cancelRun as C,
1270
- clearAutomationCache as D,
1428
+ automationStatuses as C,
1429
+ cancelAutomationRun as D,
1271
1430
  EXPECTED_PARENT_ORIGIN as E,
1272
- createAutomationRun as F,
1273
- createRun as G,
1274
- ensureAutomationRun as H,
1275
- ensureRun as I,
1276
- getAutomationByExternalId as J,
1277
- getAutomationRun as K,
1278
- getAutomationRunFileDownloadUrl as L,
1279
- getRun as M,
1280
- getRunFiles as N,
1281
- getRunFileUrl as O,
1282
- isActiveStatus as P,
1283
- isTerminalStatus as Q,
1284
- listAutomationRunFiles as R,
1285
- listRuns as S,
1286
- listRunsByAgent as T,
1287
- listRunsByExternalId as U,
1288
- pollAutomationRun as V,
1289
- pollRun as W,
1290
- requestApi as X,
1431
+ cancelRun as F,
1432
+ clearAutomationCache as G,
1433
+ createAutomationRun as H,
1434
+ createRun as I,
1435
+ ensureAutomationRun as J,
1436
+ ensureRun as K,
1437
+ getAutomationByExternalId as L,
1438
+ getAutomationRun as M,
1439
+ getAutomationRunFileDownloadUrl as N,
1440
+ getRun as O,
1441
+ getRunFiles as P,
1442
+ getRunFileUrl as Q,
1443
+ isActiveStatus as R,
1444
+ isTerminalStatus as S,
1445
+ listAutomationRunFiles as T,
1446
+ listRuns as U,
1447
+ listRunsByAgent as V,
1448
+ listRunsByExternalId as W,
1449
+ pollAutomationRun as X,
1450
+ pollRun as Y,
1451
+ requestApi as Z,
1291
1452
  getShareableAppUrl as a,
1292
1453
  buildShareableAppUrl as b,
1293
1454
  configureBridge as c,
@@ -1299,19 +1460,19 @@ export {
1299
1460
  isEmbedded as i,
1300
1461
  pbBulkDelete as j,
1301
1462
  pbBulkUpdate as k,
1302
- pbCreate as l,
1303
- pbDelete as m,
1304
- pbGet as n,
1463
+ logout as l,
1464
+ pbCreate as m,
1465
+ pbDelete as n,
1305
1466
  onInitMessage as o,
1306
1467
  parentApiRequest as p,
1307
- pbList as q,
1308
- pbSearch as r,
1468
+ pbGet as q,
1469
+ redirectToLogin as r,
1309
1470
  serializeBridgeRuntimeConfig as s,
1310
- pbSql as t,
1311
- pbUpdate as u,
1312
- pbUpdateRecord as v,
1313
- pbUpsert as w,
1314
- sendEmail as x,
1315
- uploadFile as y,
1316
- automationStatuses as z
1471
+ pbList as t,
1472
+ pbSearch as u,
1473
+ pbSql as v,
1474
+ pbUpdate as w,
1475
+ pbUpdateRecord as x,
1476
+ pbUpsert as y,
1477
+ sendEmail as z
1317
1478
  };
@@ -1,4 +1,4 @@
1
- import { A, a, e, j, k, n, o, D, p, q, R, T, b, c, d, f, g, h, i, l, u, w, m } from "../RecordSheet-CawHELpB.js";
1
+ import { A, a, e, j, k, n, o, D, p, q, R, T, b, c, d, f, g, h, i, l, u, w, m } from "../RecordSheet-aoDqWNaZ.js";
2
2
  export {
3
3
  A as AgentChat,
4
4
  a as ArtifactCard,
@@ -1,4 +1,4 @@
1
- import { s as R$1, L as Li, t as At } from "./RecordSheet-CawHELpB.js";
1
+ import { s as R$1, L as Li, t as At } from "./RecordSheet-aoDqWNaZ.js";
2
2
  import { useContext, useState, useEffect } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  var R = ({ code: s, language: e, raw: t, className: h, startLine: d, lineNumbers: m, ...p }) => {
@@ -1,5 +1,5 @@
1
- import { u, a, b } from "../use-automation-run-IypX1vtN.js";
2
- import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-By700ZAo.js";
1
+ import { u, a, b } from "../use-automation-run-BeBkcUQz.js";
2
+ import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-BpMNl9bf.js";
3
3
  export {
4
4
  u as useAgentChat,
5
5
  a as useAgentChatSessions,
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { A, a, e, j, k, n, o, D, p, q, R, T, b, c, d, f, g, h, i, l, u, w, m } from "./RecordSheet-CawHELpB.js";
2
- import { u as u2, a as a2, b as b2 } from "./use-automation-run-IypX1vtN.js";
3
- import { u as u3, a as a3, b as b3, c as c2, d as d2, e as e2, f as f2, g as g2 } from "./use-sql-table-By700ZAo.js";
4
- import { B, E, z, b as b4, A as A2, C, D as D2, c as c3, F, G, H, I, g as g3, J, K, L, f as f3, M, O, N, a as a4, h as h2, P, i as i2, Q, R as R2, S, T as T2, U, o as o2, p as p2, d as d3, j as j2, k as k2, l as l2, m as m2, n as n2, q as q2, r, t, u as u4, v, w as w2, V, W, e as e3, x, s, y } from "./automations-EgDXJ43_.js";
1
+ import { A, a, e, j, k, n, o, D, p, q, R, T, b, c, d, f, g, h, i, l, u, w, m } from "./RecordSheet-aoDqWNaZ.js";
2
+ import { u as u2, a as a2, b as b2 } from "./use-automation-run-BeBkcUQz.js";
3
+ import { u as u3, a as a3, b as b3, c as c2, d as d2, e as e2, f as f2, g as g2 } from "./use-sql-table-BpMNl9bf.js";
4
+ import { B, E, C, b as b4, D as D2, F, G, c as c3, H, I, J, K, g as g3, L, M, N, f as f3, O, Q, P, a as a4, h as h2, R as R2, i as i2, S, T as T2, U, V, W, l as l2, o as o2, p as p2, d as d3, j as j2, k as k2, m as m2, n as n2, q as q2, t, u as u4, v, w as w2, x, y, X, Y, e as e3, r, z, s, A as A2 } from "./automations-DGUEnAYR.js";
5
5
  import { o as o3, f as f4, a as a5, b as b5, c as c4, d as d4, e as e4, g as g4, h as h3, i as i3, j as j3, k as k3, l as l3, m as m3, n as n3, s as s2 } from "./formatters-D4T821Dv.js";
6
6
  import { q as q3 } from "./query-client-DdOWay4_.js";
7
- import { R as R3, e as e5, b as b6, a as a6, f as f5, g as g5, l as l4, n as n4, c as c5, d as d5, r as r2 } from "./audit-log-BPvip04_.js";
7
+ import { R as R3, e as e5, b as b6, a as a6, f as f5, g as g5, l as l4, n as n4, c as c5, d as d5, r as r2 } from "./audit-log-B2-PFKpH.js";
8
8
  export {
9
9
  A as AgentChat,
10
10
  a as ArtifactCard,
@@ -23,21 +23,21 @@ export {
23
23
  R as RecordSheet,
24
24
  T as ToolCallCard,
25
25
  b as ToolRenderersProvider,
26
- z as automationStatuses,
26
+ C as automationStatuses,
27
27
  b6 as buildRecordAuditCsv,
28
28
  a6 as buildRecordAuditLogPath,
29
29
  b4 as buildShareableAppUrl,
30
- A2 as cancelAutomationRun,
31
- C as cancelRun,
32
- D2 as clearAutomationCache,
30
+ D2 as cancelAutomationRun,
31
+ F as cancelRun,
32
+ G as clearAutomationCache,
33
33
  o3 as cn,
34
34
  c3 as configureBridge,
35
- F as createAutomationRun,
35
+ H as createAutomationRun,
36
36
  c as createLumeraAgentChatTransport,
37
- G as createRun,
37
+ I as createRun,
38
38
  d as defaultToolRenderers,
39
- H as ensureAutomationRun,
40
- I as ensureRun,
39
+ J as ensureAutomationRun,
40
+ K as ensureRun,
41
41
  f5 as fetchRecordAuditLogCsv,
42
42
  f as findRenderer,
43
43
  f4 as formatBoolean,
@@ -55,28 +55,29 @@ export {
55
55
  m3 as formatSelect,
56
56
  n3 as formatText,
57
57
  g3 as getAppProjectExternalId,
58
- J as getAutomationByExternalId,
59
- K as getAutomationRun,
60
- L as getAutomationRunFileDownloadUrl,
58
+ L as getAutomationByExternalId,
59
+ M as getAutomationRun,
60
+ N as getAutomationRunFileDownloadUrl,
61
61
  g as getCollectionMap,
62
62
  f3 as getDownloadUrl,
63
63
  g5 as getRecordAuditLogSnapshot,
64
- M as getRun,
65
- O as getRunFileUrl,
66
- N as getRunFiles,
64
+ O as getRun,
65
+ Q as getRunFileUrl,
66
+ P as getRunFiles,
67
67
  a4 as getShareableAppUrl,
68
68
  h2 as getUploadUrl,
69
69
  h as humanizeCollectionName,
70
- P as isActiveStatus,
70
+ R2 as isActiveStatus,
71
71
  i2 as isEmbedded,
72
72
  i as isExploratoryToolCallError,
73
73
  l as isMutatingToolCall,
74
- Q as isTerminalStatus,
75
- R2 as listAutomationRunFiles,
74
+ S as isTerminalStatus,
75
+ T2 as listAutomationRunFiles,
76
76
  l4 as listRecordAuditLog,
77
- S as listRuns,
78
- T2 as listRunsByAgent,
79
- U as listRunsByExternalId,
77
+ U as listRuns,
78
+ V as listRunsByAgent,
79
+ W as listRunsByExternalId,
80
+ l2 as logout,
80
81
  n4 as normalizeRecordAuditCollections,
81
82
  c5 as normalizeRecordAuditExportLimit,
82
83
  d5 as normalizeRecordAuditPageSize,
@@ -85,24 +86,25 @@ export {
85
86
  d3 as parentApiStream,
86
87
  j2 as pbBulkDelete,
87
88
  k2 as pbBulkUpdate,
88
- l2 as pbCreate,
89
- m2 as pbDelete,
90
- n2 as pbGet,
91
- q2 as pbList,
92
- r as pbSearch,
93
- t as pbSql,
94
- u4 as pbUpdate,
95
- v as pbUpdateRecord,
96
- w2 as pbUpsert,
97
- V as pollAutomationRun,
98
- W as pollRun,
89
+ m2 as pbCreate,
90
+ n2 as pbDelete,
91
+ q2 as pbGet,
92
+ t as pbList,
93
+ u4 as pbSearch,
94
+ v as pbSql,
95
+ w2 as pbUpdate,
96
+ x as pbUpdateRecord,
97
+ y as pbUpsert,
98
+ X as pollAutomationRun,
99
+ Y as pollRun,
99
100
  e3 as postReadyMessage,
100
101
  q3 as queryClient,
101
102
  r2 as recordAuditActorLabel,
102
- x as sendEmail,
103
+ r as redirectToLogin,
104
+ z as sendEmail,
103
105
  s as serializeBridgeRuntimeConfig,
104
106
  s2 as stripHtml,
105
- y as uploadFile,
107
+ A2 as uploadFile,
106
108
  u2 as useAgentChat,
107
109
  a2 as useAgentChatSessions,
108
110
  u3 as useAutomationAgent,
@@ -47,6 +47,11 @@ export type HostPayload = {
47
47
  name?: string;
48
48
  apiName?: string;
49
49
  };
50
+ /**
51
+ * The signed-in user. Undefined for anonymous visitors on public-access
52
+ * apps served on their own hostname — apps that allow anonymous access
53
+ * must handle this and may offer sign-in via `redirectToLogin()`.
54
+ */
50
55
  user?: {
51
56
  id: string;
52
57
  name: string;
@@ -58,7 +63,15 @@ export type HostPayload = {
58
63
  projectExternalId?: string;
59
64
  /** Base iframe URL mounted by Lumera, used for share-link generation. */
60
65
  iframeBaseUrl?: string;
66
+ /** Who may open the app (org_members_with_permission … public). */
67
+ accessLevel?: string;
61
68
  };
69
+ /**
70
+ * How the current caller was classified when the app runs standalone on
71
+ * its own hostname: 'org_member' (company member), 'app_user' (external
72
+ * signed-in user), or 'anonymous'.
73
+ */
74
+ subjectType?: string;
62
75
  message?: string;
63
76
  session?: {
64
77
  token?: string;
@@ -191,6 +204,21 @@ export declare function buildShareableAppUrl(path: string, options?: ShareableAp
191
204
  * `app.externalId`.
192
205
  */
193
206
  export declare function getShareableAppUrl(options?: ShareableAppUrlOptions): string | undefined;
207
+ /**
208
+ * Redirect the browser into the Lumera app-session login flow. Only
209
+ * meaningful in direct mode (standalone app hostname); in the Lumera shell
210
+ * the platform session already exists.
211
+ *
212
+ * @param returnTo - Relative path to land on after login. Defaults to the
213
+ * current path + query.
214
+ */
215
+ export declare const redirectToLogin: (returnTo?: string) => void;
216
+ /**
217
+ * Revoke the current app session and clear its cookies. Only meaningful in
218
+ * direct mode. Resolves once the session is cleared; callers usually reload
219
+ * or navigate afterwards.
220
+ */
221
+ export declare const logout: () => Promise<void>;
194
222
  /**
195
223
  * Extend bridge runtime config for the current page load.
196
224
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/lib/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA2CH,eAAO,MAAM,sBAAsB,KAA0D,CAAC;AAQ9F,MAAM,MAAM,mBAAmB,GAAG;IAChC,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA2CF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,mBAAmB,KAAG,MAI1E,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IA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gB,kBAAkB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAUvF;AA0gBD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,KAAG,IAInD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,QAAa,OAAO,CAAC,IAAI,CAG3C,CAAC;AAsQF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,mBAAmB,KAAG,IAE7D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,QAAO,OAAsE,CAAC;AAErG;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,QAAO,IAoFnC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,GAAI,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CA6B/F,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,aAAa,KAAG,OAAO,CAAC,cAAc,CAwDrF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,aAAa,EAAE,UAAU,oBAAoB,KAAG,YA0DxF,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module @lumerahq/ui/lib
5
5
  */
6
- export { BridgeError, type BridgeRequest, type BridgeResponse, type BridgeRuntimeConfig, type BridgeStream, type BridgeStreamHandlers, type BridgeStreamOpen, type BridgeStreamResponse, buildShareableAppUrl, configureBridge, EXPECTED_PARENT_ORIGIN, getAppProjectExternalId, getShareableAppUrl, type HostPayload, isEmbedded, onInitMessage, parentApiRequest, parentApiStream, postReadyMessage, type ShareableAppRouter, type ShareableAppUrlOptions, serializeBridgeRuntimeConfig, } from './bridge';
6
+ export { BridgeError, type BridgeRequest, type BridgeResponse, type BridgeRuntimeConfig, type BridgeStream, type BridgeStreamHandlers, type BridgeStreamOpen, type BridgeStreamResponse, buildShareableAppUrl, configureBridge, EXPECTED_PARENT_ORIGIN, getAppProjectExternalId, getShareableAppUrl, type HostPayload, isEmbedded, logout, onInitMessage, parentApiRequest, parentApiStream, postReadyMessage, redirectToLogin, type ShareableAppRouter, type ShareableAppUrlOptions, serializeBridgeRuntimeConfig, } from './bridge';
7
7
  export { type EmailSendRequest, type EmailSendResult, type FileDescriptor, getDownloadUrl, getUploadUrl, type PbBulkResult, type PbListOptions, type PbListResponse, type PbRecord, type PbSearchMetadata, type PbSearchOptions, type PbSearchResult, type PbSqlRequest, type PbSqlResponse, pbBulkDelete, pbBulkUpdate, pbCreate, pbDelete, pbGet, pbList, pbSearch, pbSql, pbUpdate, pbUpdateRecord, pbUpsert, sendEmail, type UploadOptions, type UploadUrlResponse, uploadFile, } from './api';
8
8
  export { type Automation, type AutomationRun, type AutomationRunFile, type AutomationStatus, automationStatuses, type CreateRunOptions, cancelAutomationRun, cancelRun, clearAutomationCache, createAutomationRun, createRun, ensureAutomationRun, ensureRun, getAutomationByExternalId, getAutomationRun, getAutomationRunFileDownloadUrl, getRun, getRunFiles, getRunFileUrl, isActiveStatus, isTerminalStatus, type LegacyCreateRunOptions, type ListRunsOptions, listAutomationRunFiles, listRuns, listRunsByAgent, listRunsByExternalId, type PollOptions, pollAutomationRun, pollRun, } from './automations';
9
9
  export { type ColumnType, type FileDescriptor as FormatterFileDescriptor, type FormatOptions, formatBoolean, formatCellValue, formatCurrency, formatDate, formatDateTime, formatEditor, formatFile, formatFileSize, formatJson, formatNumber, formatPercent, formatRelation, formatSelect, formatText, stripHtml, } from './formatters';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAo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,OAAO,EACL,KAAK,UAAU,EACf,KAAK,cAAc,IAAI,uBAAuB,EAC9C,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAM7B,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,kBAAkB,EAClB,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,KAAK,gBAAgB,EACrB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,oBAAoB,EAEpB,eAAe,EAEf,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAElB,KAAK,WAAW,EAChB,UAAU,EACV,MAAM,EACN,aAAa,EACb,g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U,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAM7B,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,kBAAkB,EAClB,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,KAAK,gBAAgB,EACrB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
package/dist/lib/index.js CHANGED
@@ -1,25 +1,25 @@
1
- import { B, E, z, b, A, C, D, c, F, G, H, I, g, J, K, L, f, M, O, N, a, h, P, i, Q, R, S, T, U, o, p, d, j, k, l, m, n, q, r, t, u, v, w, V, W, e, x, s, y } from "../automations-EgDXJ43_.js";
1
+ import { B, E, C, b, D, F, G, c, H, I, J, K, g, L, M, N, f, O, Q, P, a, h, R, i, S, T, U, V, W, l, o, p, d, j, k, m, n, q, t, u, v, w, x, y, X, Y, e, r, z, s, A } from "../automations-DGUEnAYR.js";
2
2
  import { o as o2, f as f2, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, h as h2, i as i2, j as j2, k as k2, l as l2, m as m2, n as n2, s as s2 } from "../formatters-D4T821Dv.js";
3
3
  import { q as q2 } from "../query-client-DdOWay4_.js";
4
- import { R as R2, e as e3, b as b3, a as a3, f as f3, g as g3, l as l3, n as n3, c as c3, d as d3, r as r2 } from "../audit-log-BPvip04_.js";
4
+ import { R as R2, e as e3, b as b3, a as a3, f as f3, g as g3, l as l3, n as n3, c as c3, d as d3, r as r2 } from "../audit-log-B2-PFKpH.js";
5
5
  export {
6
6
  B as BridgeError,
7
7
  E as EXPECTED_PARENT_ORIGIN,
8
8
  R2 as RECORD_AUDIT_EXPORT_LIMIT,
9
9
  e3 as RECORD_AUDIT_MAX_COLLECTIONS,
10
- z as automationStatuses,
10
+ C as automationStatuses,
11
11
  b3 as buildRecordAuditCsv,
12
12
  a3 as buildRecordAuditLogPath,
13
13
  b as buildShareableAppUrl,
14
- A as cancelAutomationRun,
15
- C as cancelRun,
16
- D as clearAutomationCache,
14
+ D as cancelAutomationRun,
15
+ F as cancelRun,
16
+ G as clearAutomationCache,
17
17
  o2 as cn,
18
18
  c as configureBridge,
19
- F as createAutomationRun,
20
- G as createRun,
21
- H as ensureAutomationRun,
22
- I as ensureRun,
19
+ H as createAutomationRun,
20
+ I as createRun,
21
+ J as ensureAutomationRun,
22
+ K as ensureRun,
23
23
  f3 as fetchRecordAuditLogCsv,
24
24
  f2 as formatBoolean,
25
25
  a2 as formatCellValue,
@@ -36,24 +36,25 @@ export {
36
36
  m2 as formatSelect,
37
37
  n2 as formatText,
38
38
  g as getAppProjectExternalId,
39
- J as getAutomationByExternalId,
40
- K as getAutomationRun,
41
- L as getAutomationRunFileDownloadUrl,
39
+ L as getAutomationByExternalId,
40
+ M as getAutomationRun,
41
+ N as getAutomationRunFileDownloadUrl,
42
42
  f as getDownloadUrl,
43
43
  g3 as getRecordAuditLogSnapshot,
44
- M as getRun,
45
- O as getRunFileUrl,
46
- N as getRunFiles,
44
+ O as getRun,
45
+ Q as getRunFileUrl,
46
+ P as getRunFiles,
47
47
  a as getShareableAppUrl,
48
48
  h as getUploadUrl,
49
- P as isActiveStatus,
49
+ R as isActiveStatus,
50
50
  i as isEmbedded,
51
- Q as isTerminalStatus,
52
- R as listAutomationRunFiles,
51
+ S as isTerminalStatus,
52
+ T as listAutomationRunFiles,
53
53
  l3 as listRecordAuditLog,
54
- S as listRuns,
55
- T as listRunsByAgent,
56
- U as listRunsByExternalId,
54
+ U as listRuns,
55
+ V as listRunsByAgent,
56
+ W as listRunsByExternalId,
57
+ l as logout,
57
58
  n3 as normalizeRecordAuditCollections,
58
59
  c3 as normalizeRecordAuditExportLimit,
59
60
  d3 as normalizeRecordAuditPageSize,
@@ -62,22 +63,23 @@ export {
62
63
  d as parentApiStream,
63
64
  j as pbBulkDelete,
64
65
  k as pbBulkUpdate,
65
- l as pbCreate,
66
- m as pbDelete,
67
- n as pbGet,
68
- q as pbList,
69
- r as pbSearch,
70
- t as pbSql,
71
- u as pbUpdate,
72
- v as pbUpdateRecord,
73
- w as pbUpsert,
74
- V as pollAutomationRun,
75
- W as pollRun,
66
+ m as pbCreate,
67
+ n as pbDelete,
68
+ q as pbGet,
69
+ t as pbList,
70
+ u as pbSearch,
71
+ v as pbSql,
72
+ w as pbUpdate,
73
+ x as pbUpdateRecord,
74
+ y as pbUpsert,
75
+ X as pollAutomationRun,
76
+ Y as pollRun,
76
77
  e as postReadyMessage,
77
78
  q2 as queryClient,
78
79
  r2 as recordAuditActorLabel,
79
- x as sendEmail,
80
+ r as redirectToLogin,
81
+ z as sendEmail,
80
82
  s as serializeBridgeRuntimeConfig,
81
83
  s2 as stripHtml,
82
- y as uploadFile
84
+ A as uploadFile
83
85
  };
@@ -0,0 +1,4 @@
1
+ import { r } from "./RecordSheet-aoDqWNaZ.js";
2
+ export {
3
+ r as Mermaid
4
+ };
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useState, useRef, useCallback, useMemo } from "react";
2
2
  import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
3
- import { H as ensureAutomationRun, F as createAutomationRun, A as cancelAutomationRun, z as automationStatuses, K as getAutomationRun } from "./automations-EgDXJ43_.js";
3
+ import { J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-DGUEnAYR.js";
4
4
  const QUEUED_DISCOVERY_POLL_MS = 2e3;
5
5
  const IDLE_DISCOVERY_POLL_MS = 1e4;
6
6
  const HIDDEN_DISCOVERY_POLL_MS = 3e4;
@@ -1,7 +1,7 @@
1
1
  import { useQueryClient, useQuery, useMutation, useInfiniteQuery } from "@tanstack/react-query";
2
2
  import { useState, useCallback, useEffect, useMemo } from "react";
3
- import { T as listRunsByAgent, z as automationStatuses, F as createAutomationRun, y as uploadFile, o as onInitMessage, t as pbSql, v as pbUpdateRecord } from "./automations-EgDXJ43_.js";
4
- import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-BPvip04_.js";
3
+ import { V as listRunsByAgent, C as automationStatuses, H as createAutomationRun, A as uploadFile, o as onInitMessage, v as pbSql, x as pbUpdateRecord } from "./automations-DGUEnAYR.js";
4
+ import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-B2-PFKpH.js";
5
5
  function useAutomationAgent({
6
6
  agentId,
7
7
  limit = 5,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/ui",
3
- "version": "0.13.0-dev.2",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -1,4 +0,0 @@
1
- import { r } from "./RecordSheet-CawHELpB.js";
2
- export {
3
- r as Mermaid
4
- };