@lumerahq/ui 0.9.1 → 0.10.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.
Files changed (63) hide show
  1. package/dist/{RecordSheet-yAcqIdOK.js → RecordSheet-CZ-x6AeG.js} +3560 -2042
  2. package/dist/{automations-DNWw-HT7.js → automations-Bb9nlU05.js} +281 -22
  3. package/dist/components/agent-chat/AgentChat.d.ts +1 -1
  4. package/dist/components/agent-chat/AgentChat.d.ts.map +1 -1
  5. package/dist/components/agent-chat/ArtifactCard.d.ts +8 -0
  6. package/dist/components/agent-chat/ArtifactCard.d.ts.map +1 -0
  7. package/dist/components/agent-chat/index.d.ts +4 -0
  8. package/dist/components/agent-chat/index.d.ts.map +1 -1
  9. package/dist/components/agent-chat/tool-renderers/ArtifactRenderer.d.ts +3 -0
  10. package/dist/components/agent-chat/tool-renderers/ArtifactRenderer.d.ts.map +1 -0
  11. package/dist/components/agent-chat/tool-renderers/BashRenderer.d.ts +3 -0
  12. package/dist/components/agent-chat/tool-renderers/BashRenderer.d.ts.map +1 -0
  13. package/dist/components/agent-chat/tool-renderers/DefaultRenderer.d.ts +3 -0
  14. package/dist/components/agent-chat/tool-renderers/DefaultRenderer.d.ts.map +1 -0
  15. package/dist/components/agent-chat/tool-renderers/EditRenderer.d.ts +3 -0
  16. package/dist/components/agent-chat/tool-renderers/EditRenderer.d.ts.map +1 -0
  17. package/dist/components/agent-chat/tool-renderers/FindRenderer.d.ts +3 -0
  18. package/dist/components/agent-chat/tool-renderers/FindRenderer.d.ts.map +1 -0
  19. package/dist/components/agent-chat/tool-renderers/GrepRenderer.d.ts +3 -0
  20. package/dist/components/agent-chat/tool-renderers/GrepRenderer.d.ts.map +1 -0
  21. package/dist/components/agent-chat/tool-renderers/IntegrationProxyRenderer.d.ts +3 -0
  22. package/dist/components/agent-chat/tool-renderers/IntegrationProxyRenderer.d.ts.map +1 -0
  23. package/dist/components/agent-chat/tool-renderers/LsRenderer.d.ts +3 -0
  24. package/dist/components/agent-chat/tool-renderers/LsRenderer.d.ts.map +1 -0
  25. package/dist/components/agent-chat/tool-renderers/LumeraApiRenderer.d.ts +3 -0
  26. package/dist/components/agent-chat/tool-renderers/LumeraApiRenderer.d.ts.map +1 -0
  27. package/dist/components/agent-chat/tool-renderers/ReadRenderer.d.ts +3 -0
  28. package/dist/components/agent-chat/tool-renderers/ReadRenderer.d.ts.map +1 -0
  29. package/dist/components/agent-chat/tool-renderers/SqlQueryRenderer.d.ts +3 -0
  30. package/dist/components/agent-chat/tool-renderers/SqlQueryRenderer.d.ts.map +1 -0
  31. package/dist/components/agent-chat/tool-renderers/ToolCallCard.d.ts +15 -0
  32. package/dist/components/agent-chat/tool-renderers/ToolCallCard.d.ts.map +1 -0
  33. package/dist/components/agent-chat/tool-renderers/WebSearchRenderer.d.ts +3 -0
  34. package/dist/components/agent-chat/tool-renderers/WebSearchRenderer.d.ts.map +1 -0
  35. package/dist/components/agent-chat/tool-renderers/WriteRenderer.d.ts +3 -0
  36. package/dist/components/agent-chat/tool-renderers/WriteRenderer.d.ts.map +1 -0
  37. package/dist/components/agent-chat/tool-renderers/index.d.ts +13 -0
  38. package/dist/components/agent-chat/tool-renderers/index.d.ts.map +1 -0
  39. package/dist/components/agent-chat/tool-renderers/types.d.ts +27 -0
  40. package/dist/components/agent-chat/tool-renderers/types.d.ts.map +1 -0
  41. package/dist/components/agent-chat/tool-renderers/utils.d.ts +33 -0
  42. package/dist/components/agent-chat/tool-renderers/utils.d.ts.map +1 -0
  43. package/dist/components/agent-chat/types.d.ts +37 -0
  44. package/dist/components/agent-chat/types.d.ts.map +1 -1
  45. package/dist/components/index.d.ts +2 -2
  46. package/dist/components/index.d.ts.map +1 -1
  47. package/dist/components/index.js +15 -6
  48. package/dist/components/ui/button.d.ts +1 -1
  49. package/dist/{highlighted-body-OFNGDK62-CeR4x7F6.js → highlighted-body-OFNGDK62-DMJuoRQR.js} +1 -1
  50. package/dist/hooks/index.js +2 -2
  51. package/dist/hooks/use-agent-chat.d.ts +19 -1
  52. package/dist/hooks/use-agent-chat.d.ts.map +1 -1
  53. package/dist/hooks/use-discovery-poll.d.ts +26 -0
  54. package/dist/hooks/use-discovery-poll.d.ts.map +1 -0
  55. package/dist/index.js +64 -56
  56. package/dist/lib/index.js +52 -53
  57. package/dist/mermaid-GHXKKRXX-oYSoQafD.js +4 -0
  58. package/dist/ui.css +135 -10
  59. package/dist/{use-automation-run-D_1647k0.js → use-automation-run-BnhDQAJ6.js} +255 -11
  60. package/dist/{use-sql-table-8APCNryn.js → use-sql-table-D5tupvS2.js} +1 -2
  61. package/package.json +1 -1
  62. package/dist/api-Bm4dzr1n.js +0 -262
  63. package/dist/mermaid-GHXKKRXX-BCicmuVL.js +0 -4
