@lumerahq/ui 0.19.2-dev.0 → 0.19.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.
@@ -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-CeHNx0-5.js";
4
+ import { u as useAgentChat, a as useAgentChatSessions, b as useAutomationRun } from "./use-automation-run-_7rjd8L4.js";
5
5
  import { t as twMerge, p as clsx, o as cn$2, a as formatCellValue$2 } from "./formatters-D4T821Dv.js";
6
- import { v as pbSql, f as getDownloadUrl, p as parentApiRequest, d as parentApiStream, B as BridgeError, _ as resolveProjectResourceId, C as automationStatuses, N as getAutomationRunFileDownloadUrl, T as listAutomationRunFiles } from "./automations-BwjRQiu5.js";
6
+ import { v as pbSql, f as getDownloadUrl, p as parentApiRequest, d as parentApiStream, B as BridgeError, g as getAppProjectExternalId, _ as resolveProjectResourceId, C as automationStatuses, N as getAutomationRunFileDownloadUrl, T as listAutomationRunFiles } from "./automations-C6SMookl.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-C2Kqh7sp.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-DReGUNtu.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-BX7CIWuS.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24375
+ var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-BT6HRm2v.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;
@@ -28255,13 +28255,27 @@ function createLumeraAgentChatTransport(options) {
28255
28255
  };
