@mcp-b/react-components 0.72.0 → 0.72.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.
@@ -1,4 +1,5 @@
1
1
  import { r as AgentComputerApp } from "../../AgentComputer-BI8RsGzq.js";
2
+ import { a as ExecutionTrace, r as ExecutionGraph } from "../../ExecutionBoard-DBj1Aiva.js";
2
3
  import { l as WorkspaceAutomationSource } from "../../WorkspaceAutomation-hwl6C1aX.js";
3
4
  import { t as ThinkSchedule } from "../../ThinkSchedule-C9vErgZQ.js";
4
5
  import { ComputerCalendarEvent, ComputerCalendarRange } from "./ComputerCalendar.js";
@@ -32,6 +33,10 @@ export interface ComputerAutomationsSelection {
32
33
  export interface ComputerAutomationsHost<TSchedule extends ComputerSchedule = ComputerSchedule> {
33
34
  /** Saved automations; Automations itself opens a workflow and starts its schedule, single or per table row. */
34
35
  automations: Omit<WorkspaceAutomationSource, "onOpen" | "onSchedule" | "onScheduleTable">;
36
+ /** The selected automation's step outline, loaded by the host; absent while it loads. */
37
+ selectedGraph?: ExecutionGraph;
38
+ /** The saved run the host loaded for the selected trace file. */
39
+ selectedTrace?: ExecutionTrace;
35
40
  /** Every schedule, each carrying its next run and retained runs. */
36
41
  schedules: readonly TSchedule[];
37
42
  /** Creates a schedule and resolves its id. `requestKey` is stable for one editor, so a retried save is idempotent. */
@@ -1045,7 +1045,7 @@ function AutomationsToolbar(t0) {
1045
1045
  * runs, as the side panel's Automations and Schedules show them.
1046
1046
  */
1047
1047
  function useAutomationsModel() {
1048
- const $ = c(59);
1048
+ const $ = c(58);
1049
1049
  const { host, clock, schedules } = useComputerAutomationsContext();
1050
1050
  const files = React.use(AppHostsContext).files;
1051
1051
  const { section, workflow: selectedWorkflowPath, run: runId } = host.selection;
@@ -1105,23 +1105,18 @@ function useAutomationsModel() {
1105
1105
  } else t5 = $[12];
1106
1106
  let t6;
1107
1107
  let t7;
1108
- if ($[13] !== openAutomationSchedule || $[14] !== setSection) {
1109
- t6 = async (path_2) => {
1110
- if (await openAutomationSchedule({ path: path_2 })) setSection("schedules");
1111
- };
1112
- t7 = async (invocation) => {
1113
- if (await openAutomationSchedule(invocation)) setSection("schedules");
1114
- };
1108
+ if ($[13] !== openAutomationSchedule) {
1109
+ t6 = async (path_2) => void await openAutomationSchedule({ path: path_2 });
1110
+ t7 = async (invocation) => void await openAutomationSchedule(invocation);
1115
1111
  $[13] = openAutomationSchedule;
1116
- $[14] = setSection;
1117
- $[15] = t6;
1118
- $[16] = t7;
1112
+ $[14] = t6;
1113
+ $[15] = t7;
1119
1114
  } else {
1120
- t6 = $[15];
1121
- t7 = $[16];
1115
+ t6 = $[14];
1116
+ t7 = $[15];
1122
1117
  }
1123
1118
  let t8;
1124
- if ($[17] !== onRun) {
1119
+ if ($[16] !== onRun) {
1125
1120
  t8 = onRun ? async (invocation_0) => {
1126
1121
  const outcome = await onRun(invocation_0);
1127
1122
  const [output] = outcome.files;
@@ -1131,11 +1126,11 @@ function useAutomationsModel() {
1131
1126
  }, ...current.filter((candidate) => candidate.workflowPath !== invocation_0.path || candidate.run.path !== output.path)]);
1132
1127
  return outcome;
1133
1128
  } : void 0;
1134
- $[17] = onRun;
1135
- $[18] = t8;
1136
- } else t8 = $[18];
1129
+ $[16] = onRun;
1130
+ $[17] = t8;
1131
+ } else t8 = $[17];
1137
1132
  let t9;
1138
- if ($[19] !== host.automations || $[20] !== t5 || $[21] !== t6 || $[22] !== t7 || $[23] !== t8) {
1133
+ if ($[18] !== host.automations || $[19] !== t5 || $[20] !== t6 || $[21] !== t7 || $[22] !== t8) {
1139
1134
  t9 = {
1140
1135
  ...host.automations,
1141
1136
  onOpen: t5,
@@ -1143,27 +1138,27 @@ function useAutomationsModel() {
1143
1138
  onScheduleTable: t7,
1144
1139
  onRun: t8
1145
1140
  };
1146
- $[19] = host.automations;
1147
- $[20] = t5;
1148
- $[21] = t6;
1149
- $[22] = t7;
1150
- $[23] = t8;
1151
- $[24] = t9;
1152
- } else t9 = $[24];
1141
+ $[18] = host.automations;
1142
+ $[19] = t5;
1143
+ $[20] = t6;
1144
+ $[21] = t7;
1145
+ $[22] = t8;
1146
+ $[23] = t9;
1147
+ } else t9 = $[23];
1153
1148
  const source = t9;
1154
1149
  let t10;
1155
- if ($[25] !== host.schedules || $[26] !== runId) {
1150
+ if ($[24] !== host.schedules || $[25] !== runId) {
1156
1151
  t10 = host.schedules.flatMap(_temp7).find((run_0) => getThinkExecutionRunId(run_0) === runId) ?? null;
1157
- $[25] = host.schedules;
1158
- $[26] = runId;
1159
- $[27] = t10;
1160
- } else t10 = $[27];
1152
+ $[24] = host.schedules;
1153
+ $[25] = runId;
1154
+ $[26] = t10;
1155
+ } else t10 = $[26];
1161
1156
  const selectedRun = t10;
1162
1157
  const scheduleApp = schedules.model;
1163
1158
  const [outlet] = React.useState(createAppBarOutlet);
1164
1159
  const [sections, setSections] = React.useState(null);
1165
1160
  let t11;
1166
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1161
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1167
1162
  t11 = /* @__PURE__ */ jsxs(Tabs.Tab, {
1168
1163
  unstyled: true,
1169
1164
  value: "workflows",
@@ -1175,10 +1170,10 @@ function useAutomationsModel() {
1175
1170
  }),
1176
1171
  children: [/* @__PURE__ */ jsx(QueueIcon, { "aria-hidden": "true" }), "Automations"]
1177
1172
  });
1178
- $[28] = t11;
1179
- } else t11 = $[28];
1173
+ $[27] = t11;
1174
+ } else t11 = $[27];
1180
1175
  let t12;
1181
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
1176
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1182
1177
  t12 = /* @__PURE__ */ jsxs(Tabs.Tab, {
1183
1178
  unstyled: true,
1184
1179
  value: "schedules",
@@ -1190,10 +1185,10 @@ function useAutomationsModel() {
1190
1185
  }),
1191
1186
  children: [/* @__PURE__ */ jsx(CalendarIcon, { "aria-hidden": "true" }), "Schedules"]
1192
1187
  });