@@ -784,6 +784,250 @@ const parentApiStream = (request2, handlers) => {
784
784
  }
785
785
  };
786
786
  };
787
+ const API_PREFIX$1 = "/api";
788
+ const buildUrl$1 = (path) => {
789
+ const normalized = path.startsWith("/") ? path : `/${path}`;
790
+ return normalized.startsWith(API_PREFIX$1) ? normalized : `${API_PREFIX$1}${normalized}`;
791
+ };
792
+ const request$1 = async (path, options) => {
793
+ const response = await parentApiRequest({
794
+ ...options,
795
+ url: buildUrl$1(path)
796
+ });
797
+ if (!response.ok) {
798
+ const message = extractErrorMessage$1(response);
799
+ throw new BridgeError(message, response.status, response);
800
+ }
801
+ return parseResponseBody$1(response);
802
+ };
803
+ const extractErrorMessage$1 = (response) => {
804
+ if (typeof response.error === "string" && response.error.trim()) {
805
+ return response.error;
806
+ }
807
+ if (typeof response.body === "string" && response.body.trim()) {
808
+ return response.body;
809
+ }
810
+ return `Request failed (${response.status})`;
811
+ };
812
+ const parseResponseBody$1 = (response) => {
813
+ if (typeof response.body === "string") {
814
+ try {
815
+ return JSON.parse(response.body);
816
+ } catch {
817
+ return response.body;
818
+ }
819
+ }
820
+ return response.body;
821
+ };
822
+ const validateSql = (req) => {
823
+ const trimmed = req.sql?.trim();
824
+ if (!trimmed) {
825
+ throw new Error("SQL string is required");
826
+ }
827
+ if (req.params && req.args) {
828
+ throw new Error("Use either named params or positional args, not both");
829
+ }
830
+ return trimmed;
831
+ };
832
+ const fileToBase64 = (file) => new Promise((resolve, reject) => {
833
+ const reader = new FileReader();
834
+ reader.onloadend = () => {
835
+ const result = reader.result;
836
+ resolve(result.split(",")[1]);
837
+ };
838
+ reader.onerror = reject;
839
+ reader.readAsDataURL(file);
840
+ });
841
+ async function pbSql(req) {
842
+ const sql = validateSql(req);
843
+ return request$1("/pb/sql", {
844
+ method: "POST",
845
+ headers: { "Content-Type": "application/json" },
846
+ body: { ...req, sql }
847
+ });
848
+ }
849
+ async function pbGet(collection, id, expand) {
850
+ if (!collection) throw new Error("Collection is required for pbGet");
851
+ if (!id) throw new Error("Record ID is required for pbGet");
852
+ const params = expand ? `?expand=${encodeURIComponent(expand)}` : "";
853
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records/${encodeURIComponent(id)}${params}`, {
854
+ method: "GET"
855
+ });
856
+ }
857
+ async function pbList(collection, options = {}) {
858
+ if (!collection) throw new Error("Collection is required for pbList");
859
+ const { page = 1, perPage = 20, filter, sort, expand } = options;
860
+ if (page < 1) throw new Error("Page must be >= 1");
861
+ if (perPage < 1 || perPage > 500) throw new Error("perPage must be between 1 and 500");
862
+ const params = new URLSearchParams({
863
+ page: String(page),
864
+ perPage: String(perPage)
865
+ });
866
+ if (filter) params.set("filter", filter);
867
+ if (sort) params.set("sort", sort);
868
+ if (expand) params.set("expand", expand);
869
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records?${params}`, {
870
+ method: "GET"
871
+ });
872
+ }
873
+ async function pbSearch(collection, query, options = {}) {
874
+ if (!collection) throw new Error("Collection is required");
875
+ const { page = 1, perPage = 20, sort, expand } = options;
876
+ const params = new URLSearchParams({
877
+ q: query,
878
+ page: String(page),
879
+ perPage: String(perPage)
880
+ });
881
+ if (sort) params.set("sort", sort);
882
+ if (expand) params.set("expand", expand);
883
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/search?${params}`, {
884
+ method: "GET"
885
+ });
886
+ }
887
+ async function pbCreate(collection, data) {
888
+ if (!collection) throw new Error("Collection is required");
889
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records`, {
890
+ method: "POST",
891
+ headers: { "Content-Type": "application/json" },
892
+ body: data
893
+ });
894
+ }
895
+ async function pbUpdate(collection, id, data) {
896
+ if (!collection) throw new Error("Collection is required");
897
+ if (!id) throw new Error("Record ID is required");
898
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records/${encodeURIComponent(id)}`, {
899
+ method: "PATCH",
900
+ headers: { "Content-Type": "application/json" },
901
+ body: data
902
+ });
903
+ }
904
+ async function pbDelete(collection, id) {
905
+ if (!collection) throw new Error("Collection is required");
906
+ if (!id) throw new Error("Record ID is required");
907
+ await request$1(`/pb/collections/${encodeURIComponent(collection)}/records/${encodeURIComponent(id)}`, {
908
+ method: "DELETE"
909
+ });
910
+ }
911
+ const MAX_BULK_SIZE = 1e3;
912
+ async function pbBulkUpdate(collection, records) {
913
+ if (!collection) throw new Error("Collection is required for pbBulkUpdate");
914
+ if (!records.length) return { succeeded: 0, failed: 0, errors: [] };
915
+ if (records.length > MAX_BULK_SIZE) {
916
+ throw new Error(`Bulk update limited to ${MAX_BULK_SIZE} records. Consider batching larger operations.`);
917
+ }
918
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records/bulk/update`, {
919
+ method: "POST",
920
+ headers: { "Content-Type": "application/json" },
921
+ body: { records, transaction: true }
922
+ });
923
+ }
924
+ async function pbBulkDelete(collection, ids) {
925
+ if (!collection) throw new Error("Collection is required for pbBulkDelete");
926
+ if (!ids.length) return { succeeded: 0, failed: 0, errors: [] };
927
+ if (ids.length > MAX_BULK_SIZE) {
928
+ throw new Error(`Bulk delete limited to ${MAX_BULK_SIZE} records. Consider batching larger operations.`);
929
+ }
930
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records/bulk/delete`, {
931
+ method: "POST",
932
+ headers: { "Content-Type": "application/json" },
933
+ body: { ids }
934
+ });
935
+ }
936
+ async function pbUpsert(collection, data) {
937
+ if (!collection) throw new Error("Collection is required");
938
+ if (!data.external_id) throw new Error("external_id is required for upsert");
939
+ return request$1(`/pb/collections/${encodeURIComponent(collection)}/records/upsert`, {
940
+ method: "POST",
941
+ headers: { "Content-Type": "application/json" },
942
+ body: data
943
+ });
944
+ }
945
+ async function getUploadUrl(filename, contentType, options) {
946
+ if (!filename) throw new Error("Filename is required");
947
+ if (!options.collectionId) throw new Error("Collection ID is required");
948
+ if (!options.fieldName) throw new Error("Field name is required");
949
+ return request$1("/pb/uploads/presign", {
950
+ method: "POST",
951
+ headers: { "Content-Type": "application/json" },
952
+ body: {
953
+ collection_id: options.collectionId,
954
+ field_name: options.fieldName,
955
+ filename,
956
+ content_type: contentType
957
+ }
958
+ });
959
+ }
960
+ const DEFAULT_UPLOAD_TIMEOUT_MS = 6e4;
961
+ async function uploadFile(file, options) {
962
+ const { object_key, upload_url } = await getUploadUrl(file.name, file.type || "application/octet-stream", options);
963
+ if (!upload_url) {
964
+ throw new Error("Missing upload URL in response");
965
+ }
966
+ const base64 = await fileToBase64(file);
967
+ const contentType = file.type || "application/octet-stream";
968
+ const response = await parentApiRequest({
969
+ method: "PUT",
970
+ url: upload_url,
971
+ headers: { "Content-Type": contentType },
972
+ body: base64,
973
+ isBase64: true,
974
+ timeout: options.timeout ?? DEFAULT_UPLOAD_TIMEOUT_MS
975
+ });
976
+ if (!response.ok) {
977
+ throw new BridgeError(`Upload failed: ${response.error || response.status}`, response.status);
978
+ }
979
+ const descriptor = {
980
+ object_key,
981
+ original_name: file.name,
982
+ size: file.size,
983
+ content_type: contentType,
984
+ uploaded_at: (/* @__PURE__ */ new Date()).toISOString()
985
+ };
986
+ return { objectKey: object_key, descriptor };
987
+ }
988
+ async function getDownloadUrl(objectKey) {
989
+ if (!objectKey) throw new Error("Object key is required");
990
+ const response = await request$1("/pb/uploads/download", {
991
+ method: "POST",
992
+ headers: { "Content-Type": "application/json" },
993
+ body: { object_key: objectKey }
994
+ });
995
+ if (!response?.download_url) {
996
+ throw new Error("Missing download URL in response");
997
+ }
998
+ return response.download_url;
999
+ }
1000
+ async function sendEmail(options) {
1001
+ if (!options.to || Array.isArray(options.to) && options.to.length === 0) {
1002
+ throw new Error("At least one recipient is required");
1003
+ }
1004
+ if (!options.subject?.trim()) {
1005
+ throw new Error("Subject is required");
1006
+ }
1007
+ if (!options.body_html && !options.body_text) {
1008
+ throw new Error("At least one of body_html or body_text is required");
1009
+ }
1010
+ const payload = {
1011
+ to: Array.isArray(options.to) ? options.to : [options.to],
1012
+ subject: options.subject
1013
+ };
1014
+ if (options.body_html) payload.body_html = options.body_html;
1015
+ if (options.body_text) payload.body_text = options.body_text;
1016
+ if (options.cc) payload.cc = Array.isArray(options.cc) ? options.cc : [options.cc];
1017
+ if (options.bcc) payload.bcc = Array.isArray(options.bcc) ? options.bcc : [options.bcc];
1018
+ if (options.from_address) payload.from = options.from_address;
1019
+ if (options.from_name) payload.from_name = options.from_name;
1020
+ if (options.reply_to) payload.reply_to = options.reply_to;
1021
+ if (options.tags) payload.tags = options.tags;
1022
+ return request$1("/email/send", {
1023
+ method: "POST",
1024
+ headers: { "Content-Type": "application/json" },
1025
+ body: payload
1026
+ });
1027
+ }
1028
+ async function pbUpdateRecord(collectionId, recordId, data) {
1029
+ return pbUpdate(collectionId, recordId, data);
1030
+ }
787
1031
  const API_PREFIX = "/api";
788
1032
  const TERMINAL_STATUSES = ["succeeded", "failed", "cancelled"];
789
1033
  const ACTIVE_STATUSES = ["preparing", "queued", "running", "cancelling"];
@@ -1013,38 +1257,53 @@ async function listRunsByExternalId(params) {
1013
1257
  });
1014
1258
  }
1015
1259
  export {
1016
- listAutomationRunFiles as A,
1260
+ cancelAutomationRun as A,
1017
1261
  BridgeError as B,
1018
- listRuns as C,
1019
- listRunsByAgent as D,
1262
+ cancelRun as C,
1263
+ clearAutomationCache as D,
1020
1264
  EXPECTED_PARENT_ORIGIN as E,
1021
- listRunsByExternalId as F,
1022
- pollAutomationRun as G,
1023
- pollRun as H,
1265
+ createAutomationRun as F,
1266
+ createRun as G,
1267
+ ensureAutomationRun as H,
1268
+ ensureRun as I,
1269
+ getAutomationByExternalId as J,
1270
+ getAutomationRun as K,
1271
+ getAutomationRunFileDownloadUrl as L,
1272
+ getRun as M,
1273
+ getRunFiles as N,
1274
+ getRunFileUrl as O,
1275
+ isActiveStatus as P,
1276
+ isTerminalStatus as Q,
1277
+ listAutomationRunFiles as R,
1278
+ listRuns as S,
1279
+ listRunsByAgent as T,
1280
+ listRunsByExternalId as U,
1281
+ pollAutomationRun as V,
1282
+ pollRun as W,
1024
1283
  getShareableAppUrl as a,
1025
1284
  buildShareableAppUrl as b,
1026
1285
  configureBridge as c,
1027
1286
  parentApiStream as d,
1028
1287
  postReadyMessage as e,
1029
- automationStatuses as f,
1288
+ getDownloadUrl as f,
1030
1289
  getAppProjectExternalId as g,
1031
- cancelAutomationRun as h,
1290
+ getUploadUrl as h,
1032
1291
  isEmbedded as i,
1033
- cancelRun as j,
1034
- clearAutomationCache as k,
1035
- createAutomationRun as l,
1036
- createRun as m,
1037
- ensureAutomationRun as n,
1292
+ pbBulkDelete as j,
1293
+ pbBulkUpdate as k,
1294
+ pbCreate as l,
1295
+ pbDelete as m,
1296
+ pbGet as n,
1038
1297
  onInitMessage as o,
1039
1298
  parentApiRequest as p,
1040
- ensureRun as q,
1041
- getAutomationByExternalId as r,
1299
+ pbList as q,
1300
+ pbSearch as r,
1042
1301
  serializeBridgeRuntimeConfig as s,
1043
- getAutomationRun as t,
1044
- getAutomationRunFileDownloadUrl as u,
1045
- getRun as v,
1046
- getRunFiles as w,
1047
- getRunFileUrl as x,
1048
- isActiveStatus as y,
1049
- isTerminalStatus as z
1302
+ pbSql as t,
1303
+ pbUpdate as u,
1304
+ pbUpdateRecord as v,
1305
+ pbUpsert as w,
1306
+ sendEmail as x,
1307
+ uploadFile as y,
1308
+ automationStatuses as z
1050
1309
  };
@@ -1,3 +1,3 @@
1
1
  import { AgentChatMetadata, AgentChatProps } from './types';
2
- export declare function AgentChat<TMeta extends AgentChatMetadata = AgentChatMetadata, TToolInput = unknown, TActionData = unknown>({ agentId, sessionId, agent, name, description, transport, initialMessages, initialPage, historyLimit, maxBufferedMessages, maxQueuedMessages, disabled, className, labels: labelOverrides, features, renderers, onMessagesChange, onTurnComplete, onError, children, }: AgentChatProps<TMeta, TToolInput, TActionData>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function AgentChat<TMeta extends AgentChatMetadata = AgentChatMetadata, TToolInput = unknown, TActionData = unknown>({ agentId, sessionId, agent, name, description, transport, initialMessages, initialPage, historyLimit, maxBufferedMessages, maxQueuedMessages, disabled, watchdog, watchdogTimeoutMs, watchdogPollMs, discoveryPoll, className, labels: labelOverrides, features, renderers, onMessagesChange, onTurnComplete, onError, children, }: AgentChatProps<TMeta, TToolInput, TActionData>): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=AgentChat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentChat.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/AgentChat.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAMV,iBAAiB,EAEjB,cAAc,EAIf,MAAM,SAAS,CAAC;AAajB,wBAAgB,SAAS,CACvB,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EACnD,UAAU,GAAG,OAAO,EACpB,WAAW,GAAG,OAAO,EACrB,EACA,OAAO,EACP,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,2CAyNhD"}
1
+ {"version":3,"file":"AgentChat.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/AgentChat.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAMV,iBAAiB,EAEjB,cAAc,EAGf,MAAM,SAAS,CAAC;AAajB,wBAAgB,SAAS,CACvB,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EACnD,UAAU,GAAG,OAAO,EACpB,WAAW,GAAG,OAAO,EACrB,EACA,OAAO,EACP,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,SAAS,EACT,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,2CAqOhD"}
@@ -0,0 +1,8 @@
1
+ import { AgentChatFile } from './types';
2
+ interface ArtifactCardProps {
3
+ file: AgentChatFile;
4
+ className?: string;
5
+ }
6
+ export declare function ArtifactCard({ file, className }: ArtifactCardProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=ArtifactCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArtifactCard.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/ArtifactCard.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,UAAU,iBAAiB;IACzB,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsCD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAgBlE"}
@@ -1,5 +1,9 @@
1
1
  export { AgentChat } from './AgentChat';
2
+ export { ArtifactCard } from './ArtifactCard';
2
3
  export type { LumeraAgentChatTransportOptions } from './lumera-agent-transport';
3
4
  export { createLumeraAgentChatTransport } from './lumera-agent-transport';
5
+ export { defaultToolRenderers, findRenderer, getCollectionMap, humanizeCollectionName, isExploratoryToolCallError, warmCollectionCache, } from './tool-renderers';
6
+ export { ToolCallCard, type ToolCallCardProps, ToolRenderersProvider, } from './tool-renderers/ToolCallCard';
7
+ export type { CollectionMap as AgentChatCollectionMap, ToolCallLike as AgentChatToolCallLike, ToolRenderer as AgentChatToolRenderer, } from './tool-renderers/types';
4
8
  export type { AgentChatAbortRequest, AgentChatAction, AgentChatActionBlock, AgentChatActiveStatus, AgentChatAgentProfile, AgentChatAgentRequest, AgentChatBlockRendererProps, AgentChatComposerActions, AgentChatComposerRendererProps, AgentChatComposerState, AgentChatContentBlock, AgentChatCustomBlock, AgentChatFeatureFlags, AgentChatFile, AgentChatFileBlock, AgentChatHistoryPage, AgentChatHistoryRequest, AgentChatHistoryResult, AgentChatID, AgentChatInfoBlock, AgentChatLabels, AgentChatLoadEarlierRequest, AgentChatMessage, AgentChatMessageRendererProps, AgentChatMessageRole, AgentChatMetadata, AgentChatOperationStatus, AgentChatPendingFile, AgentChatPhase, AgentChatProps, AgentChatRenameSessionRequest, AgentChatRenderers, AgentChatResizableWidthOptions, AgentChatSession, AgentChatSessionListRequest, AgentChatSessionListResult, AgentChatStreamEvent, AgentChatStreamHandlers, AgentChatSubmitInput, AgentChatSubmitResult, AgentChatSubscription, AgentChatTerminalStatus, AgentChatTextBlock, AgentChatThinkingBlock, AgentChatTokenUsage, AgentChatToolCall, AgentChatToolCallBlock, AgentChatTransport, AgentChatTurn, AgentChatTurnStatus, } from './types';
5
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,6BAA6B,EAC7B,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,aAAa,IAAI,sBAAsB,EACvC,YAAY,IAAI,qBAAqB,EACrC,YAAY,IAAI,qBAAqB,GACtC,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,6BAA6B,EAC7B,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const artifactRenderer: ToolRenderer;
3
+ //# sourceMappingURL=ArtifactRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArtifactRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/ArtifactRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,gBAAgB,EAAE,YAU9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const bashRenderer: ToolRenderer;
3
+ //# sourceMappingURL=BashRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BashRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/BashRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAuB5C,eAAO,MAAM,YAAY,EAAE,YAqB1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const defaultRenderer: ToolRenderer;
3
+ //# sourceMappingURL=DefaultRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/DefaultRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE,YAQ7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const editRenderer: ToolRenderer;
3
+ //# sourceMappingURL=EditRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/EditRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO5C,eAAO,MAAM,YAAY,EAAE,YAgB1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const findToolRenderer: ToolRenderer;
3
+ //# sourceMappingURL=FindRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FindRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/FindRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,eAAO,MAAM,gBAAgB,EAAE,YAkB9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const grepRenderer: ToolRenderer;
3
+ //# sourceMappingURL=GrepRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrepRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/GrepRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,eAAO,MAAM,YAAY,EAAE,YAmB1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const integrationProxyRenderer: ToolRenderer;
3
+ //# sourceMappingURL=IntegrationProxyRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationProxyRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/IntegrationProxyRenderer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,SAAS,CAAC;AAmsB1D,eAAO,MAAM,wBAAwB,EAAE,YAuFtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const lsRenderer: ToolRenderer;
3
+ //# sourceMappingURL=LsRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/LsRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,eAAO,MAAM,UAAU,EAAE,YAcxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const lumeraApiRenderer: ToolRenderer;
3
+ //# sourceMappingURL=LumeraApiRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LumeraApiRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/LumeraApiRenderer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,SAAS,CAAC;AAyI1D,eAAO,MAAM,iBAAiB,EAAE,YAuF/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const readRenderer: ToolRenderer;
3
+ //# sourceMappingURL=ReadRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReadRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/ReadRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C,eAAO,MAAM,YAAY,EAAE,YAU1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const sqlQueryRenderer: ToolRenderer;
3
+ //# sourceMappingURL=SqlQueryRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqlQueryRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/SqlQueryRenderer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,SAAS,CAAC;AAmD1D,eAAO,MAAM,gBAAgB,EAAE,YAwE9B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { AgentChatToolCall } from '../types';
3
+ import { ToolRenderer } from './types';
4
+ /** Provides consumer-supplied tool renderers to nested ToolCallCards. */
5
+ export declare function ToolRenderersProvider({ renderers, children }: {
6
+ renderers?: ToolRenderer[];
7
+ children: ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export interface ToolCallCardProps extends HTMLAttributes<HTMLDivElement> {
10
+ toolCall: AgentChatToolCall;
11
+ /** Explicit overrides; defaults to the nearest ToolRenderersProvider value. */
12
+ renderers?: ToolRenderer[];
13
+ }
14
+ export declare function ToolCallCard({ toolCall, renderers, className, ...props }: ToolCallCardProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=ToolCallCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolCallCard.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/ToolCallCard.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AAE1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO5C,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAEjH;AAED,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,+EAA+E;IAC/E,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAgF3F"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const webSearchRenderer: ToolRenderer;
3
+ //# sourceMappingURL=WebSearchRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebSearchRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/WebSearchRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,iBAAiB,EAAE,YAU/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const writeRenderer: ToolRenderer;
3
+ //# sourceMappingURL=WriteRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/WriteRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO5C,eAAO,MAAM,aAAa,EAAE,YAoB3B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { ToolCallLike, ToolRenderer } from './types';
2
+ export type { CollectionMap, ToolCallLike, ToolRenderer } from './types';
3
+ export { getCollectionMap, humanizeCollectionName, isExploratoryToolCallError, warmCollectionCache, } from './utils';
4
+ /** Built-in renderers, in priority order (first match wins). */
5
+ export declare const defaultToolRenderers: ToolRenderer[];
6
+ /**
7
+ * Find the first renderer that can handle this tool call.
8
+ *
9
+ * @param overrides Optional consumer-supplied renderers, checked before the
10
+ * built-ins. The first to `match` wins.
11
+ */
12
+ export declare function findRenderer(tc: ToolCallLike, overrides?: ToolRenderer[]): ToolRenderer;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/index.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI1D,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,YAAY,EAkB9C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,YAAY,EAAE,GAAG,YAAY,CAMvF"}
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { AgentChatToolCall } from '../types';
3
+ /** Map of collection ID/name → human-readable name. */
4
+ export type CollectionMap = Record<string, string>;
5
+ /** Terse alias for the tool call shape renderers operate on. */
6
+ export type ToolCallLike = AgentChatToolCall;
7
+ /**
8
+ * A tool renderer knows how to present a specific kind of tool call
9
+ * in a human-friendly way inside the agent chat.
10
+ */
11
+ export interface ToolRenderer {
12
+ /** Does this renderer handle the given tool call? First match wins. */
13
+ match(tc: ToolCallLike): boolean;
14
+ /** One-line summary string (emoji + text) for the collapsed state. */
15
+ summary(tc: ToolCallLike, collections: CollectionMap): string;
16
+ /**
17
+ * Optional rich expanded view — replaces raw output when the user clicks
18
+ * to expand. Return null to fall back to the raw output text.
19
+ */
20
+ expandedView?(tc: ToolCallLike, collections: CollectionMap): ReactNode;
21
+ /**
22
+ * Optional inline preview shown below the summary row without expanding.
23
+ * Use for high-value previews (e.g., 3-row mini-table for search results).
24
+ */
25
+ inlinePreview?(tc: ToolCallLike, collections: CollectionMap): ReactNode;
26
+ }
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,KAAK,CAAC,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC;IAEjC,sEAAsE;IACtE,OAAO,CAAC,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,GAAG,MAAM,CAAC;IAE9D;;;OAGG;IACH,YAAY,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IAEvE;;;OAGG;IACH,aAAa,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;CACzE"}
@@ -0,0 +1,33 @@
1
+ import { AgentChatOperationStatus } from '../types';
2
+ import { CollectionMap, ToolCallLike } from './types';
3
+ /** Warm the cache (call once at chat mount). */
4
+ export declare function warmCollectionCache(): void;
5
+ /** Get the current cache synchronously. Returns empty object if not loaded. */
6
+ export declare function getCollectionMap(): CollectionMap;
7
+ /** Strip common prefixes and humanize a collection name. */
8
+ export declare function humanizeCollectionName(key: string, collections: CollectionMap): string;
9
+ /**
10
+ * Read a numeric field from a tool call's backend metadata bag.
11
+ *
12
+ * The in-product chat exposes accurate result counts on `tc.meta` (e.g.
13
+ * `meta.count`, `meta.totalItems`); the devkit transport surfaces the same raw
14
+ * payload on `tc.metadata`. These survive output truncation, so renderers
15
+ * prefer them over parsing the (possibly truncated) output text.
16
+ */
17
+ export declare function metaNumber(tc: ToolCallLike, key: string): number | undefined;
18
+ /** Exploratory errors are real tool failures, but should render neutrally. */
19
+ export declare function isExploratoryToolCallError(tc: {
20
+ status: AgentChatOperationStatus;
21
+ exploratory?: boolean;
22
+ }): boolean;
23
+ /**
24
+ * Extract text content from tool output.
25
+ * Handles plain strings, JSON strings, and wrapped `{ content: [{ text }] }`.
26
+ */
27
+ export declare function extractOutputText(output: string | undefined): string;
28
+ /**
29
+ * Parse output JSON, unwrapping the `{ content: [{ text }] }` wrapper if needed.
30
+ * Returns parsed object or null.
31
+ */
32
+ export declare function parseOutputJson(output: string | undefined): Record<string, unknown> | null;
33
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/agent-chat/tool-renderers/utils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA2B3D,gDAAgD;AAChD,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAED,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,GAAG,MAAM,CAOtF;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG5E;AAED,8EAA8E;AAC9E,wBAAgB,0BAA0B,CAAC,EAAE,EAAE;IAAE,MAAM,EAAE,wBAAwB,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAEnH;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAcpE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAgB1F"}