@axiom-lattice/react-sdk 4.2.0 → 4.2.1

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 (57) hide show
  1. package/dist/{AgentDetailSideApp-ETXLLXP2.mjs → AgentDetailSideApp-KHGPPCTW.mjs} +6 -6
  2. package/dist/{AgentGovernanceWorkbench-D47KUMAA.mjs → AgentGovernanceWorkbench-S2P5SJ4W.mjs} +7 -7
  3. package/dist/{MessageGraph-PVOC7XW4.mjs → MessageGraph-2M35QCOU.mjs} +2 -2
  4. package/dist/{ReactChart-BZTCD4P7.mjs → ReactChart-2TWY4MWP.mjs} +2 -2
  5. package/dist/{TasksSideApp-NNFCW65B.mjs → TasksSideApp-ISKFSZLV.mjs} +3 -3
  6. package/dist/{TeamWorkspace-GS7C7E4X.mjs → TeamWorkspace-72CCNRRZ.mjs} +2 -2
  7. package/dist/{TopologyRuntimeView-VWGYRX74.mjs → TopologyRuntimeView-J2QQF3FO.mjs} +3 -3
  8. package/dist/{WorkflowAutomationView-T4YKEPSP.mjs → WorkflowAutomationView-7NCBXAPY.mjs} +5 -5
  9. package/dist/{chunk-7DCDRNN5.mjs → chunk-6Z4RFBLQ.mjs} +2 -2
  10. package/dist/{chunk-QPF4RBTJ.mjs → chunk-B6UZYI3Q.mjs} +7 -6
  11. package/dist/chunk-B6UZYI3Q.mjs.map +1 -0
  12. package/dist/{chunk-THWLCTFU.mjs → chunk-BGJ4TPAL.mjs} +2 -2
  13. package/dist/{chunk-NLN5EB7R.mjs → chunk-GAR3NRH5.mjs} +51 -17
  14. package/dist/chunk-GAR3NRH5.mjs.map +1 -0
  15. package/dist/{chunk-NHWTNX7F.mjs → chunk-MC5D34IK.mjs} +4 -4
  16. package/dist/{chunk-AYNHFB6M.mjs → chunk-PB2L6UII.mjs} +4 -4
  17. package/dist/{chunk-NQK7AVBH.mjs → chunk-R65ETB3L.mjs} +2 -2
  18. package/dist/{embed-page-AgentDetailSideApp-7FH2JSZI.js → embed-page-AgentDetailSideApp-ONXG4B3D.js} +1 -1
  19. package/dist/{embed-page-AgentGovernanceWorkbench-Y5F3ZPYC.js → embed-page-AgentGovernanceWorkbench-LCIQ5UF3.js} +1 -1
  20. package/dist/{embed-page-MessageGraph-ONODQPG4.js → embed-page-MessageGraph-P7DBTZCL.js} +1 -1
  21. package/dist/{embed-page-ReactChart-GZQSKCUG.js → embed-page-ReactChart-XS7D26VP.js} +1 -1
  22. package/dist/{embed-page-SkillFlow-TPESM4DI.js → embed-page-SkillFlow-HPH37PZH.js} +1 -1
  23. package/dist/{embed-page-TasksSideApp-HYKCJ356.js → embed-page-TasksSideApp-MQTUCJO4.js} +1 -1
  24. package/dist/{embed-page-TeamWorkspace-IOHS4RJV.js → embed-page-TeamWorkspace-7T2HRXLG.js} +1 -1
  25. package/dist/{embed-page-TopologyRuntimeView-QLMZ4OE7.js → embed-page-TopologyRuntimeView-PU2D7VZ7.js} +1 -1
  26. package/dist/{embed-page-WorkflowAutomationView-FJJSGY7Z.js → embed-page-WorkflowAutomationView-ST76M33F.js} +1 -1
  27. package/dist/{embed-page-chunk-ZTRCHYWV.js → embed-page-chunk-4ZSGPIBZ.js} +1 -1
  28. package/dist/{embed-page-chunk-MCUFFMAW.js → embed-page-chunk-BRETUPSG.js} +86 -86
  29. package/dist/{embed-page-chunk-SMQZEZYG.js → embed-page-chunk-LE6OFJ7R.js} +1 -1
  30. package/dist/{embed-page-chunk-KFUAWYJ7.js → embed-page-chunk-T25T2YE6.js} +1 -1
  31. package/dist/{embed-page-chunk-FXTSVMPN.js → embed-page-chunk-U6SL5TG6.js} +37 -37
  32. package/dist/{embed-page-chunk-EMPMOO53.js → embed-page-chunk-VRV57DFE.js} +1 -1
  33. package/dist/embed-page-chunk-YPV4BAWI.js +245 -0
  34. package/dist/{embed-page-chunk-D3NRIME3.js → embed-page-chunk-Z4S4OYA4.js} +1 -1
  35. package/dist/{embed-page-chunk-6LL6YULZ.js → embed-page-chunk-ZKJ7Z7P3.js} +1 -1
  36. package/dist/{embed-page-chunk-VVYB3C4O.js → embed-page-chunk-ZXFZANZM.js} +1 -1
  37. package/dist/embed-page.js +1 -1
  38. package/dist/index.js +48 -8
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +7 -7
  41. package/package.json +1 -1
  42. package/dist/chunk-NLN5EB7R.mjs.map +0 -1
  43. package/dist/chunk-QPF4RBTJ.mjs.map +0 -1
  44. package/dist/embed-page-chunk-L7RMIQ7C.js +0 -245
  45. /package/dist/{AgentDetailSideApp-ETXLLXP2.mjs.map → AgentDetailSideApp-KHGPPCTW.mjs.map} +0 -0
  46. /package/dist/{AgentGovernanceWorkbench-D47KUMAA.mjs.map → AgentGovernanceWorkbench-S2P5SJ4W.mjs.map} +0 -0
  47. /package/dist/{MessageGraph-PVOC7XW4.mjs.map → MessageGraph-2M35QCOU.mjs.map} +0 -0
  48. /package/dist/{ReactChart-BZTCD4P7.mjs.map → ReactChart-2TWY4MWP.mjs.map} +0 -0
  49. /package/dist/{TasksSideApp-NNFCW65B.mjs.map → TasksSideApp-ISKFSZLV.mjs.map} +0 -0
  50. /package/dist/{TeamWorkspace-GS7C7E4X.mjs.map → TeamWorkspace-72CCNRRZ.mjs.map} +0 -0
  51. /package/dist/{TopologyRuntimeView-VWGYRX74.mjs.map → TopologyRuntimeView-J2QQF3FO.mjs.map} +0 -0
  52. /package/dist/{WorkflowAutomationView-T4YKEPSP.mjs.map → WorkflowAutomationView-7NCBXAPY.mjs.map} +0 -0
  53. /package/dist/{chunk-7DCDRNN5.mjs.map → chunk-6Z4RFBLQ.mjs.map} +0 -0
  54. /package/dist/{chunk-THWLCTFU.mjs.map → chunk-BGJ4TPAL.mjs.map} +0 -0
  55. /package/dist/{chunk-NHWTNX7F.mjs.map → chunk-MC5D34IK.mjs.map} +0 -0
  56. /package/dist/{chunk-AYNHFB6M.mjs.map → chunk-PB2L6UII.mjs.map} +0 -0
  57. /package/dist/{chunk-NQK7AVBH.mjs.map → chunk-R65ETB3L.mjs.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-7FWCKQNB.mjs";
6
6
  import {
7
7
  MDResponse
8
- } from "./chunk-QPF4RBTJ.mjs";
8
+ } from "./chunk-B6UZYI3Q.mjs";
9
9
  import {
10
10
  Handle,
11
11
  MarkerType,
@@ -1089,4 +1089,4 @@ export {
1089
1089
  WorkflowCanvas_default,
1090
1090
  expandWorkflow
1091
1091
  };
1092
- //# sourceMappingURL=chunk-THWLCTFU.mjs.map
1092
+ //# sourceMappingURL=chunk-BGJ4TPAL.mjs.map
@@ -2,11 +2,11 @@ import {
2
2
  CopilotPanel,
3
3
  ProjectScopeProvider,
4
4
  TrainingContextCard
5
- } from "./chunk-NQK7AVBH.mjs";
5
+ } from "./chunk-R65ETB3L.mjs";
6
6
  import {
7
7
  WorkflowCanvas_default,
8
8
  expandWorkflow
9
- } from "./chunk-THWLCTFU.mjs";
9
+ } from "./chunk-BGJ4TPAL.mjs";
10
10
  import {
11
11
  AgentWebAppRuntimeClient,
12
12
  AgentWebAppRuntimeClientError
@@ -18,7 +18,7 @@ import {
18
18
  buildTaskGraph,
19
19
  isHiddenStatus,
20
20
  useOpenTaskChat
21
- } from "./chunk-7DCDRNN5.mjs";
21
+ } from "./chunk-6Z4RFBLQ.mjs";
22
22
  import {
23
23
  WorkflowGraphBase,
24
24
  applyDagreLayout
@@ -67,7 +67,7 @@ import {
67
67
  useTenantBranding,
68
68
  useWorkspaceContext,
69
69
  useWorkspaceContextOptional
70
- } from "./chunk-QPF4RBTJ.mjs";
70
+ } from "./chunk-B6UZYI3Q.mjs";
71
71
  import {
72
72
  CreateSkillModal
73
73
  } from "./chunk-MFAPAXZ2.mjs";
