@axiom-lattice/react-sdk 4.2.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/{AgentDetailSideApp-ETXLLXP2.mjs → AgentDetailSideApp-XVFNLPKO.mjs} +6 -6
  2. package/dist/{AgentGovernanceWorkbench-D47KUMAA.mjs → AgentGovernanceWorkbench-GP4IYPVR.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-AYNHFB6M.mjs → chunk-IY3DOVI3.mjs} +4 -4
  14. package/dist/{chunk-NHWTNX7F.mjs → chunk-MC5D34IK.mjs} +4 -4
  15. package/dist/{chunk-NLN5EB7R.mjs → chunk-OZQ4CZWU.mjs} +73 -23
  16. package/dist/chunk-OZQ4CZWU.mjs.map +1 -0
  17. package/dist/{chunk-NQK7AVBH.mjs → chunk-R65ETB3L.mjs} +2 -2
  18. package/dist/{embed-page-AgentDetailSideApp-7FH2JSZI.js → embed-page-AgentDetailSideApp-7PQ2JKG6.js} +1 -1
  19. package/dist/{embed-page-AgentGovernanceWorkbench-Y5F3ZPYC.js → embed-page-AgentGovernanceWorkbench-ZNW72EEJ.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-FXTSVMPN.js → embed-page-chunk-I42T7B7V.js} +44 -39
  30. package/dist/{embed-page-chunk-SMQZEZYG.js → embed-page-chunk-LE6OFJ7R.js} +1 -1
  31. package/dist/embed-page-chunk-RLP3BC7G.js +245 -0
  32. package/dist/{embed-page-chunk-KFUAWYJ7.js → embed-page-chunk-T25T2YE6.js} +1 -1
  33. package/dist/{embed-page-chunk-EMPMOO53.js → embed-page-chunk-VRV57DFE.js} +1 -1
  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.d.mts +5 -0
  39. package/dist/index.d.ts +5 -0
  40. package/dist/index.js +70 -14
  41. package/dist/index.js.map +1 -1
  42. package/dist/index.mjs +7 -7
  43. package/package.json +3 -3
  44. package/dist/chunk-NLN5EB7R.mjs.map +0 -1
  45. package/dist/chunk-QPF4RBTJ.mjs.map +0 -1
  46. package/dist/embed-page-chunk-L7RMIQ7C.js +0 -245
  47. /package/dist/{AgentDetailSideApp-ETXLLXP2.mjs.map → AgentDetailSideApp-XVFNLPKO.mjs.map} +0 -0
  48. /package/dist/{AgentGovernanceWorkbench-D47KUMAA.mjs.map → AgentGovernanceWorkbench-GP4IYPVR.mjs.map} +0 -0
  49. /package/dist/{MessageGraph-PVOC7XW4.mjs.map → MessageGraph-2M35QCOU.mjs.map} +0 -0
  50. /package/dist/{ReactChart-BZTCD4P7.mjs.map → ReactChart-2TWY4MWP.mjs.map} +0 -0
  51. /package/dist/{TasksSideApp-NNFCW65B.mjs.map → TasksSideApp-ISKFSZLV.mjs.map} +0 -0
  52. /package/dist/{TeamWorkspace-GS7C7E4X.mjs.map → TeamWorkspace-72CCNRRZ.mjs.map} +0 -0
  53. /package/dist/{TopologyRuntimeView-VWGYRX74.mjs.map → TopologyRuntimeView-J2QQF3FO.mjs.map} +0 -0
  54. /package/dist/{WorkflowAutomationView-T4YKEPSP.mjs.map → WorkflowAutomationView-7NCBXAPY.mjs.map} +0 -0
  55. /package/dist/{chunk-7DCDRNN5.mjs.map → chunk-6Z4RFBLQ.mjs.map} +0 -0
  56. /package/dist/{chunk-THWLCTFU.mjs.map → chunk-BGJ4TPAL.mjs.map} +0 -0
  57. /package/dist/{chunk-AYNHFB6M.mjs.map → chunk-IY3DOVI3.mjs.map} +0 -0
  58. /package/dist/{chunk-NHWTNX7F.mjs.map → chunk-MC5D34IK.mjs.map} +0 -0
  59. /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
