@mastra/playground-ui 8.0.0-alpha.0 → 8.0.0-alpha.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.
- package/CHANGELOG.md +36 -0
- package/dist/index.cjs.js +46 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +46 -23
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/workspace/components/skill-detail.d.ts +3 -1
- package/dist/src/domains/workspace/types.d.ts +2 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 8.0.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added raw SKILL.md source view in skill detail page. The 'Source' toggle now shows the full file contents including YAML frontmatter. ([#12497](https://github.com/mastra-ai/mastra/pull/12497))
|
|
8
|
+
|
|
9
|
+
## 8.0.0-alpha.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Restructured stored agents to use a thin metadata record with versioned configuration snapshots. ([#12488](https://github.com/mastra-ai/mastra/pull/12488))
|
|
14
|
+
|
|
15
|
+
The agent record now only stores metadata fields (id, status, activeVersionId, authorId, metadata, timestamps). All configuration fields (name, instructions, model, tools, etc.) live exclusively in version snapshot rows, enabling full version history and rollback.
|
|
16
|
+
|
|
17
|
+
**Key changes:**
|
|
18
|
+
- Stored Agent records are now thin metadata-only (StorageAgentType)
|
|
19
|
+
- All config lives in version snapshots (StorageAgentSnapshotType)
|
|
20
|
+
- New resolved type (StorageResolvedAgentType) merges agent record + active version config
|
|
21
|
+
- Renamed `ownerId` to `authorId` for multi-tenant filtering
|
|
22
|
+
- Changed `memory` field type from `string` to `Record<string, unknown>`
|
|
23
|
+
- Added `status` field ('draft' | 'published') to agent records
|
|
24
|
+
- Flattened CreateAgent/UpdateAgent input types (config fields at top level, no nested snapshot)
|
|
25
|
+
- Version config columns are top-level in the agent_versions table (no single snapshot jsonb column)
|
|
26
|
+
- List endpoints return resolved agents (thin record + active version config)
|
|
27
|
+
- Auto-versioning on update with retention limits and race condition handling
|
|
28
|
+
|
|
29
|
+
- Improved skill activation styling with cleaner badge appearance and dark-themed tooltip on hover. ([#12487](https://github.com/mastra-ai/mastra/pull/12487))
|
|
30
|
+
|
|
31
|
+
- Fixed skill detail page crashing when skills have object-typed compatibility or metadata fields. Skills from skills.sh and other external sources now display correctly. ([#12491](https://github.com/mastra-ai/mastra/pull/12491))
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [[`b99ceac`](https://github.com/mastra-ai/mastra/commit/b99ceace2c830dbdef47c8692d56a91954aefea2), [`deea43e`](https://github.com/mastra-ai/mastra/commit/deea43eb1366d03a864c5e597d16a48592b9893f), [`ac9ec66`](https://github.com/mastra-ai/mastra/commit/ac9ec6672779b2e6d4344e415481d1a6a7d4911a)]:
|
|
34
|
+
- @mastra/core@1.1.0-alpha.1
|
|
35
|
+
- @mastra/client-js@1.1.0-alpha.1
|
|
36
|
+
- @mastra/react@0.2.0-alpha.1
|
|
37
|
+
- @mastra/ai-sdk@1.0.3-alpha.0
|
|
38
|
+
|
|
3
39
|
## 8.0.0-alpha.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -16669,24 +16669,21 @@ const AgentMetadataSkillList = ({ skills, agentId, workspaceId }) => {
|
|
|
16669
16669
|
}
|
|
16670
16670
|
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: skills.map((skill) => {
|
|
16671
16671
|
const isActivated = isSkillActivated(skill.name);
|
|
16672
|
-
|
|
16673
|
-
|
|
16672
|
+
const badge = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16673
|
+
Badge,
|
|
16674
16674
|
{
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
children: skill.name
|
|
16683
|
-
}
|
|
16684
|
-
) }),
|
|
16685
|
-
isActivated && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-green-400 font-medium", children: "Active" })
|
|
16686
|
-
] })
|
|
16687
|
-
},
|
|
16688
|
-
skill.name
|
|
16675
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(SkillIcon, { className: isActivated ? "text-green-400" : "text-accent2" }),
|
|
16676
|
+
variant: isActivated ? "success" : "default",
|
|
16677
|
+
children: [
|
|
16678
|
+
skill.name,
|
|
16679
|
+
isActivated && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Active" })
|
|
16680
|
+
]
|
|
16681
|
+
}
|
|
16689
16682
|
);
|
|
16683
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: isActivated ? /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
16684
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.agentSkillLink(agentId, skill.name, workspaceId), "data-testid": "skill-badge", children: badge }) }),
|
|
16685
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "bg-surface3 text-icon6 border border-border1", children: "Active" })
|
|
16686
|
+
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.agentSkillLink(agentId, skill.name, workspaceId), "data-testid": "skill-badge", children: badge }) }, skill.name);
|
|
16690
16687
|
}) });
|
|
16691
16688
|
};
|
|
16692
16689
|
function formatWorkspaceToolName(toolName) {
|
|
@@ -18506,7 +18503,7 @@ function EditAgentDialog({ agentId, open, onOpenChange, onSuccess, onDelete }) {
|
|
|
18506
18503
|
integrationTools: integrationToolIds,
|
|
18507
18504
|
workflows: values.workflows,
|
|
18508
18505
|
agents: values.agents,
|
|
18509
|
-
memory: values.memory,
|
|
18506
|
+
memory: values.memory ? { key: values.memory } : void 0,
|
|
18510
18507
|
scorers: values.scorers
|
|
18511
18508
|
});
|
|
18512
18509
|
toast.success("Agent updated successfully");
|
|
@@ -18549,7 +18546,7 @@ function EditAgentDialog({ agentId, open, onOpenChange, onSuccess, onDelete }) {
|
|
|
18549
18546
|
tools: allTools,
|
|
18550
18547
|
workflows: agent.workflows || [],
|
|
18551
18548
|
agents: agent.agents || [],
|
|
18552
|
-
memory: agent.memory
|
|
18549
|
+
memory: agent.memory && typeof agent.memory === "object" && "key" in agent.memory ? String(agent.memory.key) : typeof agent.memory === "string" ? agent.memory : "",
|
|
18553
18550
|
scorers: agent.scorers || {}
|
|
18554
18551
|
};
|
|
18555
18552
|
}, [agent]);
|
|
@@ -19846,7 +19843,7 @@ function CreateAgentDialog({ open, onOpenChange, onSuccess }) {
|
|
|
19846
19843
|
tools: values.tools && values.tools.length > 0 ? values.tools : void 0,
|
|
19847
19844
|
workflows: values.workflows,
|
|
19848
19845
|
agents: values.agents,
|
|
19849
|
-
memory: values.memory,
|
|
19846
|
+
memory: values.memory ? { key: values.memory } : void 0,
|
|
19850
19847
|
scorers: values.scorers
|
|
19851
19848
|
};
|
|
19852
19849
|
await createStoredAgent.mutateAsync(createParams);
|
|
@@ -25195,7 +25192,7 @@ function getSourceInfo(source) {
|
|
|
25195
25192
|
};
|
|
25196
25193
|
}
|
|
25197
25194
|
}
|
|
25198
|
-
function SkillDetail({ skill, onReferenceClick }) {
|
|
25195
|
+
function SkillDetail({ skill, rawSkillMd, onReferenceClick }) {
|
|
25199
25196
|
const [expandedSections, setExpandedSections] = React.useState(/* @__PURE__ */ new Set(["instructions"]));
|
|
25200
25197
|
const [showRawInstructions, setShowRawInstructions] = React.useState(false);
|
|
25201
25198
|
const sourceInfo = getSourceInfo(skill.source);
|
|
@@ -25221,7 +25218,7 @@ function SkillDetail({ skill, onReferenceClick }) {
|
|
|
25221
25218
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: [
|
|
25222
25219
|
/* @__PURE__ */ jsxRuntime.jsx(MetadataCard, { label: "Source", value: sourceInfo.label, icon: sourceInfo.icon }),
|
|
25223
25220
|
skill.license && /* @__PURE__ */ jsxRuntime.jsx(MetadataCard, { label: "License", value: skill.license }),
|
|
25224
|
-
skill.compatibility && /* @__PURE__ */ jsxRuntime.jsx(MetadataCard, { label: "Compatibility", value: skill.compatibility }),
|
|
25221
|
+
skill.compatibility != null && /* @__PURE__ */ jsxRuntime.jsx(MetadataCard, { label: "Compatibility", value: skill.compatibility }),
|
|
25225
25222
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25226
25223
|
MetadataCard,
|
|
25227
25224
|
{
|
|
@@ -25263,7 +25260,7 @@ function SkillDetail({ skill, onReferenceClick }) {
|
|
|
25263
25260
|
backgroundColor: "transparent",
|
|
25264
25261
|
fontSize: "0.875rem"
|
|
25265
25262
|
},
|
|
25266
|
-
children: skill.instructions
|
|
25263
|
+
children: rawSkillMd ?? skill.instructions
|
|
25267
25264
|
}
|
|
25268
25265
|
) }) : /* @__PURE__ */ jsxRuntime.jsx(MarkdownRenderer, { children: skill.instructions })
|
|
25269
25266
|
}
|
|
@@ -25318,12 +25315,38 @@ function SkillDetail({ skill, onReferenceClick }) {
|
|
|
25318
25315
|
] }) })
|
|
25319
25316
|
] });
|
|
25320
25317
|
}
|
|
25318
|
+
function formatDisplayValue(value) {
|
|
25319
|
+
if (typeof value === "string") {
|
|
25320
|
+
return value;
|
|
25321
|
+
}
|
|
25322
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
25323
|
+
return String(value);
|
|
25324
|
+
}
|
|
25325
|
+
if (Array.isArray(value)) {
|
|
25326
|
+
return value.map((v) => typeof v === "string" ? v : JSON.stringify(v)).join(", ");
|
|
25327
|
+
}
|
|
25328
|
+
if (typeof value === "object" && value !== null) {
|
|
25329
|
+
const keys = Object.keys(value);
|
|
25330
|
+
if (keys.length === 0) return "{}";
|
|
25331
|
+
if (keys.length === 1) {
|
|
25332
|
+
const key = keys[0];
|
|
25333
|
+
const val = value[key];
|
|
25334
|
+
if (Array.isArray(val)) {
|
|
25335
|
+
return `${key}: ${val.join(", ")}`;
|
|
25336
|
+
}
|
|
25337
|
+
return `${key}: ${formatDisplayValue(val)}`;
|
|
25338
|
+
}
|
|
25339
|
+
return `{${keys.join(", ")}}`;
|
|
25340
|
+
}
|
|
25341
|
+
return String(value);
|
|
25342
|
+
}
|
|
25321
25343
|
function MetadataCard({ label, value, icon }) {
|
|
25344
|
+
const displayValue = formatDisplayValue(value);
|
|
25322
25345
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 rounded-lg bg-surface3", children: [
|
|
25323
25346
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-icon3 mb-1", children: label }),
|
|
25324
25347
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
25325
25348
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-icon4", children: icon }),
|
|
25326
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-icon5", children:
|
|
25349
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-icon5 truncate", title: displayValue, children: displayValue })
|
|
25327
25350
|
] })
|
|
25328
25351
|
] });
|
|
25329
25352
|
}
|