1193
- $[29] = t12;
1194
- } else t12 = $[29];
1188
+ $[28] = t12;
1189
+ } else t12 = $[28];
1195
1190
  let t13;
1196
- if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
1191
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
1197
1192
  t13 = /* @__PURE__ */ jsxs(Tabs.List, {
1198
1193
  unstyled: true,
1199
1194
  className: "computer-automations__tabs",
@@ -1214,12 +1209,12 @@ function useAutomationsModel() {
1214
1209
  })
1215
1210
  ]
1216
1211
  });
1217
- $[30] = t13;
1218
- } else t13 = $[30];
1212
+ $[29] = t13;
1213
+ } else t13 = $[29];
1219
1214
  const sectionList = t13;
1220
1215
  const t14 = section === "schedules" ? scheduleApp.renderMenus : void 0;
1221
1216
  let t15;
1222
- if ($[31] !== outlet || $[32] !== scheduleApp.renderTitle || $[33] !== schedules.editing) {
1217
+ if ($[30] !== outlet || $[31] !== scheduleApp.renderTitle || $[32] !== schedules.editing) {
1223
1218
  t15 = schedules.editing ? scheduleApp.renderTitle : (t16) => {
1224
1219
  const { phone } = t16;
1225
1220
  return phone ? "Automations" : /* @__PURE__ */ jsx(AutomationsToolbar, {
@@ -1227,13 +1222,13 @@ function useAutomationsModel() {
1227
1222
  sections: setSections
1228
1223
  });
1229
1224
  };
1230
- $[31] = outlet;
1231
- $[32] = scheduleApp.renderTitle;
1232
- $[33] = schedules.editing;
1233
- $[34] = t15;
1234
- } else t15 = $[34];
1225
+ $[30] = outlet;
1226
+ $[31] = scheduleApp.renderTitle;
1227
+ $[32] = schedules.editing;
1228
+ $[33] = t15;
1229
+ } else t15 = $[33];
1235
1230
  let t16;
1236
- if ($[35] !== clock || $[36] !== host || $[37] !== openWorkspaceFile || $[38] !== outlet || $[39] !== recentWorkflowOutputs || $[40] !== runId || $[41] !== scheduleApp || $[42] !== schedules.editing || $[43] !== section || $[44] !== sections || $[45] !== selectedRun || $[46] !== selectedWorkflowPath || $[47] !== setSection || $[48] !== setSelectedRun || $[49] !== setSelectedWorkflowPath || $[50] !== source || $[51] !== workflows) {
1231
+ if ($[34] !== clock || $[35] !== host || $[36] !== openWorkspaceFile || $[37] !== outlet || $[38] !== recentWorkflowOutputs || $[39] !== runId || $[40] !== scheduleApp || $[41] !== schedules.editing || $[42] !== section || $[43] !== sections || $[44] !== selectedRun || $[45] !== selectedWorkflowPath || $[46] !== setSection || $[47] !== setSelectedRun || $[48] !== setSelectedWorkflowPath || $[49] !== source || $[50] !== workflows) {
1237
1232
  t16 = (context) => {
1238
1233
  const paneOutlet = (pane) => !context.phone && section === pane ? outlet : null;
1239
1234
  return schedules.editing ? scheduleApp.render(context) : /* @__PURE__ */ jsxs(Tabs.Root, {
@@ -1256,6 +1251,8 @@ function useAutomationsModel() {
1256
1251
  "aria-label": workflows.data?.find((automation_0) => automation_0.path === selectedWorkflowPath)?.name ?? "Automation library",
1257
1252
  source,
1258
1253
  selectedPath: selectedWorkflowPath,
1254
+ selectedGraph: host.selectedGraph,
1255
+ selectedTrace: host.selectedTrace,
1259
1256
  onBack: () => setSelectedWorkflowPath(void 0)
1260
1257
  })
1261
1258
  })
@@ -1300,27 +1297,27 @@ function useAutomationsModel() {
1300
1297
  })]
1301
1298
  });
