@lumerahq/ui 0.14.0 → 0.15.0-dev.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
@@ -117,6 +117,8 @@ export function AppAssistant({ agentId }: { agentId: string }) {
117
117
  agentId={agentId}
118
118
  transport={transport}
119
119
  title="Finance assistant"
120
+ sessionFilter={(session) => session.id.startsWith('finance-')}
121
+ newChatPrefix="finance"
120
122
  suggestions={['Review open invoices', 'Draft collection notes']}
121
123
  toolRenderers={toolRenderers}
122
124
  className="h-full"
@@ -126,6 +128,8 @@ export function AppAssistant({ agentId }: { agentId: string }) {
126
128
  }
127
129
  ```
128
130
 
131
+ `sessionFilter` scopes the visible session list and ignores a backend-selected active session that does not pass the predicate. It is a client-side presentation filter, not an authorization boundary.
132
+
129
133
  Custom tool renderers are checked before the built-in renderer registry, so they can add support for custom tools or override how a built-in tool appears. Pass the same renderer array to `AssistantPage`, `AssistantChat`, or `AssistantWidget` through the `toolRenderers` prop. For the lower-level `AgentChat` component, pass it as `renderers={{ toolRenderers }}`.
130
134
 
131
135
  ### API Utilities
@@ -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-BeBkcUQz.js";
4
+ import { u as useAgentChat, a as useAgentChatSessions, b as useAutomationRun } from "./use-automation-run-DxPHTLmk.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, 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";
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-BuMtkzex.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-B9aPs2O1.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-CwSpnnd4.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-RyLkx3ak.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24375
+ var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-sPPwu_q1.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;
@@ -29161,10 +29161,11 @@ function AssistantPage({
29161
29161
  enableAttachments,
29162
29162
  historyLimit,
29163
29163
  discoveryPoll,
29164
+ sessionFilter,
29164
29165
  newChatPrefix = "app-chat",
29165
29166
  className
29166
29167
  }) {
29167
- const sessions = useAgentChatSessions({ agentId, transport, autoLoad: true });
29168
+ const sessions = useAgentChatSessions({ agentId, transport, sessionFilter, autoLoad: true });
29168
29169
  const [activeSessionId, setActiveSessionId] = useState(void 0);
29169
29170
  const [railOpen, setRailOpen] = useState(true);
29170
29171
  useEffect(() => {
@@ -1,4 +1,4 @@
1
- import { Z as requestApi } from "./automations-DGUEnAYR.js";
1
+ import { Z as requestApi } from "./automations-BuMtkzex.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));
@@ -1195,7 +1195,7 @@ async function pbUpdateRecord(collectionId, recordId, data) {
1195
1195
  return pbUpdate(collectionId, recordId, data);
1196
1196
  }
1197
1197
  const API_PREFIX = "/api";
1198
- const TERMINAL_STATUSES = ["succeeded", "failed", "cancelled"];
1198
+ const TERMINAL_STATUSES = ["succeeded", "failed", "cancelled", "timeout"];
1199
1199
  const ACTIVE_STATUSES = ["preparing", "queued", "running", "cancelling"];
1200
1200
  const isTerminalStatus = (status) => TERMINAL_STATUSES.includes(status);
1201
1201
  const isActiveStatus = (status) => ACTIVE_STATUSES.includes(status);
@@ -1,4 +1,5 @@
1
1
  import { AgentChatToolRenderer, AgentChatTransport } from '../agent-chat';
2
+ import { AgentChatSessionFilter } from '../../hooks';
2
3
  export interface AssistantPageProps {
3
4
  agentId?: string;
4
5
  transport: AgentChatTransport;
@@ -14,9 +15,11 @@ export interface AssistantPageProps {
14
15
  enableAttachments?: boolean;
15
16
  historyLimit?: number;
16
17
  discoveryPoll?: boolean;
18
+ /** Client-side session visibility filter. This is not an authorization boundary. */
19
+ sessionFilter?: AgentChatSessionFilter;
17
20
  /** Prefix for client-generated new-session ids. */
18
21
  newChatPrefix?: string;
19
22
  className?: string;
20
23
  }
21
- export declare function AssistantPage({ agentId, transport, title, subtitle, scopes, suggestions, placeholder, emptyTitle, emptyDescription, toolRenderers, onDataChange, enableAttachments, historyLimit, discoveryPoll, newChatPrefix, className, }: AssistantPageProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function AssistantPage({ agentId, transport, title, subtitle, scopes, suggestions, placeholder, emptyTitle, emptyDescription, toolRenderers, onDataChange, enableAttachments, historyLimit, discoveryPoll, sessionFilter, newChatPrefix, className, }: AssistantPageProps): import("react/jsx-runtime").JSX.Element;
22
25
  //# sourceMappingURL=AssistantPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantPage.d.ts","sourceRoot":"","sources":["../../../src/components/assistant/AssistantPage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoB,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAK3G,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,KAAmB,EACnB,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,aAA0B,EAC1B,SAAS,GACV,EAAE,kBAAkB,2CA2DpB"}
1
+ {"version":3,"file":"AssistantPage.d.ts","sourceRoot":"","sources":["../../../src/components/assistant/AssistantPage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoB,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,KAAK,sBAAsB,EAAwB,MAAM,SAAS,CAAC;AAI5E,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oFAAoF;IACpF,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,KAAmB,EACnB,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAA0B,EAC1B,SAAS,GACV,EAAE,kBAAkB,2CA2DpB"}
@@ -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-aoDqWNaZ.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-CaqQR6XO.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-aoDqWNaZ.js";
1
+ import { s as R$1, L as Li, t as At } from "./RecordSheet-CaqQR6XO.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 }) => {
@@ -0,0 +1,11 @@
1
+ interface SessionListResult<TSession extends {
2
+ id: string;
3
+ }> {
4
+ sessions: TSession[];
5
+ activeSessionId?: string;
6
+ }
7
+ export declare function filterSessionListResult<TSession extends {
8
+ id: string;
9
+ }, TResult extends SessionListResult<TSession>>(result: TResult, sessionFilter?: (session: TSession) => boolean): TResult & SessionListResult<TSession>;
10
+ export {};
11
+ //# sourceMappingURL=agent-chat-session-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-chat-session-filter.d.ts","sourceRoot":"","sources":["../../src/hooks/agent-chat-session-filter.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB,CAAC,QAAQ,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IACzD,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,SAAS,iBAAiB,CAAC,QAAQ,CAAC,EAClH,MAAM,EAAE,OAAO,EACf,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,GAC7C,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAWvC"}
@@ -1,5 +1,5 @@
1
1
  export { type UseAgentChatOptions, type UseAgentChatResult, useAgentChat, } from './use-agent-chat';
2
- export { type UseAgentChatSessionsOptions, type UseAgentChatSessionsResult, useAgentChatSessions, } from './use-agent-chat-sessions';
2
+ export { type AgentChatSessionFilter, type UseAgentChatSessionsOptions, type UseAgentChatSessionsResult, useAgentChatSessions, } from './use-agent-chat-sessions';
3
3
  export { useAutomationAgent } from './use-automation-agent';
4
4
  export { useAutomationRun } from './use-automation-run';
5
5
  export { type UploadStatus, type UseFileUploadOptions, type UseFileUploadReturn, useFileUpload, } from './use-file-upload';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
@@ -1,5 +1,5 @@
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";
1
+ import { u, a, b } from "../use-automation-run-DxPHTLmk.js";
2
+ import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-C5bU2-ES.js";
3
3
  export {
4
4
  u as useAgentChat,
5
5
  a as useAgentChatSessions,
@@ -1,8 +1,11 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { AgentChatID, AgentChatMetadata, AgentChatSession, AgentChatSessionListResult, AgentChatTransport } from '../components/agent-chat';
3
+ export type AgentChatSessionFilter<TMeta extends AgentChatMetadata = AgentChatMetadata> = (session: AgentChatSession<TMeta>) => boolean;
3
4
  export interface UseAgentChatSessionsOptions<TMeta extends AgentChatMetadata = AgentChatMetadata> {
4
5
  agentId?: string;
5
6
  transport: AgentChatTransport<TMeta, unknown, unknown>;
7
+ /** Client-side session visibility filter. This is not an authorization boundary. */
8
+ sessionFilter?: AgentChatSessionFilter<TMeta>;
6
9
  disabled?: boolean;
7
10
  autoLoad?: boolean;
8
11
  onError?: (error: unknown) => void;
@@ -17,5 +20,5 @@ export interface UseAgentChatSessionsResult<TMeta extends AgentChatMetadata = Ag
17
20
  loadSessions: () => Promise<AgentChatSessionListResult<TMeta> | undefined>;
18
21
  renameSession: (sessionId: AgentChatID, name: string) => Promise<AgentChatSession<TMeta> | undefined>;
19
22
  }
20
- export declare function useAgentChatSessions<TMeta extends AgentChatMetadata = AgentChatMetadata>({ agentId, transport, disabled, autoLoad, onError, }: UseAgentChatSessionsOptions<TMeta>): UseAgentChatSessionsResult<TMeta>;
23
+ export declare function useAgentChatSessions<TMeta extends AgentChatMetadata = AgentChatMetadata>({ agentId, transport, sessionFilter, disabled, autoLoad, onError, }: UseAgentChatSessionsOptions<TMeta>): UseAgentChatSessionsResult<TMeta>;
21
24
  //# sourceMappingURL=use-agent-chat-sessions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-agent-chat-sessions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-agent-chat-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAoC,MAAM,OAAO,CAAC;AAC7F,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,yBAAy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AAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;CACvG;AAED,wBAAgB,oBAAoB,CAAC,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EAAE,EACxF,OAAO,EACP,SAAS,EACT,aAAa,EACb,QAAgB,EAChB,QAAe,EACf,OAAO,GACR,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,0BAA0B,CAAC,KAAK,CAAC,CA6FxE"}
@@ -14,7 +14,7 @@ type UseAutomationRunOptions = {
14
14
  pollTimeoutMs?: number;
15
15
  /** If true, checks for an existing run with `externalId` before creating a new one. */
16
16
  dedupeWithExternalId?: boolean;
17
- /** Callback fired when the run reaches a terminal state (succeeded/failed/cancelled). */
17
+ /** Callback fired when the run reaches a terminal state (succeeded/failed/cancelled/timeout). */
18
18
  onComplete?: (run: AutomationRun) => void;
19
19
  /** Callback fired immediately when the run is created (before polling). */
20
20
  onCreated?: (run: AutomationRun) => void;
@@ -28,7 +28,7 @@ type UseAutomationRunState = {
28
28
  * The current status of the run.
29
29
  * - 'idle': Not started.
30
30
  * - 'running'/'queued'/'preparing': Active.
31
- * - 'succeeded'/'failed'/'cancelled': Terminal.
31
+ * - 'succeeded'/'failed'/'cancelled'/'timeout': Terminal.
32
32
  */
33
33
  status: AutomationRun['status'] | 'idle';
34
34
  /** Whether an operation (start, refresh, cancel) is in progress. */
@@ -1 +1 @@
1
- {"version":3,"file":"use-automation-run.d.ts","sourceRoot":"","sources":["../../src/hooks/use-automation-run.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAC;AAE5B,KAAK,uBAAuB,GAAG;IAC7B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,SAAS,CAAC,EAAE,OA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,GAAG,qBAAqB,CA2JxF"}
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-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";
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-CaqQR6XO.js";
2
+ import { u as u2, a as a2, b as b2 } from "./use-automation-run-DxPHTLmk.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-C5bU2-ES.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-BuMtkzex.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-B2-PFKpH.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-DvTR_z7A.js";
8
8
  export {
9
9
  A as AgentChat,
10
10
  a as ArtifactCard,
@@ -7,7 +7,7 @@
7
7
  * @module automations
8
8
  */
9
9
  /** Automation run status */
10
- export type AutomationStatus = 'preparing' | 'queued' | 'running' | 'cancelling' | 'succeeded' | 'failed' | 'cancelled';
10
+ export type AutomationStatus = 'preparing' | 'queued' | 'running' | 'cancelling' | 'succeeded' | 'failed' | 'cancelled' | 'timeout';
11
11
  /**
12
12
  * Check if a status is terminal (run is complete).
13
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/lib/automations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH,4BAA4B;AAC5B,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAQxH;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,gBAAgB,KAAG,OAA6C,CAAC;AAE1G;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,gBAAgB,KAAG,OAA2C,CAAC;AAEtG,4BAA4B;AAC5B,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBAAqB;AACrB,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;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iB,gBAAU,CAAC;AAEzC,0CAA0C;AAC1C,eAAO,MAAM,sBAAsB,oBAAc,CAAC;AAElD,4CAA4C;AAC5C,eAAO,MAAM,+BAA+B,sBAAgB,CAAC;AAE7D,gEAAgE;AAChE,wBAAsB,eAAe,CAAC,MAAM,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAM3B;AAED,8DAA8D;AAC9D,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAM3B"}
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-DGUEnAYR.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-BuMtkzex.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-B2-PFKpH.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-DvTR_z7A.js";
5
5
  export {
6
6
  B as BridgeError,
7
7
  E as EXPECTED_PARENT_ORIGIN,
@@ -0,0 +1,4 @@
1
+ import { r } from "./RecordSheet-CaqQR6XO.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 { J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-DGUEnAYR.js";
3
+ import { J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-BuMtkzex.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;
@@ -860,9 +860,16 @@ function accumulateTokenUsage(current, incoming) {
860
860
  } : current.cost
861
861
  };
862
862
  }
863
+ function filterSessionListResult(result, sessionFilter) {
864
+ const sessions = sessionFilter ? result.sessions.filter(sessionFilter) : result.sessions;
865
+ const activeSessionId = result.activeSessionId === void 0 ? sessions[0]?.id : sessionFilter && !sessions.some((session) => session.id === result.activeSessionId) ? void 0 : result.activeSessionId;
866
+ if (sessions === result.sessions && activeSessionId === result.activeSessionId) return result;
867
+ return { ...result, sessions, activeSessionId };
868
+ }
863
869
  function useAgentChatSessions({
864
870
  agentId,
865
871
  transport,
872
+ sessionFilter,
866
873
  disabled = false,
867
874
  autoLoad = true,
868
875
  onError
@@ -872,6 +879,12 @@ function useAgentChatSessions({
872
879
  const [error, setError] = useState(null);
873
880
  const [isLoading, setIsLoading] = useState(false);
874
881
  const [isRenaming, setIsRenaming] = useState(false);
882
+ const sessionFilterRef = useRef(sessionFilter);
883
+ sessionFilterRef.current = sessionFilter;
884
+ const visibleSessionResult = useMemo(
885
+ () => filterSessionListResult({ sessions, activeSessionId }, sessionFilter),
886
+ [activeSessionId, sessionFilter, sessions]
887
+ );
875
888
  const handleError = useCallback(
876
889
  (err) => {
877
890
  setError(err);
@@ -891,8 +904,8 @@ function useAgentChatSessions({
891
904
  try {
892
905
  const result = await transport.listSessions({ agentId });
893
906
  setSessions(result.sessions);
894
- setActiveSessionId(result.activeSessionId ?? result.sessions[0]?.id);
895
- return result;
907
+ setActiveSessionId(result.activeSessionId);
908
+ return sessionFilterRef.current ? filterSessionListResult(result, sessionFilterRef.current) : result;
896
909
  } catch (err) {
897
910
  handleError(err);
898
911
  return void 0;
@@ -935,8 +948,8 @@ function useAgentChatSessions({
935
948
  void loadSessions();
936
949
  }, [autoLoad, disabled, loadSessions]);
937
950
  return {
938
- sessions,
939
- activeSessionId,
951
+ sessions: visibleSessionResult.sessions,
952
+ activeSessionId: visibleSessionResult.activeSessionId,
940
953
  error,
941
954
  isLoading,
942
955
  isRenaming,
@@ -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-DGUEnAYR.js";
4
- import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-B2-PFKpH.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-BuMtkzex.js";
4
+ import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-DvTR_z7A.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.14.0",
3
+ "version": "0.15.0-dev.0",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -13,7 +13,7 @@
13
13
  "lint": "biome lint --write .",
14
14
  "check": "biome check --write .",
15
15
  "check:ci": "biome check .",
16
- "test": "tsc -p tsconfig.test.json && node --test dist-test/*.test.js",
16
+ "test": "rm -rf dist-test && tsc -p tsconfig.test.json && node --test 'dist-test/**/*.test.js'",
17
17
  "preview": "vite preview"
18
18
  },
19
19
  "main": "./dist/index.js",
@@ -1,4 +0,0 @@
1
- import { r } from "./RecordSheet-aoDqWNaZ.js";
2
- export {
3
- r as Mermaid
4
- };