28256
28256
  const resolveAgentId = (agentId) => {
28257
28257
  const reference = (agentId ?? options.agentId).trim();
28258
- const cached = resolvedAgentIds.get(reference);
28258
+ const projectExternalId = getAppProjectExternalId();
28259
+ const cacheKey = JSON.stringify([projectExternalId, reference]);
28260
+ const cached = resolvedAgentIds.get(cacheKey);
28259
28261
  if (cached) return cached;
28260
- const resolution = resolveProjectResourceId(reference, lookupAgentId);
28261
- resolvedAgentIds.set(reference, resolution);
28262
- void resolution.catch(() => {
28263
- if (resolvedAgentIds.get(reference) === resolution) resolvedAgentIds.delete(reference);
28262
+ let usedCompatibilityFallback = false;
28263
+ const resolution = resolveProjectResourceId(reference, lookupAgentId, projectExternalId).catch((error2) => {
28264
+ if (!(error2 instanceof BridgeError) || error2.status !== 404) throw error2;
28265
+ usedCompatibilityFallback = true;
28266
+ return reference;
28264
28267
  });
28268
+ resolvedAgentIds.set(cacheKey, resolution);
28269
+ void resolution.then(
28270
+ () => {
28271
+ if (usedCompatibilityFallback && resolvedAgentIds.get(cacheKey) === resolution) {
28272
+ resolvedAgentIds.delete(cacheKey);
28273
+ }
28274
+ },
28275
+ () => {
28276
+ if (resolvedAgentIds.get(cacheKey) === resolution) resolvedAgentIds.delete(cacheKey);
28277
+ }
28278
+ );
28265
28279
  return resolution;
28266
28280
  };
28267
28281
  const resolveSessionId = (sessionId) => sessionId ?? options.sessionId ?? DEFAULT_SESSION_ID;
@@ -1,4 +1,4 @@
1
- import { Z as requestApi } from "./automations-BwjRQiu5.js";
1
+ import { Z as requestApi } from "./automations-C6SMookl.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));
@@ -1206,7 +1206,7 @@ async function resolveProjectResourceId(reference, lookup, projectExternalId = g
1206
1206
  if (qualified) return qualified;
1207
1207
  const internal = await lookup(value);
1208
1208
  if (internal) return internal;
1209
- throw new Error(`Resource not found: ${value}`);
1209
+ throw new BridgeError(`Resource not found: ${value}`, 404);
1210
1210
  }
1211
1211
  const API_PREFIX = "/api";
1212
1212
  const ALL_STATUSES = [
@@ -1,5 +1,5 @@
1
- import { BridgeRequest, BridgeResponse, BridgeStream, parentApiStream } from '../../lib/bridge';
2
- import { AgentChatMetadata, AgentChatSubmitInput, AgentChatTransport } from './types';
1
+ import { BridgeRequest, BridgeResponse, BridgeStream, parentApiStream } from '../../lib/bridge.js';
2
+ import { AgentChatMetadata, AgentChatSubmitInput, AgentChatTransport } from './types.js';
3
3
  export interface LumeraAgentChatTransportOptions {
4
4
  /** Internal ID, bare external ID, or qualified external ID. */
5
5
  agentId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"lumera-agent-transport.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/lumera-agent-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAiC,eAAe,EAAE,MAAM,cAAc,CAAC;AAG9E,OAAO,KAAK,EAQV,iBAAiB,EAOjB,oBAAoB,EAIpB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,+BAA+B;IAC9C,+DAA+D;IAC/D,OA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EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpG,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC9D,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,0BAA0B,KAAK,YAAY,CAAC;CACzF;AAED,KAAK,0BAA0B,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAkGxE,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,+BAA+B,GACvC,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAyLzD"}
@@ -1,4 +1,4 @@
1
- import { A, a, b, c, r, t, v, B, C, D, E, F, R, T, q, d, e, f, g, h, i, j, k, l, m, n, x, o, p, s, y, u, w, z } from "../RecordSheet-74njjJNB.js";
1
+ import { A, a, b, c, r, t, v, B, C, D, E, F, R, T, q, d, e, f, g, h, i, j, k, l, m, n, x, o, p, s, y, u, w, z } from "../RecordSheet-CZ1jrBhN.js";
2
2
  export {
3
3
  A as ActivityStrip,
4
4
  a as AgentChat,
@@ -1,4 +1,4 @@
1
- import { H as R$1, L as Li, I as At } from "./RecordSheet-74njjJNB.js";
1
+ import { H as R$1, L as Li, I as At } from "./RecordSheet-CZ1jrBhN.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-CeHNx0-5.js";
2
- import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-CxfIg-iX.js";
1
+ import { u, a, b } from "../use-automation-run-_7rjd8L4.js";
2
+ import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-DCe9zwOx.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, b, c, r, t, v, B, C, D, E, F, R, T, q, d, e, f, g, h, i, j, k, l, m, n, x, o, p, s, y, u, w, z } from "./RecordSheet-74njjJNB.js";
2
- import { u as u2, a as a2, b as b2 } from "./use-automation-run-CeHNx0-5.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-CxfIg-iX.js";
4
- import { B as B2, E as E2, C as C2, b as b4, D as D2, F as F2, 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 as t2, u as u4, v as v2, w as w2, x as x2, y as y2, X, Y, e as e3, r as r2, z as z2, s as s2, A as A2 } from "./automations-BwjRQiu5.js";
1
+ import { A, a, b, c, r, t, v, B, C, D, E, F, R, T, q, d, e, f, g, h, i, j, k, l, m, n, x, o, p, s, y, u, w, z } from "./RecordSheet-CZ1jrBhN.js";
2
+ import { u as u2, a as a2, b as b2 } from "./use-automation-run-_7rjd8L4.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-DCe9zwOx.js";
4
+ import { B as B2, E as E2, C as C2, b as b4, D as D2, F as F2, 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 as t2, u as u4, v as v2, w as w2, x as x2, y as y2, X, Y, e as e3, r as r2, z as z2, s as s2, A as A2 } from "./automations-C6SMookl.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 s3 } 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 r3 } from "./audit-log-Bc47K8sI.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 r3 } from "./audit-log-CBcctM1l.js";
8
8
  export {
9
9
  A as ActivityStrip,
10
10
  a as AgentChat,
package/dist/lib/index.js CHANGED
@@ -1,7 +1,7 @@
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-BwjRQiu5.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-C6SMookl.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-Bc47K8sI.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-CBcctM1l.js";
5
5
  export {
6
6
  B as BridgeError,
7
7
  E as EXPECTED_PARENT_ORIGIN,
@@ -0,0 +1,4 @@
1
+ import { G } from "./RecordSheet-CZ1jrBhN.js";
2
+ export {
3
+ G 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 { J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-BwjRQiu5.js";
3
+ import { J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-C6SMookl.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 { V as listRunsByAgent, C as automationStatuses, H as createAutomationRun, A as uploadFile, o as onInitMessage, v as pbSql, x as pbUpdateRecord } from "./automations-BwjRQiu5.js";
4
- import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-Bc47K8sI.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-C6SMookl.js";
4
+ import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-CBcctM1l.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.19.2-dev.0",
3
+ "version": "0.19.2",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -1,4 +0,0 @@
1
- import { G } from "./RecordSheet-74njjJNB.js";
2
- export {
3
- G as Mermaid
4
- };