1302
1299
  };
1303
- $[35] = clock;
1304
- $[36] = host;
1305
- $[37] = openWorkspaceFile;
1306
- $[38] = outlet;
1307
- $[39] = recentWorkflowOutputs;
1308
- $[40] = runId;
1309
- $[41] = scheduleApp;
1310
- $[42] = schedules.editing;
1311
- $[43] = section;
1312
- $[44] = sections;
1313
- $[45] = selectedRun;
1314
- $[46] = selectedWorkflowPath;
1315
- $[47] = setSection;
1316
- $[48] = setSelectedRun;
1317
- $[49] = setSelectedWorkflowPath;
1318
- $[50] = source;
1319
- $[51] = workflows;
1320
- $[52] = t16;
1321
- } else t16 = $[52];
1300
+ $[34] = clock;
1301
+ $[35] = host;
1302
+ $[36] = openWorkspaceFile;
1303
+ $[37] = outlet;
1304
+ $[38] = recentWorkflowOutputs;
1305
+ $[39] = runId;
1306
+ $[40] = scheduleApp;
1307
+ $[41] = schedules.editing;
1308
+ $[42] = section;
1309
+ $[43] = sections;
1310
+ $[44] = selectedRun;
1311
+ $[45] = selectedWorkflowPath;
1312
+ $[46] = setSection;
1313
+ $[47] = setSelectedRun;
1314
+ $[48] = setSelectedWorkflowPath;
1315
+ $[49] = source;
1316
+ $[50] = workflows;
1317
+ $[51] = t16;
1318
+ } else t16 = $[51];
1322
1319
  let t17;
1323
- if ($[53] !== scheduleApp.beforeQuit || $[54] !== scheduleApp.onKeyDown || $[55] !== t14 || $[56] !== t15 || $[57] !== t16) {
1320
+ if ($[52] !== scheduleApp.beforeQuit || $[53] !== scheduleApp.onKeyDown || $[54] !== t14 || $[55] !== t15 || $[56] !== t16) {
1324
1321
  t17 = {
1325
1322
  beforeQuit: scheduleApp.beforeQuit,
1326
1323
  onKeyDown: scheduleApp.onKeyDown,
@@ -1328,13 +1325,13 @@ function useAutomationsModel() {
1328
1325
  renderTitle: t15,
1329
1326
  render: t16
1330
1327
  };
1331
- $[53] = scheduleApp.beforeQuit;
1332
- $[54] = scheduleApp.onKeyDown;
1333
- $[55] = t14;
1334
- $[56] = t15;
1335
- $[57] = t16;
1336
- $[58] = t17;
1337
- } else t17 = $[58];
1328
+ $[52] = scheduleApp.beforeQuit;
1329
+ $[53] = scheduleApp.onKeyDown;
1330
+ $[54] = t14;
1331
+ $[55] = t15;
1332
+ $[56] = t16;
1333
+ $[57] = t17;
1334
+ } else t17 = $[57];
1338
1335
  return t17;
1339
1336
  }
1340
1337
  function _temp7(schedule) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/react-components",
3
- "version": "0.72.0",
3
+ "version": "0.72.1",
4
4
  "description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
5
5
  "homepage": "https://design-system.sigvelo.com",
6
6
  "bugs": {
@@ -55,7 +55,7 @@
55
55
  "streamdown": "^2.7.0",
56
56
  "unist-util-visit": "^5.1.0",
57
57
  "yet-another-react-lightbox": "^3.32.2",
58
- "@mcp-b/design-tokens": "0.72.0"
58
+ "@mcp-b/design-tokens": "0.72.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@ai-sdk/react": "^4.0.136",