@@ -11,17 +11,17 @@ import {
11
11
  shortHash,
12
12
  startLearningRound,
13
13
  statusHex
14
- } from "./chunk-NLN5EB7R.mjs";
14
+ } from "./chunk-OZQ4CZWU.mjs";
15
15
  import {
16
16
  ProjectScopeProvider_default,
17
17
  TrainingContextCard
18
- } from "./chunk-NQK7AVBH.mjs";
18
+ } from "./chunk-R65ETB3L.mjs";
19
19
  import {
20
20
  EntityListView,
21
21
  FilterSelect,
22
22
  useSideAppOpener,
23
23
  useWorkspaceContext
24
- } from "./chunk-QPF4RBTJ.mjs";
24
+ } from "./chunk-B6UZYI3Q.mjs";
25
25
  import {
26
26
  Background,
27
27
  Controls,
@@ -1833,4 +1833,4 @@ export {
1833
1833
  CreateAssistantModal_default,
1834
1834
  AgentGovernanceWorkbench
1835
1835
  };
1836
- //# sourceMappingURL=chunk-AYNHFB6M.mjs.map
1836
+ //# sourceMappingURL=chunk-IY3DOVI3.mjs.map
@@ -2,15 +2,15 @@ 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
  MDResponse,
12
12
  useWorkspaceContext
13
- } from "./chunk-QPF4RBTJ.mjs";
13
+ } from "./chunk-B6UZYI3Q.mjs";
14
14
  import {
15
15
  ReactFlowProvider
16
16
  } from "./chunk-XC6TB6PI.mjs";
@@ -1271,4 +1271,4 @@ export {
1271
1271
  WorkflowAutomationView,
1272
1272
  WorkflowAutomationView_default
1273
1273
  };
1274
- //# sourceMappingURL=chunk-NHWTNX7F.mjs.map
1274
+ //# sourceMappingURL=chunk-MC5D34IK.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";
@@ -3477,9 +3477,14 @@ var MAX_UPLOAD_MB = 50;
3477
3477
  var useStyles6 = createStyles7(({ token, css }) => ({
3478
3478
  root: css`
3479
3479
  flex-shrink: 0;
3480
- border-top: 1px solid ${token.colorBorderSecondary};
3481
3480
  background: ${token.colorBgContainer};
3482
3481
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
3482
+
3483
+ @media (max-width: 768px) {
3484
+ /* Nearly full-bleed on phones: the Sender already brings its own inner
3485
+ padding, so extra host padding just wastes scarce width. */
3486
+ padding: 4px 6px max(6px, env(safe-area-inset-bottom));
3487
+ }
3483
3488
  `,
3484
3489
  reply: css`
3485
3490
  display: flex;
@@ -3734,6 +3739,7 @@ var ProjectRoomComposer = ({
3734
3739
  onKeyDown: handleSuggestionKeyDown,
3735
3740
  placeholder: "Message the room",
3736
3741
  autoSize: isMobile ? { minRows: 1, maxRows: 1 } : { minRows: 2, maxRows: 8 },
3742
+ styles: isMobile ? { content: { paddingInlineStart: 8, paddingInlineEnd: 8 } } : void 0,
3737
3743
  suffix: isMobile ? void 0 : false,
3738
3744
  prefix: isMobile ? attachButton : void 0,
3739
3745
  footer: isMobile ? void 0 : (actionNode) => /* @__PURE__ */ jsxs9(Flex, { justify: "space-between", align: "center", style: { padding: "8px 0 0" }, children: [
@@ -5916,7 +5922,7 @@ var useStyles13 = createStyles15(({ token, css }) => ({
5916
5922
  overflow: hidden;
5917
5923
  `
5918
5924
  }));
