@lumerahq/ui 0.19.0 → 0.19.2-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.
@@ -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-COk2p505.js";
4
+ import { u as useAgentChat, a as useAgentChatSessions, b as useAutomationRun } from "./use-automation-run-CeHNx0-5.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, C as automationStatuses, N as getAutomationRunFileDownloadUrl, T as listAutomationRunFiles } from "./automations-BuMtkzex.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";
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-yETAQJre.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-C2Kqh7sp.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-eGeRIfx3.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24375
+ var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-BX7CIWuS.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;
@@ -28240,31 +28240,57 @@ const DEFAULT_MAX_RECONNECTS = 30;
28240
28240
  function createLumeraAgentChatTransport(options) {
28241
28241
  const request = options.request ?? parentApiRequest;
28242
28242
  const stream = options.stream ?? parentApiStream;
28243
- const resolveAgentId = (agentId) => agentId ?? options.agentId;
28243
+ const resolvedAgentIds = /* @__PURE__ */ new Map();
28244
+ const lookupAgentId = async (agentId) => {
28245
+ const response = await request({
28246
+ method: "GET",
28247
+ url: `/api/agents/${encodeURIComponent(agentId)}/resolve`,
28248
+ timeout: 3e4
28249
+ });
28250
+ if (response.status === 404) return void 0;
28251
+ ensureBridgeOK(response, "Failed to resolve agent");
28252
+ const id = stringValue(isRecord(response.body) ? response.body.id : void 0);
28253
+ if (!id) throw new BridgeError("Invalid agent response", response.status, response);
28254
+ return id;
28255
+ };
28256
+ const resolveAgentId = (agentId) => {
28257
+ const reference = (agentId ?? options.agentId).trim();
28258
+ const cached = resolvedAgentIds.get(reference);
28259
+ 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);
28264
+ });
28265
+ return resolution;
28266
+ };
28244
28267
  const resolveSessionId = (sessionId) => sessionId ?? options.sessionId ?? DEFAULT_SESSION_ID;
