@mastra/playground-ui 35.1.0-alpha.2 → 36.0.0-alpha.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 36.0.0-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Added Studio support for authoring and viewing item-level tool mocks on dataset items. ([#18038](https://github.com/mastra-ai/mastra/pull/18038))
8
+ Added trace-derived mock creation with an editable preview before saving to a new or existing item.
9
+ Added tool mock propagation when creating new items and creating datasets from items.
10
+ Improved experiment results with a tool mock report (served, unconsumed, live calls, and mismatch details).
11
+
12
+ Author tool mocks on a dataset item as a JSON array:
13
+
14
+ ```json
15
+ [
16
+ {
17
+ "toolName": "refundUser",
18
+ "args": { "user": "YJ", "amount": 100 },
19
+ "output": { "refundId": "refund_1", "user": "YJ", "amount": 100, "newBalance": 100 }
20
+ }
21
+ ]
22
+ ```
23
+
24
+ - Updated dependencies [[`5c4e9a4`](https://github.com/mastra-ai/mastra/commit/5c4e9a4cfb2216bb3ea7f8988ad3727f3b92bb3a), [`25961e3`](https://github.com/mastra-ai/mastra/commit/25961e3260ff3b1464637af8fcdb36210551c39f), [`7b29f33`](https://github.com/mastra-ai/mastra/commit/7b29f332a357a83e555f29e718e5f2fab9979943), [`24912b1`](https://github.com/mastra-ai/mastra/commit/24912b1f855d29ec36af4ef4bde1f7417e20cdf5), [`7686216`](https://github.com/mastra-ai/mastra/commit/7686216f37e74568feddec17cef3c3d24e10e60a), [`975c59a`](https://github.com/mastra-ai/mastra/commit/975c59ae363ee275fc55062392e1ffd2cbccbd53), [`d95f394`](https://github.com/mastra-ai/mastra/commit/d95f394fd24c8411886930d727679c4d5252aa26), [`25961e3`](https://github.com/mastra-ai/mastra/commit/25961e3260ff3b1464637af8fcdb36210551c39f), [`f3f0c9d`](https://github.com/mastra-ai/mastra/commit/f3f0c9d7c878db5a13177871ce3523a14f14b311), [`6581e28`](https://github.com/mastra-ai/mastra/commit/6581e28a65d72cdb5f0e8d8f892220a5c27160fe)]:
25
+ - @mastra/core@1.46.0-alpha.4
26
+ - @mastra/client-js@1.27.0-alpha.4
27
+ - @mastra/react@1.1.1-alpha.4
28
+
29
+ ## 36.0.0-alpha.3
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [[`65f255a`](https://github.com/mastra-ai/mastra/commit/65f255a38667beb6ceeadabfa9eb5059bfec8298), [`4a88c6e`](https://github.com/mastra-ai/mastra/commit/4a88c6e2bdce316f8d7551b4ec3449b0b06fc71c), [`87a17ef`](https://github.com/mastra-ai/mastra/commit/87a17efbd725aca6639febdc5e69e2abb3048689), [`e11ff30`](https://github.com/mastra-ai/mastra/commit/e11ff301408bf1731dca2fb7fbfcd8c819500a35), [`9d2c946`](https://github.com/mastra-ai/mastra/commit/9d2c946d0859e90ae4bcec5beeb1da7398d2ad1e), [`f1ec385`](https://github.com/mastra-ai/mastra/commit/f1ec385386f62b1a0847ec5353ae2bb169d1c3d9), [`e14986f`](https://github.com/mastra-ai/mastra/commit/e14986f6e5478d6384d04ff9a7f9a79a46a8b529), [`0be490f`](https://github.com/mastra-ai/mastra/commit/0be490fabb538c5a7de796ea0aff7d04a0bea1f3), [`0be490f`](https://github.com/mastra-ai/mastra/commit/0be490fabb538c5a7de796ea0aff7d04a0bea1f3), [`0be490f`](https://github.com/mastra-ai/mastra/commit/0be490fabb538c5a7de796ea0aff7d04a0bea1f3), [`974f614`](https://github.com/mastra-ai/mastra/commit/974f614e083bd68278536f94453f7b320b86a3c7), [`31be1cf`](https://github.com/mastra-ai/mastra/commit/31be1cf5f2a7b5eef12f6123a40653b4d8115c16)]:
34
+ - @mastra/core@1.46.0-alpha.3
35
+ - @mastra/client-js@1.27.0-alpha.3
36
+ - @mastra/react@1.1.1-alpha.3
37
+
3
38
  ## 35.1.0-alpha.2
4
39
 
5
40
  ### Minor Changes
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const multiColumn = require('../multi-column-BLRjYB5N.cjs');
5
+ const multiColumn = require('../multi-column-BbVNPvhh.cjs');
6
6
 
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export { C as Column, a as Columns, M as MultiColumn } from '../multi-column-e_-j_rrO.js';
1
+ export { C as Column, a as Columns, M as MultiColumn } from '../multi-column-o9qcoBXV.js';
2
2
  //# sourceMappingURL=Columns.es.js.map
package/dist/index.cjs.js CHANGED
@@ -80,7 +80,7 @@ const tabsTab = require('./tabs-tab-CulV7e_n.cjs');
80
80
  const tabsContent = require('./tabs-content-m86TGI_b.cjs');
81
81
  const getShortId = require('./get-short-id-DtN4BmrD.cjs');
82
82
  const contentBlock = require('./content-block-Csb01oxE.cjs');
83
- const multiColumn = require('./multi-column-BLRjYB5N.cjs');
83
+ const multiColumn = require('./multi-column-BbVNPvhh.cjs');
84
84
  const codeDiff = require('./code-diff-C2vuR6Ti.cjs');
85
85
  const helpers = require('./helpers-BbJUaSrW.cjs');
86
86
  const Notice = require('./Notice-Mjo3MJi2.cjs');
@@ -6077,6 +6077,7 @@ function TraceDataPanelView({
6077
6077
  onSpanSelect,
6078
6078
  onEvaluateTrace,
6079
6079
  onSaveAsDatasetItem,
6080
+ onAddTraceMocksToItem,
6080
6081
  initialSpanId,
6081
6082
  onPrevious,
6082
6083
  onNext,
@@ -6193,7 +6194,7 @@ function TraceDataPanelView({
6193
6194
  ] }) }),
6194
6195
  !collapsed && (isLoading ? /* @__PURE__ */ jsxRuntime.jsx(dataPanel.DataPanel.LoadingData, { children: "Loading trace..." }) : hierarchicalSpans.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(dataPanel.DataPanel.NoData, { children: "No spans found for this trace." }) : /* @__PURE__ */ jsxRuntime.jsxs(dataPanel.DataPanel.Content, { ref: contentRef, children: [
6195
6196
  !isOnTracePage && rootSpan && /* @__PURE__ */ jsxRuntime.jsx(TraceKeysAndValues, { rootSpan, className: "mb-6" }),
6196
- !isOnTracePage && (onEvaluateTrace || onSaveAsDatasetItem) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 flex justify-between items-center gap-4", children: [
6197
+ !isOnTracePage && (onEvaluateTrace || onSaveAsDatasetItem || onAddTraceMocksToItem) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 flex flex-wrap justify-between items-center gap-4", children: [
6197
6198
  onEvaluateTrace && /* @__PURE__ */ jsxRuntime.jsxs(Button.Button, { size: "sm", onClick: onEvaluateTrace, children: [
6198
6199
  /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleGaugeIcon, {}) }),
6199
6200
  "Evaluate Trace"
@@ -6201,9 +6202,13 @@ function TraceDataPanelView({
6201
6202
  onSaveAsDatasetItem && /* @__PURE__ */ jsxRuntime.jsxs(Button.Button, { size: "sm", onClick: () => onSaveAsDatasetItem({ traceId, rootSpanId: rootSpan?.spanId }), children: [
6202
6203
  /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SaveIcon, {}) }),
6203
6204
  "Save as Dataset Item"
6205
+ ] }),
6206
+ onAddTraceMocksToItem && /* @__PURE__ */ jsxRuntime.jsxs(Button.Button, { size: "sm", onClick: () => onAddTraceMocksToItem({ traceId }), children: [
6207
+ /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.WrenchIcon, {}) }),
6208
+ "Add tool mocks to item"
6204
6209
  ] })
6205
6210
  ] }),
6206
- !isOnTracePage && !onEvaluateTrace && !onSaveAsDatasetItem && showUnavailableFeaturesMsg && /* @__PURE__ */ jsxRuntime.jsx(Notice.Notice, { variant: "info", className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Notice.Notice.Message, { children: "Evaluating traces and saving them as dataset items is available in Mastra Studio (local or deployed)." }) }),
6211
+ !isOnTracePage && !onEvaluateTrace && !onSaveAsDatasetItem && !onAddTraceMocksToItem && showUnavailableFeaturesMsg && /* @__PURE__ */ jsxRuntime.jsx(Notice.Notice, { variant: "info", className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Notice.Notice.Message, { children: "Evaluating traces and saving them as dataset items is available in Mastra Studio (local or deployed)." }) }),
6207
6212
  /* @__PURE__ */ jsxRuntime.jsx(
6208
6213
  TraceTimeline,
6209
6214
  {