5919
- var RoomsPage = ({ workspaceId, openRoom, onRoomOpened }) => {
5925
+ var RoomsPage = ({ workspaceId, openRoom, onRoomOpened, onChatOpenChange }) => {
5920
5926
  const { styles } = useStyles13();
5921
5927
  const isMobile = useMediaQuery("(max-width: 768px)");
5922
5928
  const [selectedRoom, setSelectedRoom] = useState20(null);
@@ -5930,6 +5936,10 @@ var RoomsPage = ({ workspaceId, openRoom, onRoomOpened }) => {
5930
5936
  void refreshRooms();
5931
5937
  onRoomOpened?.();
5932
5938
  }, [openRoom, onRoomOpened, refreshRooms]);
5939
+ useEffect16(() => {
5940
+ onChatOpenChange?.(selectedRoom !== null);
5941
+ return () => onChatOpenChange?.(false);
5942
+ }, [selectedRoom, onChatOpenChange]);
5933
5943
  const roomMenu = /* @__PURE__ */ jsx28("div", { className: styles.menuList, children: /* @__PURE__ */ jsx28(
5934
5944
  RoomList,
5935
5945
  {
@@ -6085,7 +6095,7 @@ var OrgsList = ({
6085
6095
  const [error, setError] = useState21(null);
6086
6096
  useEffect17(() => {
6087
6097
  let cancelled = false;
6088
- const authApiKey = isAuthenticated ? sessionStorage.getItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6098
+ const authApiKey = isAuthenticated ? readAuthItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6089
6099
  const fetchOrgs = async () => {
6090
6100
  if (!workspaceId || !authApiKey) {
6091
6101
  setOrgs([]);
@@ -6494,7 +6504,7 @@ var OrgsPage = ({ workspaceId, onNavigateToRoom }) => {
6494
6504
  setStartingFor(org.id);
6495
6505
  setStartError(null);
6496
6506
  try {
6497
- const authApiKey = isAuthenticated ? sessionStorage.getItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6507
+ const authApiKey = isAuthenticated ? readAuthItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
6498
6508
  const body = org.type === "bot" ? { type: "bot", assistantId: org.id } : { type: "human", targetUserId: org.id };
6499
6509
  const response = await fetch(
6500
6510
  `${config.baseURL}/api/workspaces/${workspaceId}/direct`,
@@ -6702,16 +6712,22 @@ var CoSpaceContainer = ({ workspaceId: workspaceIdProp }) => {
6702
6712
  const [activeTab, setActiveTab] = useState23("rooms");
6703
6713
  const [pendingRoom, setPendingRoom] = useState23(null);
6704
6714
  const [meOpen, setMeOpen] = useState23(false);
6715
+ const [roomChatOpen, setRoomChatOpen] = useState23(false);
6705
6716
  const handleNavigateToRoom = useCallback18((room) => {
6706
6717
  setPendingRoom(room);
6707
6718
  setActiveTab("rooms");
6708
6719
  }, []);
6720
+ const selectTab = useCallback18((tab) => {
6721
+ setActiveTab(tab);
6722
+ setRoomChatOpen(false);
6723
+ }, []);
6709
6724
  const page = activeTab === "rooms" ? /* @__PURE__ */ jsx32("div", { className: styles.page, children: /* @__PURE__ */ jsx32(
6710
6725
  RoomsPage,
6711
6726
  {
6712
6727
  workspaceId,
6713
6728
  openRoom: pendingRoom,
6714
- onRoomOpened: () => setPendingRoom(null)
6729
+ onRoomOpened: () => setPendingRoom(null),
6730
+ onChatOpenChange: setRoomChatOpen
6715
6731
  }
6716
6732
  ) }) : /* @__PURE__ */ jsx32("div", { className: styles.page, children: /* @__PURE__ */ jsx32(OrgsPage, { workspaceId, onNavigateToRoom: handleNavigateToRoom }) });
6717
6733
  if (isMobile) {
@@ -6719,13 +6735,13 @@ var CoSpaceContainer = ({ workspaceId: workspaceIdProp }) => {
6719
6735
  /* @__PURE__ */ jsx32(RoomConnectionBanner, {}),
6720
6736
  /* @__PURE__ */ jsx32("div", { className: styles.inner, children: /* @__PURE__ */ jsxs24("div", { className: styles.mobileRoot, children: [
6721
6737
  /* @__PURE__ */ jsx32("div", { className: styles.mobilePage, children: page }),
6722
- /* @__PURE__ */ jsxs24("nav", { className: styles.tabBar, "aria-label": "CoSpace navigation", children: [
6738
+ !roomChatOpen && /* @__PURE__ */ jsxs24("nav", { className: styles.tabBar, "aria-label": "CoSpace navigation", children: [
6723
6739
  /* @__PURE__ */ jsxs24(
6724
6740
  "button",
6725
6741
  {
6726
6742
  type: "button",
6727
6743
  className: `${styles.tabButton} ${activeTab === "rooms" ? "active" : ""}`,
6728
- onClick: () => setActiveTab("rooms"),
6744
+ onClick: () => selectTab("rooms"),
6729
6745
  "aria-pressed": activeTab === "rooms",
6730
6746
  children: [
6731
6747
  /* @__PURE__ */ jsx32(MessageSquare5, { size: 20 }),
@@ -6738,7 +6754,7 @@ var CoSpaceContainer = ({ workspaceId: workspaceIdProp }) => {
6738
6754
  {
6739
6755
  type: "button",
6740
6756
  className: `${styles.tabButton} ${activeTab === "orgs" ? "active" : ""}`,
6741
- onClick: () => setActiveTab("orgs"),
6757
+ onClick: () => selectTab("orgs"),
6742
6758
  "aria-pressed": activeTab === "orgs",
6743
6759
  children: [
6744
6760
  /* @__PURE__ */ jsx32(Building23, { size: 20 }),
@@ -14609,7 +14625,7 @@ import { Spin as Spin13 } from "antd";
14609
14625
  import { ListChecks as ListChecks2 } from "lucide-react";
14610
14626
  import { jsx as jsx63 } from "react/jsx-runtime";
14611
14627
  var TasksSideApp = lazy2(
14612
- () => import("./TasksSideApp-NNFCW65B.mjs").then((m) => ({ default: m.TasksSideApp }))
14628
+ () => import("./TasksSideApp-ISKFSZLV.mjs").then((m) => ({ default: m.TasksSideApp }))
14613
14629
  );
14614
14630
  var TasksButton = () => {
14615
14631
  const { openSideApp, sideAppVisible, sideAppSelectedCard } = useChatUIContext();
@@ -16436,7 +16452,7 @@ var PersonalAssistantPage = () => {
16436
16452
  }
16437
16453
  }, [name, personalityText, post]);
16438
16454
  const resolveThread = useCallback30(async (assistantId2) => {
16439
- const apiKey = sessionStorage.getItem("lattice_token") || config.apiKey || "";
16455
+ const apiKey = readAuthItem("lattice_token") || config.apiKey || "";
16440
16456
  const paClient = new Client({
16441
16457
  baseURL: config.baseURL,
16442
16458
  apiKey,
@@ -18330,19 +18346,19 @@ var DEFAULT_WORKSPACE_MENU_ITEMS = [
18330
18346
  ];
18331
18347
  var PanelSuspenseFallback = () => /* @__PURE__ */ jsx78("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", minHeight: 120 }, children: /* @__PURE__ */ jsx78(Spin16, {}) });
18332
18348
  var AgentGovernanceWorkbench = lazy3(
18333
- () => import("./AgentGovernanceWorkbench-D47KUMAA.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
18349
+ () => import("./AgentGovernanceWorkbench-GP4IYPVR.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
18334
18350
  );
18335
18351
  var TopologyRuntimeView = lazy3(
18336
- () => import("./TopologyRuntimeView-VWGYRX74.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
18352
+ () => import("./TopologyRuntimeView-J2QQF3FO.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
18337
18353
  );
18338
18354
  var WorkflowAutomationView = lazy3(
18339
- () => import("./WorkflowAutomationView-T4YKEPSP.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
18355
+ () => import("./WorkflowAutomationView-7NCBXAPY.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
18340
18356
  );
18341
18357
  var TasksSideApp2 = lazy3(
18342
- () => import("./TasksSideApp-NNFCW65B.mjs").then((m) => ({ default: m.TasksSideApp }))
18358
+ () => import("./TasksSideApp-ISKFSZLV.mjs").then((m) => ({ default: m.TasksSideApp }))
18343
18359
  );
18344
18360
  var AgentDetailSideApp = lazy3(
18345
- () => import("./AgentDetailSideApp-ETXLLXP2.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
18361
+ () => import("./AgentDetailSideApp-XVFNLPKO.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
18346
18362
  );
18347
18363
  var createWrapper = (Component2) => {
18348
18364
  return () => /* @__PURE__ */ jsx78(Suspense3, { fallback: /* @__PURE__ */ jsx78(PanelSuspenseFallback, {}), children: /* @__PURE__ */ jsx78(Component2, { ...{} }) });
@@ -20698,6 +20714,26 @@ function getGraphDefinition2(def) {
20698
20714
  return typeof def === "object" && def !== null ? def : {};
20699
20715
  }
20700
20716
  var asStrings = (v) => Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
20717
+ var ALL_SKILLS_NODE_ID = "skill:__all__";
20718
+ function collectConfiguredSkills(g) {
20719
+ const ids = [];
20720
+ const seen = /* @__PURE__ */ new Set();
20721
+ const add = (s) => {
20722
+ if (seen.has(s)) return;
20723
+ seen.add(s);
20724
+ ids.push(s);
20725
+ };
20726
+ for (const s of asStrings(g.skills)) add(s);
20727
+ let readAll = false;
20728
+ const middleware = Array.isArray(g.middleware) ? g.middleware : [];
20729
+ for (const m of middleware) {
20730
+ if (m.enabled === false || m.type !== "skill") continue;
20731
+ const cfg = typeof m.config === "object" && m.config !== null ? m.config : {};
20732
+ if (cfg.readAll === true) readAll = true;
20733
+ for (const s of asStrings(cfg.skills)) add(s);
20734
+ }
20735
+ return { ids, readAll };
20736
+ }
20701
20737
  function buildAgentConfigGraphData(def, options) {
20702
20738
  const g = getGraphDefinition2(def);
20703
20739
  const agentKey = typeof g.key === "string" ? g.key : "agent";
@@ -20723,7 +20759,11 @@ function buildAgentConfigGraphData(def, options) {
20723
20759
  return make("capability", `cap:${type}`, m.name || type, m.description || void 0, m);
20724
20760
  });
20725
20761
  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));
20762
+ const { ids: configuredSkillIds, readAll } = collectConfiguredSkills(g);
20763
+ const skills = [
20764
+ ...readAll ? [make("skill", ALL_SKILLS_NODE_ID, "All skills", "Agent can load any available skill")] : [],
20765
+ ...configuredSkillIds.map((s) => make("skill", `skill:${s}`, s))
20766
+ ];
20727
20767
  const allGroups = [
20728
20768
  { id: "group:tools", type: "tool", label: "Tools", items: tools },
20729
20769
  { id: "group:capabilities", type: "capability", label: "Capabilities", items: capabilities },
@@ -27277,7 +27317,7 @@ import { Fragment as Fragment39, jsx as jsx114, jsxs as jsxs95 } from "react/jsx
27277
27317
  var { Text: Text33 } = Typography33;
27278
27318
  var errorMessage = (error) => error instanceof Error ? error.message : "Request failed";
27279
27319
  function consolePreviewFetch(input, init) {
27280
- const token = typeof sessionStorage === "undefined" ? null : sessionStorage.getItem("lattice_token");
27320
+ const token = readAuthItem("lattice_token");
27281
27321
  const headers = new Headers(init?.headers);
27282
27322
  if (token) headers.set("Authorization", `Bearer ${token}`);
27283
27323
  headers.set("X-Axiom-Web-App-Preview", "true");
@@ -28412,7 +28452,17 @@ var AgentDetailView = ({
28412
28452
  } else if (node.type === "subagent" && node.id.startsWith("sub:")) {
28413
28453
  next.subAgents = (g.subAgents ?? []).filter((s) => s !== node.id.slice(4));
28414
28454
  } else if (node.type === "skill" && node.id.startsWith("skill:")) {
28415
- next.skills = (g.skills ?? []).filter((s) => s !== node.id.slice(6));
28455
+ const skillId = node.id.slice(6);
28456
+ next.skills = (g.skills ?? []).filter((s) => s !== skillId);
28457
+ if (Array.isArray(g.middleware)) {
28458
+ next.middleware = g.middleware.map((m) => {
28459
+ if (m.type !== "skill") return m;
28460
+ const cfg = typeof m.config === "object" && m.config !== null ? m.config : {};
28461
+ if (node.id === ALL_SKILLS_NODE_ID) return { ...m, config: { ...cfg, readAll: false } };
28462
+ if (!Array.isArray(cfg.skills) || !cfg.skills.includes(skillId)) return m;
28463
+ return { ...m, config: { ...cfg, skills: cfg.skills.filter((s) => s !== skillId) } };
28464
+ });
28465
+ }
28416
28466
  } else if (node.type === "capability" && node.id.startsWith("cap:")) {
28417
28467
  const type = node.id.slice(4);
28418
28468
  next.middleware = (g.middleware ?? []).filter((m) => m.type !== type);
@@ -28763,4 +28813,4 @@ export {
28763
28813
  WorkspaceResourceUIContext,
28764
28814
  LatticeChat
28765
28815
  };
28766
- //# sourceMappingURL=chunk-NLN5EB7R.mjs.map
28816
+ //# sourceMappingURL=chunk-OZQ4CZWU.mjs.map