28245
28268
  return {
28246
28269
  loadAgent: async ({ agentId }) => {
28270
+ const resolvedAgentId = await resolveAgentId(agentId);
28247
28271
  const response = await request({
28248
28272
  method: "GET",
28249
- url: `/api/agents/${encodeURIComponent(resolveAgentId(agentId))}`,
28273
+ url: `/api/agents/${encodeURIComponent(resolvedAgentId)}`,
28250
28274
  timeout: 3e4
28251
28275
  });
28252
28276
  ensureBridgeOK(response, "Failed to load agent profile");
28253
28277
  return parseAgentProfile(response.body);
28254
28278
  },
28255
28279
  listSessions: async ({ agentId }) => {
28280
+ const resolvedAgentId = await resolveAgentId(agentId);
28256
28281
  const response = await request({
28257
28282
  method: "GET",
28258
- url: `/api/agents/${encodeURIComponent(resolveAgentId(agentId))}/sessions`,
28283
+ url: `/api/agents/${encodeURIComponent(resolvedAgentId)}/sessions`,
28259
28284
  timeout: 3e4
28260
28285
  });
28261
28286
  ensureBridgeOK(response, "Failed to list agent sessions");
28262
28287
  return parseSessionListResult(response.body);
28263
28288
  },
28264
28289
  renameSession: async ({ agentId, sessionId, name: name2 }) => {
28290
+ const resolvedAgentId = await resolveAgentId(agentId);
28265
28291
  const response = await request({
28266
28292
  method: "PATCH",
28267
- url: `/api/agents/${encodeURIComponent(resolveAgentId(agentId))}/sessions/${encodeURIComponent(sessionId)}`,
28293
+ url: `/api/agents/${encodeURIComponent(resolvedAgentId)}/sessions/${encodeURIComponent(sessionId)}`,
28268
28294
  headers: { "Content-Type": "application/json" },
28269
28295
  body: { name: name2 },
28270
28296
  timeout: 3e4
@@ -28275,35 +28301,27 @@ function createLumeraAgentChatTransport(options) {
28275
28301
  return session;
28276
28302
  },
28277
28303
  loadHistory: async ({ agentId, sessionId, limit, beforeCursor }) => {
28304
+ const resolvedAgentId = await resolveAgentId(agentId);
28278
28305
  const response = await request({
28279
28306
  method: "GET",
28280
- url: buildHistoryUrl(
28281
- resolveAgentId(agentId),
28282
- resolveSessionId(sessionId),
28283
- limit ?? options.historyLimit,
28284
- beforeCursor
28285
- ),
28307
+ url: buildHistoryUrl(resolvedAgentId, resolveSessionId(sessionId), limit ?? options.historyLimit, beforeCursor),
28286
28308
  timeout: 3e4
28287
28309
  });
28288
28310
  ensureBridgeOK(response, "Failed to load agent history");
28289
28311
  return parseHistoryResult(response.body);
28290
28312
  },
28291
28313
  loadEarlier: async ({ agentId, sessionId, limit, beforeCursor }) => {
28314
+ const resolvedAgentId = await resolveAgentId(agentId);
28292
28315
  const response = await request({
28293
28316
  method: "GET",
28294
- url: buildHistoryUrl(
28295
- resolveAgentId(agentId),
28296
- resolveSessionId(sessionId),
28297
- limit ?? options.historyLimit,
28298
- beforeCursor
28299
- ),
28317
+ url: buildHistoryUrl(resolvedAgentId, resolveSessionId(sessionId), limit ?? options.historyLimit, beforeCursor),
28300
28318
  timeout: 3e4
28301
28319
  });
28302
28320
  ensureBridgeOK(response, "Failed to load earlier agent history");
28303
28321
  return parseHistoryResult(response.body);
28304
28322
  },
28305
28323
  sendMessage: async (input) => {
28306
- const agentId = resolveAgentId(input.metadata?.agentId);
28324
+ const agentId = await resolveAgentId(input.metadata?.agentId);
28307
28325
  const sessionId = resolveSessionId(input.sessionId);
28308
28326
  const body = await buildStartBody(input, sessionId, options);
28309
28327
  const response = await request({
@@ -28324,24 +28342,38 @@ function createLumeraAgentChatTransport(options) {
28324
28342
  return parseSubmitResult(response.body, input, sessionId);
28325
28343
  },
28326
28344
  subscribe: ({ agentId, sessionId, requestId }, handlers2) => {
28327
- const resolvedAgentId = resolveAgentId(agentId);
28328
- const resolvedSessionId = resolveSessionId(sessionId);
28329
- return subscribeToLiveStream({
28330
- agentId: resolvedAgentId,
28331
- sessionId: resolvedSessionId,
28332
- requestId,
28333
- stream,
28334
- handlers: handlers2,
28335
- waitMs: options.streamWaitMs ?? DEFAULT_STREAM_WAIT_MS,
28336
- reconnectDelayMs: options.reconnectDelayMs ?? DEFAULT_RECONNECT_DELAY_MS,
28337
- maxReconnects: options.maxReconnects ?? DEFAULT_MAX_RECONNECTS
28345
+ let closed = false;
28346
+ let active;
28347
+ void resolveAgentId(agentId).then((resolvedAgentId) => {
28348
+ if (closed) return;
28349
+ active = subscribeToLiveStream({
28350
+ agentId: resolvedAgentId,
28351
+ sessionId: resolveSessionId(sessionId),
28352
+ requestId,
28353
+ stream,
28354
+ handlers: handlers2,
28355
+ waitMs: options.streamWaitMs ?? DEFAULT_STREAM_WAIT_MS,
28356
+ reconnectDelayMs: options.reconnectDelayMs ?? DEFAULT_RECONNECT_DELAY_MS,
28357
+ maxReconnects: options.maxReconnects ?? DEFAULT_MAX_RECONNECTS
28358
+ });
28359
+ }).catch((error2) => {
28360
+ if (closed) return;
28361
+ handlers2.onError?.(error2);
28362
+ handlers2.onClose?.();
28338
28363
  });
28364
+ return {
28365
+ close: () => {
28366
+ closed = true;
28367
+ active?.close();
28368
+ }
28369
+ };
28339
28370
  },
28340
28371
  uploadFile: async (file, context) => {
28372
+ const resolvedAgentId = await resolveAgentId(context?.agentId);
28341
28373
  const base64 = await fileToBase64(file);
28342
28374
  const response = await request({
28343
28375
  method: "POST",
28344
- url: `/api/agents/${encodeURIComponent(resolveAgentId(context?.agentId))}/upload?${new URLSearchParams({
28376
+ url: `/api/agents/${encodeURIComponent(resolvedAgentId)}/upload?${new URLSearchParams({
28345
28377
  session_id: resolveSessionId(context?.sessionId)
28346
28378
  }).toString()}`,
28347
28379
  headers: { "Content-Type": file.type || "application/octet-stream" },
@@ -28355,9 +28387,10 @@ function createLumeraAgentChatTransport(options) {
28355
28387
  return parseUploadResult(response.body, file);
28356
28388
  },
28357
28389
  abort: async ({ agentId, sessionId }) => {
28390
+ const resolvedAgentId = await resolveAgentId(agentId);
28358
28391
  const response = await request({
28359
28392
  method: "POST",
28360
- url: `/api/agents/${encodeURIComponent(resolveAgentId(agentId))}/abort?${new URLSearchParams({
28393
+ url: `/api/agents/${encodeURIComponent(resolvedAgentId)}/abort?${new URLSearchParams({
28361
28394
  session_id: resolveSessionId(sessionId)
28362
28395
  }).toString()}`,
28363
28396
  timeout: 3e4
@@ -1,4 +1,4 @@
1
- import { Z as requestApi } from "./automations-BuMtkzex.js";
1
+ import { Z as requestApi } from "./automations-BwjRQiu5.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));
@@ -1194,15 +1194,42 @@ async function sendEmail(options) {
1194
1194
  async function pbUpdateRecord(collectionId, recordId, data) {
1195
1195
  return pbUpdate(collectionId, recordId, data);
1196
1196
  }
1197
+ function qualifyProjectResourceExternalId(reference, projectExternalId = getAppProjectExternalId()) {
1198
+ const value = reference.trim();
1199
+ return value.includes(":") || !projectExternalId ? value : `${projectExternalId}:${value}`;
1200
+ }
1201
+ async function resolveProjectResourceId(reference, lookup, projectExternalId = getAppProjectExternalId()) {
1202
+ const value = reference.trim();
1203
+ if (!value) throw new Error("Resource ID is required");
1204
+ if (value.includes(":") || !projectExternalId) return value;
1205
+ const qualified = await lookup(`${projectExternalId}:${value}`);
1206
+ if (qualified) return qualified;
1207
+ const internal = await lookup(value);
1208
+ if (internal) return internal;
1209
+ throw new Error(`Resource not found: ${value}`);
1210
+ }
1197
1211
  const API_PREFIX = "/api";
1212
+ const ALL_STATUSES = [
1213
+ "preparing",
1214
+ "queued",
1215
+ "claimed",
1216
+ "running",
1217
+ "cancelling",
1218
+ "succeeded",
1219
+ "failed",
1220
+ "cancelled",
1221
+ "timeout"
1222
+ ];
1198
1223
  const TERMINAL_STATUSES = ["succeeded", "failed", "cancelled", "timeout"];
1199
- const ACTIVE_STATUSES = ["preparing", "queued", "running", "cancelling"];
1224
+ const ACTIVE_STATUSES = ["preparing", "queued", "claimed", "running", "cancelling"];
1200
1225
  const isTerminalStatus = (status) => TERMINAL_STATUSES.includes(status);
1201
1226
  const isActiveStatus = (status) => ACTIVE_STATUSES.includes(status);
1202
1227
  const automationIdCache = /* @__PURE__ */ new Map();
1203
1228
  function clearAutomationCache(externalId) {
1204
1229
  if (externalId) {
1205
- automationIdCache.delete(externalId);
1230
+ const value = externalId.trim();
1231
+ automationIdCache.delete(value);
1232
+ automationIdCache.delete(qualifyProjectResourceExternalId(value));
1206
1233
  } else {
1207
1234
  automationIdCache.clear();
1208
1235
  }
@@ -1241,30 +1268,33 @@ const request = async (path, options) => {
1241
1268
  }
1242
1269
  return parseResponseBody(response);
1243
1270
  };
1244
- async function getAutomationByExternalId(externalId) {
1245
- if (!externalId) throw new Error("External ID is required");
1271
+ async function findAutomationByExternalId(externalId) {
1246
1272
  const cached = automationIdCache.get(externalId);
1247
1273
  if (cached) return cached;
1248
1274
  const response = await request(
1249
1275
  `/automations?external_id=${encodeURIComponent(externalId)}&limit=1`,
1250
1276
  { method: "GET" }
1251
1277
  );
1252
- const automation = response.automations?.[0];
1253
- if (!automation?.id) {
1254
- throw new Error(`Automation not found with external_id: ${externalId}`);
1255
- }
1256
- automationIdCache.set(externalId, automation.id);
1257
- return automation.id;
1278
+ const id = response.automations?.[0]?.id;
1279
+ if (id) automationIdCache.set(externalId, id);
1280
+ return id;
1281
+ }
1282
+ async function getAutomationByExternalId(externalId) {
1283
+ const value = externalId.trim();
1284
+ if (!value) throw new Error("External ID is required");
1285
+ const qualified = qualifyProjectResourceExternalId(value);
1286
+ const id = await findAutomationByExternalId(qualified) ?? (qualified !== value ? await findAutomationByExternalId(value) : void 0);
1287
+ if (!id) throw new BridgeError(`Automation not found with external_id: ${value}`, 404);
1288
+ return id;
1258
1289
  }
1259
1290
  async function resolveAutomationId(automationId) {
1260
- if (automationId.includes(":")) {
1261
- return getAutomationByExternalId(automationId);
1262
- }
1263
- const projectExternalId = getAppProjectExternalId();
1264
- if (projectExternalId) {
1265
- return getAutomationByExternalId(`${projectExternalId}:${automationId}`);
1266
- }
1267
- return automationId;
1291
+ automationId = automationId.trim();
1292
+ if (!automationId) throw new Error("Automation ID is required");
1293
+ if (automationId.includes(":")) return getAutomationByExternalId(automationId);
1294
+ return resolveProjectResourceId(automationId, async (reference) => {
1295
+ if (reference.includes(":")) return findAutomationByExternalId(reference);
1296
+ return await findAutomationByExternalId(reference) ?? reference;
1297
+ });
1268
1298
  }
1269
1299
  async function createRun(options) {
1270
1300
  const { automationId, inputs, externalId, trigger, metadata } = options;
@@ -1380,6 +1410,7 @@ async function getRunFileUrl(runId, filename) {
1380
1410
  return response.download_url;
1381
1411
  }
1382
1412
  const automationStatuses = {
1413
+ ALL_STATUSES,
1383
1414
  TERMINAL_STATUSES,
1384
1415
  ACTIVE_STATUSES,
1385
1416
  isTerminal: isTerminalStatus,
@@ -1449,6 +1480,7 @@ export {
1449
1480
  pollAutomationRun as X,
1450
1481
  pollRun as Y,
1451
1482
  requestApi as Z,
1483
+ resolveProjectResourceId as _,
1452
1484
  getShareableAppUrl as a,
1453
1485
  buildShareableAppUrl as b,
1454
1486
  configureBridge as c,
@@ -1,6 +1,7 @@
1
1
  import { BridgeRequest, BridgeResponse, BridgeStream, parentApiStream } from '../../lib/bridge';
2
2
  import { AgentChatMetadata, AgentChatSubmitInput, AgentChatTransport } from './types';
3
3
  export interface LumeraAgentChatTransportOptions {
4
+ /** Internal ID, bare external ID, or qualified external ID. */
4
5
  agentId: string;
5
6
  sessionId?: string;
6
7
  historyLimit?: number;
@@ -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;AAE9E,OAAO,KAAK,EAQV,iBAAiB,EAOjB,oBAAoB,EAIpB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAC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gB,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,CAuKzD"}
@@ -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-BF55bW_k.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-74njjJNB.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-BF55bW_k.js";
1
+ import { H as R$1, L as Li, I as At } from "./RecordSheet-74njjJNB.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-COk2p505.js";
2
- import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-BBVUS-OK.js";
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";
3
3
  export {
4
4
  u as useAgentChat,
5
5
  a as useAgentChatSessions,
@@ -27,7 +27,7 @@ type UseAutomationRunState = {
27
27
  /**
28
28
  * The current status of the run.
29
29
  * - 'idle': Not started.
30
- * - 'running'/'queued'/'preparing': Active.
30
+ * - 'preparing'/'queued'/'claimed'/'running'/'cancelling': Active.
31
31
  * - 'succeeded'/'failed'/'cancelled'/'timeout': Terminal.
32
32
  */
33
33
  status: AutomationRun['status'] | 'idle';
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-BF55bW_k.js";
2
- import { u as u2, a as a2, b as b2 } from "./use-automation-run-COk2p505.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-BBVUS-OK.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-BuMtkzex.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-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";
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-CTzKqmZ2.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";
8
8
  export {
9
9
  A as ActivityStrip,
10
10
  a as AgentChat,
@@ -6,8 +6,10 @@
6
6
  *
7
7
  * @module automations
8
8
  */
9
+ /** Complete automation run status contract, including observable transitions. */
10
+ declare const ALL_STATUSES: readonly ["preparing", "queued", "claimed", "running", "cancelling", "succeeded", "failed", "cancelled", "timeout"];
9
11
  /** Automation run status */
10
- export type AutomationStatus = 'preparing' | 'queued' | 'running' | 'cancelling' | 'succeeded' | 'failed' | 'cancelled' | 'timeout';
12
+ export type AutomationStatus = (typeof ALL_STATUSES)[number];
11
13
  /**
12
14
  * Check if a status is terminal (run is complete).
13
15
  */
@@ -51,7 +53,7 @@ export type AutomationRunFile = {
51
53
  };
52
54
  /** Options for creating a run */
53
55
  export type CreateRunOptions = {
54
- /** Automation ID or external_id (if contains `:`, treated as external_id) */
56
+ /** Internal ID, bare external ID, or qualified external ID */
55
57
  automationId: string;
56
58
  /** Input parameters for the automation */
57
59
  inputs: Record<string, unknown>;
@@ -100,16 +102,6 @@ export type PollOptions = {
100
102
  * clearAutomationCache();
101
103
  */
102
104
  export declare function clearAutomationCache(externalId?: string): void;
103
- /**
104
- * Get automation ID by external_id.
105
- * Results are cached to avoid repeated lookups.
106
- *
107
- * @param externalId - The external_id of the automation
108
- * @returns The internal automation ID
109
- *
110
- * @example
111
- * const id = await getAutomationByExternalId('my_app:process_data');
112
- */
113
105
  export declare function getAutomationByExternalId(externalId: string): Promise<string>;
114
106
  /**
115
107
  * Create and start a new automation run.
@@ -230,8 +222,9 @@ export declare function getRunFiles(runId: string): Promise<AutomationRunFile[]>
230
222
  export declare function getRunFileUrl(runId: string, filename: string): Promise<string>;
231
223
  /** Status helper functions and constants */
232
224
  export declare const automationStatuses: {
233
- readonly TERMINAL_STATUSES: AutomationStatus[];
234
- readonly ACTIVE_STATUSES: AutomationStatus[];
225
+ readonly ALL_STATUSES: readonly ["preparing", "queued", "claimed", "running", "cancelling", "succeeded", "failed", "cancelled", "timeout"];
226
+ readonly TERMINAL_STATUSES: ("queued" | "claimed" | "preparing" | "running" | "failed" | "succeeded" | "cancelling" | "cancelled" | "timeout")[];
227
+ readonly ACTIVE_STATUSES: ("queued" | "claimed" | "preparing" | "running" | "failed" | "succeeded" | "cancelling" | "cancelled" | "timeout")[];
235
228
  readonly isTerminal: (status: AutomationStatus) => boolean;
236
229
  readonly isActive: (status: AutomationStatus) => boolean;
237
230
  };
@@ -271,4 +264,5 @@ export declare function listRunsByExternalId(params: {
271
264
  agentId?: string;
272
265
  limit?: number;
273
266
  }): Promise<AutomationRun[]>;
267
+ export {};
274
268
  //# sourceMappingURL=automations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/lib/automations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH,4BA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,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-BuMtkzex.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-BwjRQiu5.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-CTzKqmZ2.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";
5
5
  export {
6
6
  B as BridgeError,
7
7
  E as EXPECTED_PARENT_ORIGIN,
@@ -0,0 +1,3 @@
1
+ export declare function qualifyProjectResourceExternalId(reference: string, projectExternalId?: string | undefined): string;
2
+ export declare function resolveProjectResourceId(reference: string, lookup: (reference: string) => Promise<string | undefined>, projectExternalId?: string | undefined): Promise<string>;
3
+ //# sourceMappingURL=project-resource-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-resource-id.d.ts","sourceRoot":"","sources":["../../src/lib/project-resource-id.ts"],"names":[],"mappings":"AAEA,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,MAAM,EACjB,iBAAiB,qBAA4B,GAC5C,MAAM,CAGR;AAED,wBAAsB,wBAAwB,CAC5C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,EAC1D,iBAAiB,qBAA4B,GAC5C,OAAO,CAAC,MAAM,CAAC,CAYjB"}
@@ -0,0 +1,4 @@
1
+ import { G } from "./RecordSheet-74njjJNB.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-BuMtkzex.js";
3
+ import { J as ensureAutomationRun, H as createAutomationRun, D as cancelAutomationRun, C as automationStatuses, M as getAutomationRun } from "./automations-BwjRQiu5.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-BuMtkzex.js";
4
- import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-CTzKqmZ2.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-BwjRQiu5.js";
4
+ import { n as normalizeRecordAuditCollections, d as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-Bc47K8sI.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.0",
3
+ "version": "0.19.2-dev.0",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -1,4 +0,0 @@
1
- import { G } from "./RecordSheet-BF55bW_k.js";
2
- export {
3
- G as Mermaid
4
- };