@@ -6085,7 +6085,7 @@ var OrgsList = ({
6085
6085
  const [error, setError] = useState21(null);
6086
6086
  useEffect17(() => {
6087
6087
  let cancelled = false;
6088
- const authApiKey = isAuthenticated ? sessionStorage.getItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6088
+ const authApiKey = isAuthenticated ? readAuthItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6089
6089
  const fetchOrgs = async () => {
6090
6090
  if (!workspaceId || !authApiKey) {
6091
6091
  setOrgs([]);
@@ -6494,7 +6494,7 @@ var OrgsPage = ({ workspaceId, onNavigateToRoom }) => {
6494
6494
  setStartingFor(org.id);
6495
6495
  setStartError(null);
6496
6496
  try {
6497
- const authApiKey = isAuthenticated ? sessionStorage.getItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6497
+ const authApiKey = isAuthenticated ? readAuthItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6498
6498
  const body = org.type === "bot" ? { type: "bot", assistantId: org.id } : { type: "human", targetUserId: org.id };
6499
6499
  const response = await fetch(
6500
6500
  `${config.baseURL}/api/workspaces/${workspaceId}/direct`,
@@ -14609,7 +14609,7 @@ import { Spin as Spin13 } from "antd";
14609
14609
  import { ListChecks as ListChecks2 } from "lucide-react";
14610
14610
  import { jsx as jsx63 } from "react/jsx-runtime";
14611
14611
  var TasksSideApp = lazy2(
14612
- () => import("./TasksSideApp-NNFCW65B.mjs").then((m) => ({ default: m.TasksSideApp }))
14612
+ () => import("./TasksSideApp-ISKFSZLV.mjs").then((m) => ({ default: m.TasksSideApp }))
14613
14613
  );
14614
14614
  var TasksButton = () => {
14615
14615
  const { openSideApp, sideAppVisible, sideAppSelectedCard } = useChatUIContext();
@@ -16436,7 +16436,7 @@ var PersonalAssistantPage = () => {
16436
16436
  }
16437
16437
  }, [name, personalityText, post]);
16438
16438
  const resolveThread = useCallback30(async (assistantId2) => {
16439
- const apiKey = sessionStorage.getItem("lattice_token") || config.apiKey || "";
16439
+ const apiKey = readAuthItem("lattice_token") || config.apiKey || "";
16440
16440
  const paClient = new Client({
16441
16441
  baseURL: config.baseURL,
16442
16442
  apiKey,
@@ -18330,19 +18330,19 @@ var DEFAULT_WORKSPACE_MENU_ITEMS = [
18330
18330
  ];
18331
18331
  var PanelSuspenseFallback = () => /* @__PURE__ */ jsx78("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", minHeight: 120 }, children: /* @__PURE__ */ jsx78(Spin16, {}) });
18332
18332
  var AgentGovernanceWorkbench = lazy3(
18333
- () => import("./AgentGovernanceWorkbench-D47KUMAA.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
18333
+ () => import("./AgentGovernanceWorkbench-S2P5SJ4W.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
18334
18334
  );
18335
18335
  var TopologyRuntimeView = lazy3(
18336
- () => import("./TopologyRuntimeView-VWGYRX74.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
18336
+ () => import("./TopologyRuntimeView-J2QQF3FO.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
18337
18337
  );
18338
18338
  var WorkflowAutomationView = lazy3(
18339
- () => import("./WorkflowAutomationView-T4YKEPSP.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
18339
+ () => import("./WorkflowAutomationView-7NCBXAPY.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
18340
18340
  );
18341
18341
  var TasksSideApp2 = lazy3(
18342
- () => import("./TasksSideApp-NNFCW65B.mjs").then((m) => ({ default: m.TasksSideApp }))
18342
+ () => import("./TasksSideApp-ISKFSZLV.mjs").then((m) => ({ default: m.TasksSideApp }))
18343
18343
  );
18344
18344
  var AgentDetailSideApp = lazy3(
18345
- () => import("./AgentDetailSideApp-ETXLLXP2.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
18345
+ () => import("./AgentDetailSideApp-KHGPPCTW.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
18346
18346
  );
18347
18347
  var createWrapper = (Component2) => {
18348
18348
  return () => /* @__PURE__ */ jsx78(Suspense3, { fallback: /* @__PURE__ */ jsx78(PanelSuspenseFallback, {}), children: /* @__PURE__ */ jsx78(Component2, { ...{} }) });
@@ -20698,6 +20698,26 @@ function getGraphDefinition2(def) {
20698
20698
  return typeof def === "object" && def !== null ? def : {};
20699
20699
  }
20700
20700
  var asStrings = (v) => Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
20701
+ var ALL_SKILLS_NODE_ID = "skill:__all__";
20702
+ function collectConfiguredSkills(g) {
20703
+ const ids = [];
20704
+ const seen = /* @__PURE__ */ new Set();
20705
+ const add = (s) => {
20706
+ if (seen.has(s)) return;
20707
+ seen.add(s);
20708
+ ids.push(s);
20709
+ };
20710
+ for (const s of asStrings(g.skills)) add(s);
20711
+ let readAll = false;
20712
+ const middleware = Array.isArray(g.middleware) ? g.middleware : [];
20713
+ for (const m of middleware) {
20714
+ if (m.enabled === false || m.type !== "skill") continue;
20715
+ const cfg = typeof m.config === "object" && m.config !== null ? m.config : {};
20716
+ if (cfg.readAll === true) readAll = true;
20717
+ for (const s of asStrings(cfg.skills)) add(s);
20718
+ }
20719
+ return { ids, readAll };
20720
+ }
20701
20721
  function buildAgentConfigGraphData(def, options) {
20702
20722
  const g = getGraphDefinition2(def);
20703
20723
  const agentKey = typeof g.key === "string" ? g.key : "agent";
@@ -20723,7 +20743,11 @@ function buildAgentConfigGraphData(def, options) {
20723
20743
  return make("capability", `cap:${type}`, m.name || type, m.description || void 0, m);
20724
20744
  });
20725
20745
  const subagents = asStrings(g.subAgents).map((s) => make("subagent", `sub:${s}`, s));
20726
- const skills = asStrings(g.skills).map((s) => make("skill", `skill:${s}`, s));
20746
+ const { ids: configuredSkillIds, readAll } = collectConfiguredSkills(g);
20747
+ const skills = [
20748
+ ...readAll ? [make("skill", ALL_SKILLS_NODE_ID, "All skills", "Agent can load any available skill")] : [],
20749
+ ...configuredSkillIds.map((s) => make("skill", `skill:${s}`, s))
20750
+ ];
20727
20751
  const allGroups = [
20728
20752
  { id: "group:tools", type: "tool", label: "Tools", items: tools },
20729
20753
  { id: "group:capabilities", type: "capability", label: "Capabilities", items: capabilities },
@@ -27277,7 +27301,7 @@ import { Fragment as Fragment39, jsx as jsx114, jsxs as jsxs95 } from "react/jsx
27277
27301
  var { Text: Text33 } = Typography33;
27278
27302
  var errorMessage = (error) => error instanceof Error ? error.message : "Request failed";
27279
27303
  function consolePreviewFetch(input, init) {
27280
- const token = typeof sessionStorage === "undefined" ? null : sessionStorage.getItem("lattice_token");
27304
+ const token = readAuthItem("lattice_token");
27281
27305
  const headers = new Headers(init?.headers);
27282
27306
  if (token) headers.set("Authorization", `Bearer ${token}`);
27283
27307
  headers.set("X-Axiom-Web-App-Preview", "true");
@@ -28412,7 +28436,17 @@ var AgentDetailView = ({
28412
28436
  } else if (node.type === "subagent" && node.id.startsWith("sub:")) {
28413
28437
  next.subAgents = (g.subAgents ?? []).filter((s) => s !== node.id.slice(4));
28414
28438
  } else if (node.type === "skill" && node.id.startsWith("skill:")) {
28415
- next.skills = (g.skills ?? []).filter((s) => s !== node.id.slice(6));
28439
+ const skillId = node.id.slice(6);
28440
+ next.skills = (g.skills ?? []).filter((s) => s !== skillId);
28441
+ if (Array.isArray(g.middleware)) {
28442
+ next.middleware = g.middleware.map((m) => {
28443
+ if (m.type !== "skill") return m;
28444
+ const cfg = typeof m.config === "object" && m.config !== null ? m.config : {};
28445
+ if (node.id === ALL_SKILLS_NODE_ID) return { ...m, config: { ...cfg, readAll: false } };
28446
+ if (!Array.isArray(cfg.skills) || !cfg.skills.includes(skillId)) return m;
28447
+ return { ...m, config: { ...cfg, skills: cfg.skills.filter((s) => s !== skillId) } };
28448
+ });
28449
+ }
28416
28450
  } else if (node.type === "capability" && node.id.startsWith("cap:")) {
28417
28451
  const type = node.id.slice(4);
28418
28452
  next.middleware = (g.middleware ?? []).filter((m) => m.type !== type);
@@ -28763,4 +28797,4 @@ export {
28763
28797
  WorkspaceResourceUIContext,
28764
28798
  LatticeChat
28765
28799
  };
28766
- //# sourceMappingURL=chunk-NLN5EB7R.mjs.map
28800
+ //# sourceMappingURL=chunk-GAR3NRH5.mjs.map