@mastra/server 1.78.0-alpha.5 → 1.78.0-alpha.7
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/dist/{agents-CKSEPpk1.cjs → agents-D9vpLghy.cjs} +8 -1
- package/dist/{agents-CKSEPpk1.cjs.map → agents-D9vpLghy.cjs.map} +1 -1
- package/dist/{agents-CW_JJZOf.js → agents-DNWDET4U.js} +3 -2
- package/dist/{agents-CW_JJZOf.js.map → agents-DNWDET4U.js.map} +1 -1
- package/dist/{api-schema-manifest-7Mkcahcz.cjs → api-schema-manifest-CmnpeFqd.cjs} +2 -2
- package/dist/{api-schema-manifest-7Mkcahcz.cjs.map → api-schema-manifest-CmnpeFqd.cjs.map} +1 -1
- package/dist/{api-schema-manifest-BSc3N7kx.js → api-schema-manifest-D8dn-tBo.js} +2 -2
- package/dist/{api-schema-manifest-BSc3N7kx.js.map → api-schema-manifest-D8dn-tBo.js.map} +1 -1
- package/dist/{background-tasks-Cu89GYC6.cjs → background-tasks-CP6TSFhc.cjs} +2 -2
- package/dist/{background-tasks-Cu89GYC6.cjs.map → background-tasks-CP6TSFhc.cjs.map} +1 -1
- package/dist/{background-tasks-_e2S8LLH.js → background-tasks-Clbud7G4.js} +2 -2
- package/dist/{background-tasks-_e2S8LLH.js.map → background-tasks-Clbud7G4.js.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-server-routes.md +3 -0
- package/dist/{editor-builder-CmUsqdZq.cjs → editor-builder-BOmAPurW.cjs} +2 -2
- package/dist/{editor-builder-CmUsqdZq.cjs.map → editor-builder-BOmAPurW.cjs.map} +1 -1
- package/dist/{editor-builder-DHXbVwxu.js → editor-builder-CeLVu_FT.js} +2 -2
- package/dist/{editor-builder-DHXbVwxu.js.map → editor-builder-CeLVu_FT.js.map} +1 -1
- package/dist/{editor-builder-CYkaYf6-.js → editor-builder-DHqCWGd2.js} +2 -2
- package/dist/{editor-builder-CYkaYf6-.js.map → editor-builder-DHqCWGd2.js.map} +1 -1
- package/dist/{editor-builder-BtcTQbAC.cjs → editor-builder-DqHKoEDx.cjs} +2 -2
- package/dist/{editor-builder-BtcTQbAC.cjs.map → editor-builder-DqHKoEDx.cjs.map} +1 -1
- package/dist/{routes-BOpfBZw5.cjs → routes-BwzE4nnm.cjs} +6 -5
- package/dist/routes-BwzE4nnm.cjs.map +1 -0
- package/dist/{routes-CccVLchZ.js → routes-DlbTsFpA.js} +7 -6
- package/dist/routes-DlbTsFpA.js.map +1 -0
- package/dist/{schedules-6XpznRPz.js → schedules-BRdVmFYi.js} +2 -2
- package/dist/{schedules-6XpznRPz.js.map → schedules-BRdVmFYi.js.map} +1 -1
- package/dist/{schedules-BiqVrJH7.cjs → schedules-DvLXX2nW.cjs} +2 -2
- package/dist/{schedules-BiqVrJH7.cjs.map → schedules-DvLXX2nW.cjs.map} +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agent-controller.cjs +1 -1
- package/dist/server/handlers/agent-controller.js +1 -1
- package/dist/server/handlers/agents.cjs +39 -10
- package/dist/server/handlers/agents.cjs.map +1 -1
- package/dist/server/handlers/agents.d.ts +2113 -0
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +39 -11
- package/dist/server/handlers/agents.js.map +1 -1
- package/dist/server/handlers/background-tasks.cjs +1 -1
- package/dist/server/handlers/background-tasks.js +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/logs.cjs +1 -1
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/memory.cjs +1 -1
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/plans.cjs +2 -2
- package/dist/server/handlers/plans.js +2 -2
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/responses.storage.cjs +1 -1
- package/dist/server/handlers/responses.storage.js +1 -1
- package/dist/server/handlers/schedules.cjs +1 -1
- package/dist/server/handlers/schedules.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +1 -1
- package/dist/server/handlers/stored-agent-favorites.js +1 -1
- package/dist/server/handlers/stored-agents.cjs +1 -1
- package/dist/server/handlers/stored-agents.js +1 -1
- package/dist/server/handlers/stored-skill-favorites.cjs +1 -1
- package/dist/server/handlers/stored-skill-favorites.js +1 -1
- package/dist/server/handlers/stored-skills.cjs +1 -1
- package/dist/server/handlers/stored-skills.js +1 -1
- package/dist/server/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/tools.cjs +2 -2
- package/dist/server/handlers/tools.js +2 -2
- package/dist/server/handlers/utils.cjs +1 -1
- package/dist/server/handlers/utils.d.ts +14 -3
- package/dist/server/handlers/utils.d.ts.map +1 -1
- package/dist/server/handlers/utils.js +1 -1
- package/dist/server/handlers/workflow-builder.cjs +1 -1
- package/dist/server/handlers/workflow-builder.js +1 -1
- package/dist/server/handlers/workflows.cjs +37 -20
- package/dist/server/handlers/workflows.cjs.map +1 -1
- package/dist/server/handlers/workflows.d.ts.map +1 -1
- package/dist/server/handlers/workflows.js +37 -20
- package/dist/server/handlers/workflows.js.map +1 -1
- package/dist/server/schemas/agents.d.ts +199 -0
- package/dist/server/schemas/agents.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +3 -2
- package/dist/server/schemas/index.js +3 -3
- package/dist/server/server-adapter/index.cjs +1 -1
- package/dist/server/server-adapter/index.js +1 -1
- package/dist/server/server-adapter/routes/agents.d.ts +2 -1
- package/dist/server/server-adapter/routes/agents.d.ts.map +1 -1
- package/dist/{utils-BF2Kbju4.cjs → utils-DdGLbkOl.cjs} +21 -5
- package/dist/{utils-BF2Kbju4.cjs.map → utils-DdGLbkOl.cjs.map} +1 -1
- package/dist/{utils-GVYTDbr2.js → utils-mIFmRM_j.js} +21 -5
- package/dist/{utils-GVYTDbr2.js.map → utils-mIFmRM_j.js.map} +1 -1
- package/dist/{workflow-builder-UVflLOfv.cjs → workflow-builder-BM6Nen0q.cjs} +4 -4
- package/dist/{workflow-builder-UVflLOfv.cjs.map → workflow-builder-BM6Nen0q.cjs.map} +1 -1
- package/dist/{workflow-builder-U2jFH8o7.js → workflow-builder-BnKKH8iT.js} +4 -4
- package/dist/{workflow-builder-U2jFH8o7.js.map → workflow-builder-BnKKH8iT.js.map} +1 -1
- package/package.json +6 -6
- package/dist/routes-BOpfBZw5.cjs.map +0 -1
- package/dist/routes-CccVLchZ.js.map +0 -1
|
@@ -1592,6 +1592,205 @@ export declare const queueAgentMessageBodySchema: z.ZodUnion<readonly [z.ZodObje
|
|
|
1592
1592
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1593
1593
|
}, z.core.$strip>]>;
|
|
1594
1594
|
}, z.core.$strip>]>;
|
|
1595
|
+
export declare const queueAgentSignalBodySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1596
|
+
ifActive: z.ZodOptional<z.ZodObject<{
|
|
1597
|
+
behavior: z.ZodOptional<z.ZodEnum<{
|
|
1598
|
+
deliver: "deliver";
|
|
1599
|
+
discard: "discard";
|
|
1600
|
+
persist: "persist";
|
|
1601
|
+
}>>;
|
|
1602
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1603
|
+
}, z.core.$strip>>;
|
|
1604
|
+
runId: z.ZodString;
|
|
1605
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
1606
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
1607
|
+
ifIdle: z.ZodOptional<z.ZodUndefined>;
|
|
1608
|
+
signal: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1609
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1610
|
+
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
1611
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
1612
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1613
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
1614
|
+
contents: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1615
|
+
type: z.ZodLiteral<"text">;
|
|
1616
|
+
text: z.ZodString;
|
|
1617
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1618
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1619
|
+
type: z.ZodLiteral<"file">;
|
|
1620
|
+
data: z.ZodString;
|
|
1621
|
+
mediaType: z.ZodString;
|
|
1622
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1623
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1624
|
+
}, z.core.$strip>]>>]>;
|
|
1625
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1626
|
+
type: z.ZodLiteral<"state">;
|
|
1627
|
+
transient: z.ZodOptional<z.ZodNever>;
|
|
1628
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1629
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
1631
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
1632
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1633
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
1634
|
+
contents: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1635
|
+
type: z.ZodLiteral<"text">;
|
|
1636
|
+
text: z.ZodString;
|
|
1637
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1638
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1639
|
+
type: z.ZodLiteral<"file">;
|
|
1640
|
+
data: z.ZodString;
|
|
1641
|
+
mediaType: z.ZodString;
|
|
1642
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1644
|
+
}, z.core.$strip>]>>]>;
|
|
1645
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1646
|
+
type: z.ZodEnum<{
|
|
1647
|
+
notification: "notification";
|
|
1648
|
+
reactive: "reactive";
|
|
1649
|
+
"system-reminder": "system-reminder";
|
|
1650
|
+
user: "user";
|
|
1651
|
+
"user-message": "user-message";
|
|
1652
|
+
}>;
|
|
1653
|
+
transient: z.ZodOptional<z.ZodBoolean>;
|
|
1654
|
+
}, z.core.$strip>], "type">;
|
|
1655
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1656
|
+
ifActive: z.ZodOptional<z.ZodObject<{
|
|
1657
|
+
behavior: z.ZodOptional<z.ZodEnum<{
|
|
1658
|
+
deliver: "deliver";
|
|
1659
|
+
discard: "discard";
|
|
1660
|
+
persist: "persist";
|
|
1661
|
+
}>>;
|
|
1662
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1663
|
+
}, z.core.$strip>>;
|
|
1664
|
+
runId: z.ZodOptional<z.ZodUndefined>;
|
|
1665
|
+
resourceId: z.ZodString;
|
|
1666
|
+
threadId: z.ZodString;
|
|
1667
|
+
ifIdle: z.ZodOptional<z.ZodObject<{
|
|
1668
|
+
behavior: z.ZodOptional<z.ZodEnum<{
|
|
1669
|
+
discard: "discard";
|
|
1670
|
+
persist: "persist";
|
|
1671
|
+
wake: "wake";
|
|
1672
|
+
}>>;
|
|
1673
|
+
streamOptions: z.ZodOptional<z.ZodObject<{
|
|
1674
|
+
instructions: z.ZodOptional<z.ZodType<SystemMessage, unknown, z.core.$ZodTypeInternals<SystemMessage, unknown>>>;
|
|
1675
|
+
system: z.ZodOptional<z.ZodType<SystemMessage, unknown, z.core.$ZodTypeInternals<SystemMessage, unknown>>>;
|
|
1676
|
+
context: z.ZodOptional<z.ZodArray<z.ZodType<import("@mastra/core/agent/message-list").MessageInput, unknown, z.core.$ZodTypeInternals<import("@mastra/core/agent/message-list").MessageInput, unknown>>>>;
|
|
1677
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
1678
|
+
thread: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1679
|
+
id: z.ZodString;
|
|
1680
|
+
}, z.core.$loose>]>;
|
|
1681
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1682
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1683
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1684
|
+
}, z.core.$strip>>;
|
|
1685
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1686
|
+
savePerStep: z.ZodOptional<z.ZodBoolean>;
|
|
1687
|
+
requestContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1688
|
+
versions: z.ZodOptional<z.ZodObject<{
|
|
1689
|
+
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
1690
|
+
versionId: z.ZodString;
|
|
1691
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1692
|
+
status: z.ZodEnum<{
|
|
1693
|
+
draft: "draft";
|
|
1694
|
+
published: "published";
|
|
1695
|
+
}>;
|
|
1696
|
+
}, z.core.$strip>]>>>;
|
|
1697
|
+
defaultStatus: z.ZodOptional<z.ZodEnum<{
|
|
1698
|
+
draft: "draft";
|
|
1699
|
+
published: "published";
|
|
1700
|
+
}>>;
|
|
1701
|
+
}, z.core.$strip>>;
|
|
1702
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
1703
|
+
stopWhen: z.ZodOptional<z.ZodType<StopConditionArg[] | StopConditionArg, unknown, z.core.$ZodTypeInternals<StopConditionArg[] | StopConditionArg, unknown>>>;
|
|
1704
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1705
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1706
|
+
modelSettings: z.ZodOptional<z.ZodType<ModelSettings, unknown, z.core.$ZodTypeInternals<ModelSettings, unknown>>>;
|
|
1707
|
+
activeTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1708
|
+
toolsets: z.ZodOptional<z.ZodType<ToolsetsInput, unknown, z.core.$ZodTypeInternals<ToolsetsInput, unknown>>>;
|
|
1709
|
+
clientTools: z.ZodOptional<z.ZodType<ToolsInput, unknown, z.core.$ZodTypeInternals<ToolsInput, unknown>>>;
|
|
1710
|
+
toolChoice: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1711
|
+
auto: "auto";
|
|
1712
|
+
none: "none";
|
|
1713
|
+
required: "required";
|
|
1714
|
+
}>, z.ZodObject<{
|
|
1715
|
+
type: z.ZodLiteral<"tool">;
|
|
1716
|
+
toolName: z.ZodString;
|
|
1717
|
+
}, z.core.$strip>]>>;
|
|
1718
|
+
requireToolApproval: z.ZodOptional<z.ZodBoolean>;
|
|
1719
|
+
scorers: z.ZodOptional<z.ZodType<Record<string, {
|
|
1720
|
+
scorer: string;
|
|
1721
|
+
sampling?: ScoringSamplingConfig;
|
|
1722
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
1723
|
+
scorer: string;
|
|
1724
|
+
sampling?: ScoringSamplingConfig;
|
|
1725
|
+
}>, unknown>>>;
|
|
1726
|
+
returnScorerData: z.ZodOptional<z.ZodBoolean>;
|
|
1727
|
+
tracingOptions: z.ZodOptional<z.ZodObject<{
|
|
1728
|
+
rootSpanName: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1730
|
+
requestContextKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1731
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
1732
|
+
parentSpanId: z.ZodOptional<z.ZodString>;
|
|
1733
|
+
nestUnderParent: z.ZodOptional<z.ZodBoolean>;
|
|
1734
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1735
|
+
hideInput: z.ZodOptional<z.ZodBoolean>;
|
|
1736
|
+
hideOutput: z.ZodOptional<z.ZodBoolean>;
|
|
1737
|
+
}, z.core.$strip>>;
|
|
1738
|
+
output: z.ZodOptional<z.ZodType<OutputType, unknown, z.core.$ZodTypeInternals<OutputType, unknown>>>;
|
|
1739
|
+
structuredOutput: z.ZodOptional<z.ZodType<PublicStructuredOutputOptions<Record<string, unknown>>, unknown, z.core.$ZodTypeInternals<PublicStructuredOutputOptions<Record<string, unknown>>, unknown>>>;
|
|
1740
|
+
untilIdle: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1741
|
+
maxIdleMs: z.ZodOptional<z.ZodNumber>;
|
|
1742
|
+
}, z.core.$strip>]>>;
|
|
1743
|
+
}, z.core.$loose>>;
|
|
1744
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1745
|
+
}, z.core.$strip>>;
|
|
1746
|
+
signal: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1747
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1748
|
+
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
1749
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
1750
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1751
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
1752
|
+
contents: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1753
|
+
type: z.ZodLiteral<"text">;
|
|
1754
|
+
text: z.ZodString;
|
|
1755
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1756
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1757
|
+
type: z.ZodLiteral<"file">;
|
|
1758
|
+
data: z.ZodString;
|
|
1759
|
+
mediaType: z.ZodString;
|
|
1760
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1761
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1762
|
+
}, z.core.$strip>]>>]>;
|
|
1763
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1764
|
+
type: z.ZodLiteral<"state">;
|
|
1765
|
+
transient: z.ZodOptional<z.ZodNever>;
|
|
1766
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1767
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1768
|
+
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
1769
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
1770
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>>;
|
|
1771
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
1772
|
+
contents: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1773
|
+
type: z.ZodLiteral<"text">;
|
|
1774
|
+
text: z.ZodString;
|
|
1775
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1776
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1777
|
+
type: z.ZodLiteral<"file">;
|
|
1778
|
+
data: z.ZodString;
|
|
1779
|
+
mediaType: z.ZodString;
|
|
1780
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1781
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1782
|
+
}, z.core.$strip>]>>]>;
|
|
1783
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
|
|
1784
|
+
type: z.ZodEnum<{
|
|
1785
|
+
notification: "notification";
|
|
1786
|
+
reactive: "reactive";
|
|
1787
|
+
"system-reminder": "system-reminder";
|
|
1788
|
+
user: "user";
|
|
1789
|
+
"user-message": "user-message";
|
|
1790
|
+
}>;
|
|
1791
|
+
transient: z.ZodOptional<z.ZodBoolean>;
|
|
1792
|
+
}, z.core.$strip>], "type">;
|
|
1793
|
+
}, z.core.$strip>]>;
|
|
1595
1794
|
export declare const subscribeAgentThreadBodySchema: z.ZodObject<{
|
|
1596
1795
|
resourceId: z.ZodOptional<z.ZodString>;
|
|
1597
1796
|
threadId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/server/schemas/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,aAAa,EACb,UAAU,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA/Ve,MAAM;2BAAa,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA+V3B,CAAC;AAOpE,eAAO,MAAM,8BAA8B;;;;;;iBAKzC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;iBAG9C,CAAC;AAEH,eAAO,MAAM,uCAAuC;;iBAElD,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAUrC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,cAAc,CAAC"}
|
|
@@ -5,7 +5,7 @@ const require_workflows = require("../../workflows-C8rDpHyY.cjs");
|
|
|
5
5
|
const require_agent_builder = require("../../agent-builder-DDYdQvlQ.cjs");
|
|
6
6
|
const require_default_options = require("../../default-options-C7tykjLq.cjs");
|
|
7
7
|
const require_routes = require("../../routes-BULZI-PU.cjs");
|
|
8
|
-
const require_agents = require("../../agents-
|
|
8
|
+
const require_agents = require("../../agents-D9vpLghy.cjs");
|
|
9
9
|
const require_stored_agents = require("../../stored-agents-BTL-o6aM.cjs");
|
|
10
10
|
const require_rule_group = require("../../rule-group-Hyn4rN52.cjs");
|
|
11
11
|
const require_stored_workspaces = require("../../stored-workspaces-DSfChCJ0.cjs");
|
|
@@ -24,7 +24,7 @@ const require_vectors = require("../../vectors-LFI1jch0.cjs");
|
|
|
24
24
|
const require_version_common = require("../../version-common-DrzXq7Ct.cjs");
|
|
25
25
|
const require_agent_versions = require("../../agent-versions-CzXJWn1T.cjs");
|
|
26
26
|
const require_datasets = require("../../datasets-BdD8JWhx.cjs");
|
|
27
|
-
const require_editor_builder = require("../../editor-builder-
|
|
27
|
+
const require_editor_builder = require("../../editor-builder-DqHKoEDx.cjs");
|
|
28
28
|
const require_mcp_client_versions = require("../../mcp-client-versions-Cq97zXiK.cjs");
|
|
29
29
|
const require_processor_providers = require("../../processor-providers-DHvTA9AL.cjs");
|
|
30
30
|
const require_processors = require("../../processors-80HWq8nr.cjs");
|
|
@@ -386,6 +386,7 @@ exports.publishStoredSkillResponseSchema = require_stored_skills.publishStoredSk
|
|
|
386
386
|
exports.queryVectorsBodySchema = require_vectors.queryVectorsBodySchema;
|
|
387
387
|
exports.queryVectorsResponseSchema = require_vectors.queryVectorsResponseSchema;
|
|
388
388
|
exports.queueAgentMessageBodySchema = require_agents.queueAgentMessageBodySchema;
|
|
389
|
+
exports.queueAgentSignalBodySchema = require_agents.queueAgentSignalBodySchema;
|
|
389
390
|
exports.readSkillOrigin = require_stored_skills.readSkillOrigin;
|
|
390
391
|
exports.recoverBodySchema = require_agents.recoverBodySchema;
|
|
391
392
|
exports.refreshResponseSchema = require_auth.refreshResponseSchema;
|
|
@@ -3,7 +3,7 @@ import { b as workflowRunResultSchema, c as sendWorkflowRunEventBodySchema, g as
|
|
|
3
3
|
import { a as streamAgentBuilderBodySchema, i as startAsyncAgentBuilderBodySchema, n as actionRunPathParams, o as streamLegacyAgentBuilderBodySchema, r as resumeAgentBuilderBodySchema, t as actionIdPathParams } from "../../agent-builder-B8kc4OBs.js";
|
|
4
4
|
import { t as defaultOptionsSchema } from "../../default-options-oSlrqpuP.js";
|
|
5
5
|
import { c as generateSpeechBodySchema, d as transcribeSpeechBodySchema, f as transcribeSpeechResponseSchema, l as getListenerResponseSchema, p as voiceSpeakersResponseSchema, u as speakResponseSchema } from "../../routes-Dl6_kWm7.js";
|
|
6
|
-
import { $ as
|
|
6
|
+
import { $ as toolIdPathParams, A as observeAgentResponseSchema, B as sendAgentSignalBodySchema, C as listAgentsResponseSchema, D as modelConfigIdPathParams, E as listToolsResponseSchema, F as recoverBodySchema, G as serializedAgentWithIdSchema, H as sendToolApprovalResponseSchema, I as reorderAgentModelListBodySchema, J as serializedWorkflowSchema, K as serializedProcessorSchema$1, L as resumeStreamBodySchema, M as providersResponseSchema, N as queueAgentMessageBodySchema, O as modelManagementResponseSchema, P as queueAgentSignalBodySchema, Q as toolCallResponseSchema, R as resumeStreamUntilIdleBodySchema, S as generateResponseSchema, T as listSuspendedRunsResponseSchema, U as serializedAgentDefinitionSchema, V as sendToolApprovalBodySchema, W as serializedAgentSchema, X as streamUntilIdleBodySchema, Y as streamResponseSchema, Z as subscribeAgentThreadBodySchema, _ as enhanceInstructionsBodySchema, a as agentIdPathParams, b as executeToolContextBodySchema, c as agentSkillPathParams, d as approveNetworkToolCallBodySchema, et as updateAgentModelBodySchema, f as approveToolCallBodySchema, g as declineToolCallBodySchema, h as declineNetworkToolCallBodySchema, i as agentExecutionLegacyBodySchema, j as providerSchema, k as observeAgentBodySchema, l as agentToolPathParams, m as cancelPendingAgentSignalsResponseSchema, n as abortAgentThreadResponseSchema, o as agentPlanQuerySchema, p as cancelPendingAgentSignalsBodySchema, q as serializedToolSchema, r as agentExecutionBodySchema$1, s as agentPlanResponseSchema, t as abortAgentThreadBodySchema, tt as updateAgentModelInModelListBodySchema, u as agentVersionQuerySchema, v as enhanceInstructionsResponseSchema, w as listSuspendedRunsQuerySchema, x as executeToolResponseSchema, y as executeToolBodySchema, z as sendAgentMessageBodySchema } from "../../agents-DNWDET4U.js";
|
|
7
7
|
import { A as semanticRecallSchema, C as storedAgentIdPathParams, D as toolsConfigSchema, E as toolConfigSchema, F as serializedReflectionConfigSchema, I as storedMemoryRefSchema, L as titleGenerationSchema, M as serializedObservationConfigSchema, N as serializedObservationalMemoryConfigObjectSchema, O as updateStoredAgentBodySchema, P as serializedObservationalMemoryConfigSchema, S as snapshotConfigSchema, T as storedProcessorGraphSchema, _ as processorGraphEntrySchema, a as exportStoredAgentBodySchema, b as resolvedAuthorSchema, c as getStoredAgentResponseSchema, d as listStoredAgentsResponseSchema, f as modelConfigSchema, g as previewInstructionsResponseSchema, h as previewInstructionsBodySchema, i as deleteStoredAgentResponseSchema, j as serializedMemoryConfigSchema, k as updateStoredAgentResponseSchema, l as instructionsSchema, m as openStoredAgentChangeRequestResponseSchema, n as createStoredAgentBodySchema, o as exportStoredAgentResponseSchema, p as openStoredAgentChangeRequestBodySchema, r as createStoredAgentResponseSchema, s as getStoredAgentDependentsResponseSchema, t as conditionalFieldSchema, u as listStoredAgentsQuerySchema, v as processorGraphStepSchema, w as storedAgentSchema, x as scorerConfigSchema, y as processorPhaseSchema } from "../../stored-agents-BtaEzKfr.js";
|
|
8
8
|
import { n as ruleSchema, t as ruleGroupSchema } from "../../rule-group-C5eydl98.js";
|
|
9
9
|
import { a as listStoredWorkspacesQuerySchema, c as storedWorkspaceIdPathParams, d as updateStoredWorkspaceResponseSchema, i as getStoredWorkspaceResponseSchema, l as storedWorkspaceSchema, n as createStoredWorkspaceResponseSchema, o as listStoredWorkspacesResponseSchema, r as deleteStoredWorkspaceResponseSchema, s as snapshotConfigSchema$1, t as createStoredWorkspaceBodySchema, u as updateStoredWorkspaceBodySchema } from "../../stored-workspaces-AkC68rSw.js";
|
|
@@ -22,7 +22,7 @@ import { a as listEmbeddersResponseSchema, c as queryVectorsBodySchema, d as ups
|
|
|
22
22
|
import { a as createVersionBodySchema, c as versionDiffEntrySchema, i as createListVersionsResponseSchema, l as versionOrderBySchema, n as compareVersionsQuerySchema, o as deleteVersionResponseSchema, r as createCompareVersionsResponseSchema, s as listVersionsQuerySchema, t as activateVersionResponseSchema } from "../../version-common-4xFzvCS5.js";
|
|
23
23
|
import { a as getVersionResponseSchema, c as versionIdPathParams, i as createVersionResponseSchema, n as agentVersionSchema, o as listVersionsResponseSchema, r as compareVersionsResponseSchema, s as restoreVersionResponseSchema, t as agentVersionPathParams } from "../../agent-versions-W600H1ME.js";
|
|
24
24
|
import { A as listDatasetVersionsResponseSchema, B as paginationQuerySchema, C as experimentResultResponseSchema, D as generateItemsResponseSchema, E as generateItemsBodySchema, F as listExperimentsQuerySchema, G as scorerResultSchema, H as runExperimentItemBodySchema, I as listExperimentsResponseSchema, J as triggerExperimentBodySchema, K as submitExperimentResultBodySchema, L as listItemVersionsResponseSchema, M as listDatasetsResponseSchema, N as listExperimentResultsQuerySchema, O as itemIdPathParams, P as listExperimentResultsResponseSchema, Q as updateItemBodySchema, R as listItemsQuerySchema, S as experimentResultIdPathParams, T as experimentSummaryResponseSchema, U as runExperimentItemResponseSchema, V as reviewSummaryResponseSchema, W as scorerExperimentOutputSchema, X as updateExperimentBodySchema, Y as updateDatasetBodySchema, Z as updateExperimentResultBodySchema, _ as datasetItemVersionPathParams, a as batchInsertItemsBodySchema, b as experimentIdPathParams, c as clusterFailuresResponseSchema, d as createDatasetBodySchema, f as datasetAndExperimentIdPathParams, g as datasetItemResponseSchema, h as datasetIdPathParams, i as batchDeleteItemsResponseSchema, j as listDatasetsQuerySchema, k as itemVersionResponseSchema, l as compareExperimentsBodySchema, m as datasetExperimentAndItemIdPathParams, n as agentExperimentOutputSchema, o as batchInsertItemsResponseSchema, p as datasetAndItemIdPathParams, q as tenancyQuerySchema, r as batchDeleteItemsBodySchema, s as clusterFailuresBodySchema, t as addItemBodySchema, u as comparisonResponseSchema, v as datasetResponseSchema, w as experimentReviewCountsSchema, x as experimentResponseSchema, y as datasetVersionResponseSchema, z as listItemsResponseSchema } from "../../datasets-CKwh-k4I.js";
|
|
25
|
-
import { a as builderModelPolicySchema, c as defaultModelEntrySchema, d as providerModelEntrySchema, i as builderAvailableModelsResponseSchema, l as infrastructureStatusResponseSchema, n as agentFeaturesSchema, o as builderPickerSchema, r as agentModelsSchema, s as builderSettingsResponseSchema, t as agentConfigurationSchema, u as pickerAllowlistSchema } from "../../editor-builder-
|
|
25
|
+
import { a as builderModelPolicySchema, c as defaultModelEntrySchema, d as providerModelEntrySchema, i as builderAvailableModelsResponseSchema, l as infrastructureStatusResponseSchema, n as agentFeaturesSchema, o as builderPickerSchema, r as agentModelsSchema, s as builderSettingsResponseSchema, t as agentConfigurationSchema, u as pickerAllowlistSchema } from "../../editor-builder-DHqCWGd2.js";
|
|
26
26
|
import { a as createMCPClientVersionResponseSchema, c as listMCPClientVersionsQuerySchema, d as mcpClientVersionPathParams, f as mcpClientVersionSchema, i as createMCPClientVersionBodySchema, l as listMCPClientVersionsResponseSchema, n as compareMCPClientVersionsQuerySchema, o as deleteMCPClientVersionResponseSchema, p as restoreMCPClientVersionResponseSchema, r as compareMCPClientVersionsResponseSchema, s as getMCPClientVersionResponseSchema, t as activateMCPClientVersionResponseSchema, u as mcpClientVersionIdPathParams } from "../../mcp-client-versions-DxBkzcYH.js";
|
|
27
27
|
import { n as getProcessorProvidersResponseSchema, r as processorProviderIdPathParams, t as getProcessorProviderResponseSchema } from "../../processor-providers-DBhZC6-4.js";
|
|
28
28
|
import { a as processorIdPathParams, i as processorConfigurationSchema, n as executeProcessorResponseSchema, o as serializedProcessorDetailSchema, r as listProcessorsResponseSchema, s as serializedProcessorSchema, t as executeProcessorBodySchema } from "../../processors-33IULT8X.js";
|
|
@@ -32,4 +32,4 @@ import { a as listStoredMCPClientsQuerySchema, c as storedMCPClientSchema, i as
|
|
|
32
32
|
import { a as listStoredPromptBlocksQuerySchema, c as storedPromptBlockSchema, i as getStoredPromptBlockResponseSchema, l as updateStoredPromptBlockBodySchema, n as createStoredPromptBlockResponseSchema, o as listStoredPromptBlocksResponseSchema, r as deleteStoredPromptBlockResponseSchema, s as storedPromptBlockIdPathParams, t as createStoredPromptBlockBodySchema, u as updateStoredPromptBlockResponseSchema } from "../../stored-prompt-blocks-C7qmiWSB.js";
|
|
33
33
|
import { a as listStoredScorersQuerySchema, c as storedScorerSchema, i as getStoredScorerResponseSchema, l as updateStoredScorerBodySchema, n as createStoredScorerResponseSchema, o as listStoredScorersResponseSchema, r as deleteStoredScorerResponseSchema, s as storedScorerIdPathParams, t as createStoredScorerBodySchema, u as updateStoredScorerResponseSchema } from "../../stored-scorers-BSxh7JZX.js";
|
|
34
34
|
import { a as deleteStoredSkillResponseSchema, c as listStoredSkillsResponseSchema, d as readSkillOrigin, f as skillOriginSchema, g as updateStoredSkillResponseSchema, h as updateStoredSkillBodySchema, i as createStoredSkillResponseSchema, l as publishStoredSkillBodySchema, m as storedSkillSchema, n as buildOriginMetadata, o as getStoredSkillResponseSchema, p as storedSkillIdPathParams, r as createStoredSkillBodySchema, s as listStoredSkillsQuerySchema, t as SKILL_ORIGIN_METADATA_KEY, u as publishStoredSkillResponseSchema } from "../../stored-skills-DzW8hLnI.js";
|
|
35
|
-
export { SKILL_ORIGIN_METADATA_KEY, agentExecutionBodySchema as a2aAgentExecutionBodySchema, a2aAgentIdPathParams, a2aTaskPathParams, abortAgentThreadBodySchema, abortAgentThreadResponseSchema, actionIdPathParams, actionRunPathParams, activateMCPClientVersionResponseSchema, activatePromptBlockVersionResponseSchema, activateScorerVersionResponseSchema, activateVersionResponseSchema, addItemBodySchema, agentCardResponseSchema, agentConfigurationSchema, agentExecutionBodySchema$1 as agentExecutionBodySchema, agentExecutionLegacyBodySchema, agentExecutionResponseSchema, agentExperimentOutputSchema, agentFeaturesSchema, agentIdPathParams, agentIdQuerySchema, agentModelsSchema, agentPlanQuerySchema, agentPlanResponseSchema, agentSkillPathParams, agentToolPathParams, agentVersionPathParams, agentVersionQuerySchema, agentVersionSchema, apiSchemaManifestResponseSchema, apiSchemaManifestRouteSchema, apiSchemaResponseShapeSchema, approveNetworkToolCallBodySchema, approveToolCallBodySchema, authStatusToolProviderResponseSchema, authenticatedCapabilitiesSchema, authenticatedUserSchema, authorizeToolProviderBodySchema, authorizeToolProviderResponseSchema, awaitBufferStatusBodySchema, awaitBufferStatusResponseSchema, baseLogMessageSchema, batchDeleteItemsBodySchema, batchDeleteItemsResponseSchema, batchInsertItemsBodySchema, batchInsertItemsResponseSchema, buildOriginMetadata, builderAvailableModelsResponseSchema, builderModelPolicySchema, builderPickerSchema, builderSettingsResponseSchema, cancelPendingAgentSignalsBodySchema, cancelPendingAgentSignalsResponseSchema, capabilitiesResponseSchema, capabilityFlagsSchema, cloneThreadBodySchema, cloneThreadResponseSchema, clusterFailuresBodySchema, clusterFailuresResponseSchema, compareExperimentsBodySchema, compareMCPClientVersionsQuerySchema, compareMCPClientVersionsResponseSchema, comparePromptBlockVersionsQuerySchema, comparePromptBlockVersionsResponseSchema, compareScorerVersionsQuerySchema, compareScorerVersionsResponseSchema, compareVersionsQuerySchema, compareVersionsResponseSchema, comparisonResponseSchema, conditionalFieldSchema, connectionSchema, connectionScopeSchema, connectionStatusToolProviderBodySchema, connectionStatusToolProviderResponseSchema, connectionUsageQuerySchema, connectionUsageResponseSchema, conversationDeletedSchema, conversationIdPathParams, conversationItemMessageSchema, conversationItemSchema, conversationItemsListSchema, conversationMessageContentSchema, conversationObjectSchema, coreMessageSchema, createCombinedPaginationSchema, createCompareVersionsResponseSchema, createConversationBodySchema, createDatasetBodySchema, createIndexBodySchema, createIndexResponseSchema, createListVersionsResponseSchema, createMCPClientVersionBodySchema, createMCPClientVersionResponseSchema, createPagePaginationSchema, createPromptBlockVersionBodySchema, createPromptBlockVersionResponseSchema, createResponseBodySchema, createScorerVersionBodySchema, createScorerVersionResponseSchema, createStoredAgentBodySchema, createStoredAgentResponseSchema, createStoredMCPClientBodySchema, createStoredMCPClientResponseSchema, createStoredPromptBlockBodySchema, createStoredPromptBlockResponseSchema, createStoredScorerBodySchema, createStoredScorerResponseSchema, createStoredSkillBodySchema, createStoredSkillResponseSchema, createStoredWorkspaceBodySchema, createStoredWorkspaceResponseSchema, createThreadBodySchema, createThreadNetworkQuerySchema, createVersionBodySchema, createVersionResponseSchema, createWorkflowRunResponseSchema, credentialsResponseSchema, credentialsSignInBodySchema, credentialsSignUpBodySchema, currentUserResponseSchema, datasetAndExperimentIdPathParams, datasetAndItemIdPathParams, datasetExperimentAndItemIdPathParams, datasetIdPathParams, datasetItemResponseSchema, datasetItemVersionPathParams, datasetResponseSchema, datasetVersionResponseSchema, declineNetworkToolCallBodySchema, declineToolCallBodySchema, defaultModelEntrySchema, defaultOptionsSchema, deleteIndexResponseSchema, deleteMCPClientVersionResponseSchema, deleteMessagesBodySchema, deleteMessagesNetworkQuerySchema, deleteMessagesQuerySchema, deleteMessagesResponseSchema, deletePromptBlockVersionResponseSchema, deleteResponseSchema, deleteScorerVersionResponseSchema, deleteStoredAgentResponseSchema, deleteStoredMCPClientResponseSchema, deleteStoredPromptBlockResponseSchema, deleteStoredScorerResponseSchema, deleteStoredSkillResponseSchema, deleteStoredWorkspaceResponseSchema, deleteThreadNetworkQuerySchema, deleteThreadQuerySchema, deleteThreadResponseSchema, deleteVersionResponseSchema, describeIndexResponseSchema, disconnectConnectionQuerySchema, disconnectConnectionResponseSchema, editorSourceCapabilitiesSchema, editorSourceSchema, enhanceInstructionsBodySchema, enhanceInstructionsResponseSchema, entityPathParams, executeProcessorBodySchema, executeProcessorResponseSchema, executeToolBodySchema, executeToolContextBodySchema, executeToolResponseSchema, experimentIdPathParams, experimentResponseSchema, experimentResultIdPathParams, experimentResultResponseSchema, experimentReviewCountsSchema, experimentSummaryResponseSchema, exportStoredAgentBodySchema, exportStoredAgentResponseSchema, fileEntrySchema, filterSchema, fsDeleteQuerySchema, fsDeleteResponseSchema, fsListQuerySchema, fsListResponseSchema, fsMkdirBodySchema, fsMkdirResponseSchema, fsPathParams, fsReadQuerySchema, fsReadResponseSchema, fsStatQuerySchema, fsStatResponseSchema, fsWriteBodySchema, fsWriteResponseSchema, generateItemsBodySchema, generateItemsResponseSchema, generateResponseSchema, generateSpeechBodySchema, getAgentSkillResponseSchema, getListenerResponseSchema, getMCPClientVersionResponseSchema, getMcpServerDetailQuerySchema, getMemoryConfigQuerySchema, getMemoryStatusNetworkQuerySchema, getMemoryStatusQuerySchema, getObservationalMemoryQuerySchema, getObservationalMemoryResponseSchema, getProcessorProviderResponseSchema, getProcessorProvidersResponseSchema, getPromptBlockVersionResponseSchema, getScorerVersionResponseSchema, getSkillResponseSchema, getStoredAgentDependentsResponseSchema, getStoredAgentResponseSchema, getStoredMCPClientResponseSchema, getStoredPromptBlockResponseSchema, getStoredScorerResponseSchema, getStoredSkillResponseSchema, getStoredWorkspaceResponseSchema, getThreadByIdNetworkQuerySchema, getThreadByIdQuerySchema, getThreadByIdResponseSchema, getToolProviderToolSchemaResponseSchema, getVersionResponseSchema, getWorkingMemoryQuerySchema, getWorkingMemoryResponseSchema, includeSchema, indexBodySchema, indexResponseSchema, infrastructureStatusResponseSchema, instructionsSchema, itemIdPathParams, itemVersionResponseSchema, jsonRpcErrorSchema, listAgentsResponseSchema, listConnectionFieldsQuerySchema, listConnectionFieldsResponseSchema, listConnectionsQuerySchema, listConnectionsResponseSchema, listDatasetVersionsResponseSchema, listDatasetsQuerySchema, listDatasetsResponseSchema, listEmbeddersResponseSchema, listExperimentResultsQuerySchema, listExperimentResultsResponseSchema, listExperimentsQuerySchema, listExperimentsResponseSchema, listIndexesResponseSchema, listItemVersionsResponseSchema, listItemsQuerySchema, listItemsResponseSchema, listLogTransportsResponseSchema, listLogsQuerySchema, listLogsResponseSchema, listMCPClientVersionsQuerySchema, listMCPClientVersionsResponseSchema, listMcpServerToolsResponseSchema, listMcpServersQuerySchema, listMcpServersResponseSchema, listMessagesNetworkQuerySchema, listMessagesQuerySchema, listMessagesResponseSchema, listProcessorsResponseSchema, listPromptBlockVersionsQuerySchema, listPromptBlockVersionsResponseSchema, listReferencesResponseSchema, listScorerVersionsQuerySchema, listScorerVersionsResponseSchema, listScorersResponseSchema, listScoresByEntityIdQuerySchema, listScoresByRunIdQuerySchema, listScoresByScorerIdQuerySchema, listSkillsResponseSchema, listStoredAgentsQuerySchema, listStoredAgentsResponseSchema, listStoredMCPClientsQuerySchema, listStoredMCPClientsResponseSchema, listStoredPromptBlocksQuerySchema, listStoredPromptBlocksResponseSchema, listStoredScorersQuerySchema, listStoredScorersResponseSchema, listStoredSkillsQuerySchema, listStoredSkillsResponseSchema, listStoredWorkspacesQuerySchema, listStoredWorkspacesResponseSchema, listSuspendedRunsQuerySchema, listSuspendedRunsResponseSchema, listThreadsNetworkQuerySchema, listThreadsQuerySchema, listThreadsResponseSchema, listToolProviderToolkitsResponseSchema, listToolProviderToolsQuerySchema, listToolProviderToolsResponseSchema, listToolProvidersResponseSchema, listToolsResponseSchema, listVectorsResponseSchema, listVersionsQuerySchema, listVersionsResponseSchema, listWorkflowRunsQuerySchema, listWorkflowsResponseSchema, listWorkspacesResponseSchema, loginConfigSchema, logoutResponseSchema, mastraPackageSchema, mcpClientVersionIdPathParams, mcpClientVersionPathParams, mcpClientVersionSchema, executeToolBodySchema$1 as mcpExecuteToolBodySchema, executeToolResponseSchema$1 as mcpExecuteToolResponseSchema, mcpServerDetailPathParams, mcpServerIdPathParams, mcpServerToolPathParams, mcpToolInfoSchema, memoryConfigResponseSchema, memoryStatusResponseSchema, messageOrderBySchema, messageResponseSchema, messageSendBodySchema, modelConfigIdPathParams, modelConfigSchema, modelManagementResponseSchema, mountInfoSchema, observabilityDiscoveryCapabilitiesSchema, observabilityRuntimeStrategySchema, observabilityStorageCapabilitiesSchema, observeAgentBodySchema, observeAgentResponseSchema, openStoredAgentChangeRequestBodySchema, openStoredAgentChangeRequestResponseSchema, optionalAgentIdQuerySchema, optionalRunIdSchema, paginationInfoSchema, paginationNumber, paginationQuerySchema, partialQuerySchema, permissionPatternsResponseSchema, pickerAllowlistSchema, previewInstructionsBodySchema, previewInstructionsResponseSchema, processorConfigurationSchema, processorGraphEntrySchema, processorGraphStepSchema, processorIdPathParams, processorPhaseSchema, processorProviderIdPathParams, serializedProcessorSchema as processorSerializedSchema, promptBlockVersionIdPathParams, promptBlockVersionPathParams, promptBlockVersionSchema, providerModelEntrySchema, providerSchema, providersResponseSchema, publicCapabilitiesSchema, publishStoredSkillBodySchema, publishStoredSkillResponseSchema, queryVectorsBodySchema, queryVectorsResponseSchema, queueAgentMessageBodySchema, readSkillOrigin, recoverBodySchema, refreshResponseSchema, reorderAgentModelListBodySchema, resolvedAuthorSchema, responseIdPathParams, responseInputMessageSchema, responseInputTextContentSchema, responseInputTextPartSchema, responseObjectSchema, responseOutputFunctionCallOutputSchema, responseOutputFunctionCallSchema, responseOutputItemSchema, responseOutputMessageSchema, responseOutputTextSchema, responseTextFormatSchema, responseToolSchema, responseUsageSchema, restoreMCPClientVersionResponseSchema, restorePromptBlockVersionResponseSchema, restoreScorerVersionResponseSchema, restoreVersionResponseSchema, resumeAgentBuilderBodySchema, resumeStreamBodySchema, resumeStreamUntilIdleBodySchema, reviewSummaryResponseSchema, ruleGroupSchema, ruleSchema, runExperimentItemBodySchema, runExperimentItemResponseSchema, runIdSchema, saveMessagesBodySchema, saveMessagesNetworkQuerySchema, saveMessagesResponseSchema, saveScoreBodySchema, saveScoreResponseSchema, scorerConfigSchema, scorerEntrySchema, scorerExperimentOutputSchema, scorerIdPathParams, scorerResultSchema, scorerVersionIdPathParams, scorerVersionPathParams, scorerVersionSchema, scoresWithPaginationResponseSchema, searchMemoryQuerySchema, searchMemoryResponseSchema, searchQuerySchema, searchResponseSchema, searchResultSchema, searchSkillsQuerySchema, searchSkillsResponseSchema, semanticRecallSchema, sendAgentMessageBodySchema, sendAgentSignalBodySchema, sendToolApprovalBodySchema, sendToolApprovalResponseSchema, sendWorkflowRunEventBodySchema, serializedAgentDefinitionSchema, serializedAgentSchema, serializedAgentWithIdSchema, serializedMemoryConfigSchema, serializedObservationConfigSchema, serializedObservationalMemoryConfigObjectSchema, serializedObservationalMemoryConfigSchema, serializedProcessorDetailSchema, serializedProcessorSchema$1 as serializedProcessorSchema, serializedReflectionConfigSchema, serializedToolSchema, serializedWorkflowSchema, serverDetailSchema, serverInfoSchema, skillDisambiguationQuerySchema, skillMetadataSchema, skillMetadataWithPathSchema, skillNamePathParams, skillOriginSchema, skillReferencePathParams, skillReferenceResponseSchema, skillSchema, skillSearchResultSchema, skillSourceSchema, skillsShInstallBodySchema, skillsShInstallResponseSchema, skillsShListResponseSchema, skillsShPopularQuerySchema, skillsShPreviewQuerySchema, skillsShPreviewResponseSchema, skillsShRemoveBodySchema, skillsShRemoveResponseSchema, skillsShSearchQuerySchema, skillsShSearchResponseSchema, skillsShSkillSchema, skillsShSourceSchema, skillsShUpdateBodySchema, skillsShUpdateResponseSchema, snapshotConfigSchema, speakResponseSchema, ssoCallbackQuerySchema, ssoCallbackResponseSchema, ssoConfigSchema, ssoLoginQuerySchema, ssoLoginResponseSchema, startAsyncAgentBuilderBodySchema, statusQuerySchema, storedAgentIdPathParams, storedAgentSchema, storedMCPClientIdPathParams, storedMCPClientSchema, storedMemoryRefSchema, storedProcessorGraphSchema, storedPromptBlockIdPathParams, storedPromptBlockSchema, storedScorerIdPathParams, storedScorerSchema, storedSkillIdPathParams, storedSkillSchema, storedWorkspaceIdPathParams, storedWorkspaceSchema, streamAgentBuilderBodySchema, streamLegacyAgentBuilderBodySchema, streamResponseSchema, streamUntilIdleBodySchema, submitExperimentResultBodySchema, subscribeAgentThreadBodySchema, successResponseSchema, systemPackagesResponseSchema, taskQueryBodySchema, taskResponseSchema, tenancyQuerySchema, threadIdPathParams, titleGenerationSchema, toolCallResponseSchema, toolConfigSchema, toolIdPathParams, toolProviderAuthStatusPathParams, toolProviderConfigSchema, toolProviderConnectionPathParams, toolProviderHealthResponseSchema, toolProviderIdPathParams, toolProvidersSchema, toolSlugPathParams, toolsConfigSchema, tracingOptionsSchema, transcribeSpeechBodySchema, transcribeSpeechResponseSchema, transferThreadBodySchema, transferThreadResponseSchema, triggerExperimentBodySchema, typedPermissive, updateAgentModelBodySchema, updateAgentModelInModelListBodySchema, updateConnectionBodySchema, updateConnectionResponseSchema, updateDatasetBodySchema, updateExperimentBodySchema, updateExperimentResultBodySchema, updateItemBodySchema, updateStoredAgentBodySchema, updateStoredAgentResponseSchema, updateStoredMCPClientBodySchema, updateStoredMCPClientResponseSchema, updateStoredPromptBlockBodySchema, updateStoredPromptBlockResponseSchema, updateStoredScorerBodySchema, updateStoredScorerResponseSchema, updateStoredSkillBodySchema, updateStoredSkillResponseSchema, updateStoredWorkspaceBodySchema, updateStoredWorkspaceResponseSchema, updateThreadBodySchema, updateThreadNetworkQuerySchema, updateWorkingMemoryBodySchema, updateWorkingMemoryResponseSchema, upsertVectorsBodySchema, upsertVectorsResponseSchema, userAccessSchema, vectorIndexPathParams, vectorNamePathParams, versionDetailSchema, versionDiffEntrySchema, versionIdPathParams, versionOrderBySchema, voiceSpeakersResponseSchema, workflowControlResponseSchema, workflowExecutionResultSchema, workflowInfoSchema, workflowRunResultQuerySchema, workflowRunResultSchema, workflowRunsResponseSchema, workspaceIdPathParams, workspaceInfoResponseSchema, snapshotConfigSchema$1 as workspaceSnapshotConfigSchema };
|
|
35
|
+
export { SKILL_ORIGIN_METADATA_KEY, agentExecutionBodySchema as a2aAgentExecutionBodySchema, a2aAgentIdPathParams, a2aTaskPathParams, abortAgentThreadBodySchema, abortAgentThreadResponseSchema, actionIdPathParams, actionRunPathParams, activateMCPClientVersionResponseSchema, activatePromptBlockVersionResponseSchema, activateScorerVersionResponseSchema, activateVersionResponseSchema, addItemBodySchema, agentCardResponseSchema, agentConfigurationSchema, agentExecutionBodySchema$1 as agentExecutionBodySchema, agentExecutionLegacyBodySchema, agentExecutionResponseSchema, agentExperimentOutputSchema, agentFeaturesSchema, agentIdPathParams, agentIdQuerySchema, agentModelsSchema, agentPlanQuerySchema, agentPlanResponseSchema, agentSkillPathParams, agentToolPathParams, agentVersionPathParams, agentVersionQuerySchema, agentVersionSchema, apiSchemaManifestResponseSchema, apiSchemaManifestRouteSchema, apiSchemaResponseShapeSchema, approveNetworkToolCallBodySchema, approveToolCallBodySchema, authStatusToolProviderResponseSchema, authenticatedCapabilitiesSchema, authenticatedUserSchema, authorizeToolProviderBodySchema, authorizeToolProviderResponseSchema, awaitBufferStatusBodySchema, awaitBufferStatusResponseSchema, baseLogMessageSchema, batchDeleteItemsBodySchema, batchDeleteItemsResponseSchema, batchInsertItemsBodySchema, batchInsertItemsResponseSchema, buildOriginMetadata, builderAvailableModelsResponseSchema, builderModelPolicySchema, builderPickerSchema, builderSettingsResponseSchema, cancelPendingAgentSignalsBodySchema, cancelPendingAgentSignalsResponseSchema, capabilitiesResponseSchema, capabilityFlagsSchema, cloneThreadBodySchema, cloneThreadResponseSchema, clusterFailuresBodySchema, clusterFailuresResponseSchema, compareExperimentsBodySchema, compareMCPClientVersionsQuerySchema, compareMCPClientVersionsResponseSchema, comparePromptBlockVersionsQuerySchema, comparePromptBlockVersionsResponseSchema, compareScorerVersionsQuerySchema, compareScorerVersionsResponseSchema, compareVersionsQuerySchema, compareVersionsResponseSchema, comparisonResponseSchema, conditionalFieldSchema, connectionSchema, connectionScopeSchema, connectionStatusToolProviderBodySchema, connectionStatusToolProviderResponseSchema, connectionUsageQuerySchema, connectionUsageResponseSchema, conversationDeletedSchema, conversationIdPathParams, conversationItemMessageSchema, conversationItemSchema, conversationItemsListSchema, conversationMessageContentSchema, conversationObjectSchema, coreMessageSchema, createCombinedPaginationSchema, createCompareVersionsResponseSchema, createConversationBodySchema, createDatasetBodySchema, createIndexBodySchema, createIndexResponseSchema, createListVersionsResponseSchema, createMCPClientVersionBodySchema, createMCPClientVersionResponseSchema, createPagePaginationSchema, createPromptBlockVersionBodySchema, createPromptBlockVersionResponseSchema, createResponseBodySchema, createScorerVersionBodySchema, createScorerVersionResponseSchema, createStoredAgentBodySchema, createStoredAgentResponseSchema, createStoredMCPClientBodySchema, createStoredMCPClientResponseSchema, createStoredPromptBlockBodySchema, createStoredPromptBlockResponseSchema, createStoredScorerBodySchema, createStoredScorerResponseSchema, createStoredSkillBodySchema, createStoredSkillResponseSchema, createStoredWorkspaceBodySchema, createStoredWorkspaceResponseSchema, createThreadBodySchema, createThreadNetworkQuerySchema, createVersionBodySchema, createVersionResponseSchema, createWorkflowRunResponseSchema, credentialsResponseSchema, credentialsSignInBodySchema, credentialsSignUpBodySchema, currentUserResponseSchema, datasetAndExperimentIdPathParams, datasetAndItemIdPathParams, datasetExperimentAndItemIdPathParams, datasetIdPathParams, datasetItemResponseSchema, datasetItemVersionPathParams, datasetResponseSchema, datasetVersionResponseSchema, declineNetworkToolCallBodySchema, declineToolCallBodySchema, defaultModelEntrySchema, defaultOptionsSchema, deleteIndexResponseSchema, deleteMCPClientVersionResponseSchema, deleteMessagesBodySchema, deleteMessagesNetworkQuerySchema, deleteMessagesQuerySchema, deleteMessagesResponseSchema, deletePromptBlockVersionResponseSchema, deleteResponseSchema, deleteScorerVersionResponseSchema, deleteStoredAgentResponseSchema, deleteStoredMCPClientResponseSchema, deleteStoredPromptBlockResponseSchema, deleteStoredScorerResponseSchema, deleteStoredSkillResponseSchema, deleteStoredWorkspaceResponseSchema, deleteThreadNetworkQuerySchema, deleteThreadQuerySchema, deleteThreadResponseSchema, deleteVersionResponseSchema, describeIndexResponseSchema, disconnectConnectionQuerySchema, disconnectConnectionResponseSchema, editorSourceCapabilitiesSchema, editorSourceSchema, enhanceInstructionsBodySchema, enhanceInstructionsResponseSchema, entityPathParams, executeProcessorBodySchema, executeProcessorResponseSchema, executeToolBodySchema, executeToolContextBodySchema, executeToolResponseSchema, experimentIdPathParams, experimentResponseSchema, experimentResultIdPathParams, experimentResultResponseSchema, experimentReviewCountsSchema, experimentSummaryResponseSchema, exportStoredAgentBodySchema, exportStoredAgentResponseSchema, fileEntrySchema, filterSchema, fsDeleteQuerySchema, fsDeleteResponseSchema, fsListQuerySchema, fsListResponseSchema, fsMkdirBodySchema, fsMkdirResponseSchema, fsPathParams, fsReadQuerySchema, fsReadResponseSchema, fsStatQuerySchema, fsStatResponseSchema, fsWriteBodySchema, fsWriteResponseSchema, generateItemsBodySchema, generateItemsResponseSchema, generateResponseSchema, generateSpeechBodySchema, getAgentSkillResponseSchema, getListenerResponseSchema, getMCPClientVersionResponseSchema, getMcpServerDetailQuerySchema, getMemoryConfigQuerySchema, getMemoryStatusNetworkQuerySchema, getMemoryStatusQuerySchema, getObservationalMemoryQuerySchema, getObservationalMemoryResponseSchema, getProcessorProviderResponseSchema, getProcessorProvidersResponseSchema, getPromptBlockVersionResponseSchema, getScorerVersionResponseSchema, getSkillResponseSchema, getStoredAgentDependentsResponseSchema, getStoredAgentResponseSchema, getStoredMCPClientResponseSchema, getStoredPromptBlockResponseSchema, getStoredScorerResponseSchema, getStoredSkillResponseSchema, getStoredWorkspaceResponseSchema, getThreadByIdNetworkQuerySchema, getThreadByIdQuerySchema, getThreadByIdResponseSchema, getToolProviderToolSchemaResponseSchema, getVersionResponseSchema, getWorkingMemoryQuerySchema, getWorkingMemoryResponseSchema, includeSchema, indexBodySchema, indexResponseSchema, infrastructureStatusResponseSchema, instructionsSchema, itemIdPathParams, itemVersionResponseSchema, jsonRpcErrorSchema, listAgentsResponseSchema, listConnectionFieldsQuerySchema, listConnectionFieldsResponseSchema, listConnectionsQuerySchema, listConnectionsResponseSchema, listDatasetVersionsResponseSchema, listDatasetsQuerySchema, listDatasetsResponseSchema, listEmbeddersResponseSchema, listExperimentResultsQuerySchema, listExperimentResultsResponseSchema, listExperimentsQuerySchema, listExperimentsResponseSchema, listIndexesResponseSchema, listItemVersionsResponseSchema, listItemsQuerySchema, listItemsResponseSchema, listLogTransportsResponseSchema, listLogsQuerySchema, listLogsResponseSchema, listMCPClientVersionsQuerySchema, listMCPClientVersionsResponseSchema, listMcpServerToolsResponseSchema, listMcpServersQuerySchema, listMcpServersResponseSchema, listMessagesNetworkQuerySchema, listMessagesQuerySchema, listMessagesResponseSchema, listProcessorsResponseSchema, listPromptBlockVersionsQuerySchema, listPromptBlockVersionsResponseSchema, listReferencesResponseSchema, listScorerVersionsQuerySchema, listScorerVersionsResponseSchema, listScorersResponseSchema, listScoresByEntityIdQuerySchema, listScoresByRunIdQuerySchema, listScoresByScorerIdQuerySchema, listSkillsResponseSchema, listStoredAgentsQuerySchema, listStoredAgentsResponseSchema, listStoredMCPClientsQuerySchema, listStoredMCPClientsResponseSchema, listStoredPromptBlocksQuerySchema, listStoredPromptBlocksResponseSchema, listStoredScorersQuerySchema, listStoredScorersResponseSchema, listStoredSkillsQuerySchema, listStoredSkillsResponseSchema, listStoredWorkspacesQuerySchema, listStoredWorkspacesResponseSchema, listSuspendedRunsQuerySchema, listSuspendedRunsResponseSchema, listThreadsNetworkQuerySchema, listThreadsQuerySchema, listThreadsResponseSchema, listToolProviderToolkitsResponseSchema, listToolProviderToolsQuerySchema, listToolProviderToolsResponseSchema, listToolProvidersResponseSchema, listToolsResponseSchema, listVectorsResponseSchema, listVersionsQuerySchema, listVersionsResponseSchema, listWorkflowRunsQuerySchema, listWorkflowsResponseSchema, listWorkspacesResponseSchema, loginConfigSchema, logoutResponseSchema, mastraPackageSchema, mcpClientVersionIdPathParams, mcpClientVersionPathParams, mcpClientVersionSchema, executeToolBodySchema$1 as mcpExecuteToolBodySchema, executeToolResponseSchema$1 as mcpExecuteToolResponseSchema, mcpServerDetailPathParams, mcpServerIdPathParams, mcpServerToolPathParams, mcpToolInfoSchema, memoryConfigResponseSchema, memoryStatusResponseSchema, messageOrderBySchema, messageResponseSchema, messageSendBodySchema, modelConfigIdPathParams, modelConfigSchema, modelManagementResponseSchema, mountInfoSchema, observabilityDiscoveryCapabilitiesSchema, observabilityRuntimeStrategySchema, observabilityStorageCapabilitiesSchema, observeAgentBodySchema, observeAgentResponseSchema, openStoredAgentChangeRequestBodySchema, openStoredAgentChangeRequestResponseSchema, optionalAgentIdQuerySchema, optionalRunIdSchema, paginationInfoSchema, paginationNumber, paginationQuerySchema, partialQuerySchema, permissionPatternsResponseSchema, pickerAllowlistSchema, previewInstructionsBodySchema, previewInstructionsResponseSchema, processorConfigurationSchema, processorGraphEntrySchema, processorGraphStepSchema, processorIdPathParams, processorPhaseSchema, processorProviderIdPathParams, serializedProcessorSchema as processorSerializedSchema, promptBlockVersionIdPathParams, promptBlockVersionPathParams, promptBlockVersionSchema, providerModelEntrySchema, providerSchema, providersResponseSchema, publicCapabilitiesSchema, publishStoredSkillBodySchema, publishStoredSkillResponseSchema, queryVectorsBodySchema, queryVectorsResponseSchema, queueAgentMessageBodySchema, queueAgentSignalBodySchema, readSkillOrigin, recoverBodySchema, refreshResponseSchema, reorderAgentModelListBodySchema, resolvedAuthorSchema, responseIdPathParams, responseInputMessageSchema, responseInputTextContentSchema, responseInputTextPartSchema, responseObjectSchema, responseOutputFunctionCallOutputSchema, responseOutputFunctionCallSchema, responseOutputItemSchema, responseOutputMessageSchema, responseOutputTextSchema, responseTextFormatSchema, responseToolSchema, responseUsageSchema, restoreMCPClientVersionResponseSchema, restorePromptBlockVersionResponseSchema, restoreScorerVersionResponseSchema, restoreVersionResponseSchema, resumeAgentBuilderBodySchema, resumeStreamBodySchema, resumeStreamUntilIdleBodySchema, reviewSummaryResponseSchema, ruleGroupSchema, ruleSchema, runExperimentItemBodySchema, runExperimentItemResponseSchema, runIdSchema, saveMessagesBodySchema, saveMessagesNetworkQuerySchema, saveMessagesResponseSchema, saveScoreBodySchema, saveScoreResponseSchema, scorerConfigSchema, scorerEntrySchema, scorerExperimentOutputSchema, scorerIdPathParams, scorerResultSchema, scorerVersionIdPathParams, scorerVersionPathParams, scorerVersionSchema, scoresWithPaginationResponseSchema, searchMemoryQuerySchema, searchMemoryResponseSchema, searchQuerySchema, searchResponseSchema, searchResultSchema, searchSkillsQuerySchema, searchSkillsResponseSchema, semanticRecallSchema, sendAgentMessageBodySchema, sendAgentSignalBodySchema, sendToolApprovalBodySchema, sendToolApprovalResponseSchema, sendWorkflowRunEventBodySchema, serializedAgentDefinitionSchema, serializedAgentSchema, serializedAgentWithIdSchema, serializedMemoryConfigSchema, serializedObservationConfigSchema, serializedObservationalMemoryConfigObjectSchema, serializedObservationalMemoryConfigSchema, serializedProcessorDetailSchema, serializedProcessorSchema$1 as serializedProcessorSchema, serializedReflectionConfigSchema, serializedToolSchema, serializedWorkflowSchema, serverDetailSchema, serverInfoSchema, skillDisambiguationQuerySchema, skillMetadataSchema, skillMetadataWithPathSchema, skillNamePathParams, skillOriginSchema, skillReferencePathParams, skillReferenceResponseSchema, skillSchema, skillSearchResultSchema, skillSourceSchema, skillsShInstallBodySchema, skillsShInstallResponseSchema, skillsShListResponseSchema, skillsShPopularQuerySchema, skillsShPreviewQuerySchema, skillsShPreviewResponseSchema, skillsShRemoveBodySchema, skillsShRemoveResponseSchema, skillsShSearchQuerySchema, skillsShSearchResponseSchema, skillsShSkillSchema, skillsShSourceSchema, skillsShUpdateBodySchema, skillsShUpdateResponseSchema, snapshotConfigSchema, speakResponseSchema, ssoCallbackQuerySchema, ssoCallbackResponseSchema, ssoConfigSchema, ssoLoginQuerySchema, ssoLoginResponseSchema, startAsyncAgentBuilderBodySchema, statusQuerySchema, storedAgentIdPathParams, storedAgentSchema, storedMCPClientIdPathParams, storedMCPClientSchema, storedMemoryRefSchema, storedProcessorGraphSchema, storedPromptBlockIdPathParams, storedPromptBlockSchema, storedScorerIdPathParams, storedScorerSchema, storedSkillIdPathParams, storedSkillSchema, storedWorkspaceIdPathParams, storedWorkspaceSchema, streamAgentBuilderBodySchema, streamLegacyAgentBuilderBodySchema, streamResponseSchema, streamUntilIdleBodySchema, submitExperimentResultBodySchema, subscribeAgentThreadBodySchema, successResponseSchema, systemPackagesResponseSchema, taskQueryBodySchema, taskResponseSchema, tenancyQuerySchema, threadIdPathParams, titleGenerationSchema, toolCallResponseSchema, toolConfigSchema, toolIdPathParams, toolProviderAuthStatusPathParams, toolProviderConfigSchema, toolProviderConnectionPathParams, toolProviderHealthResponseSchema, toolProviderIdPathParams, toolProvidersSchema, toolSlugPathParams, toolsConfigSchema, tracingOptionsSchema, transcribeSpeechBodySchema, transcribeSpeechResponseSchema, transferThreadBodySchema, transferThreadResponseSchema, triggerExperimentBodySchema, typedPermissive, updateAgentModelBodySchema, updateAgentModelInModelListBodySchema, updateConnectionBodySchema, updateConnectionResponseSchema, updateDatasetBodySchema, updateExperimentBodySchema, updateExperimentResultBodySchema, updateItemBodySchema, updateStoredAgentBodySchema, updateStoredAgentResponseSchema, updateStoredMCPClientBodySchema, updateStoredMCPClientResponseSchema, updateStoredPromptBlockBodySchema, updateStoredPromptBlockResponseSchema, updateStoredScorerBodySchema, updateStoredScorerResponseSchema, updateStoredSkillBodySchema, updateStoredSkillResponseSchema, updateStoredWorkspaceBodySchema, updateStoredWorkspaceResponseSchema, updateThreadBodySchema, updateThreadNetworkQuerySchema, updateWorkingMemoryBodySchema, updateWorkingMemoryResponseSchema, upsertVectorsBodySchema, upsertVectorsResponseSchema, userAccessSchema, vectorIndexPathParams, vectorNamePathParams, versionDetailSchema, versionDiffEntrySchema, versionIdPathParams, versionOrderBySchema, voiceSpeakersResponseSchema, workflowControlResponseSchema, workflowExecutionResultSchema, workflowInfoSchema, workflowRunResultQuerySchema, workflowRunResultSchema, workflowRunsResponseSchema, workspaceIdPathParams, workspaceInfoResponseSchema, snapshotConfigSchema$1 as workspaceSnapshotConfigSchema };
|
|
@@ -6,7 +6,7 @@ const require_utils = require("../../utils-CJxnYdr3.cjs");
|
|
|
6
6
|
const require_constants = require("../../constants-epIL4td4.cjs");
|
|
7
7
|
const require_server_handlers_error = require("../handlers/error.cjs");
|
|
8
8
|
const require_helpers = require("../../helpers-59ZdrW8t.cjs");
|
|
9
|
-
const require_routes = require("../../routes-
|
|
9
|
+
const require_routes = require("../../routes-BwzE4nnm.cjs");
|
|
10
10
|
let zod_v4 = require("zod/v4");
|
|
11
11
|
let stream = require("stream");
|
|
12
12
|
let _mastra_core_request_context = require("@mastra/core/request-context");
|
|
@@ -4,7 +4,7 @@ import { o as normalizeRoutePath, t as WorkflowRegistry } from "../../utils-BpQY
|
|
|
4
4
|
import { i as MASTRA_IS_STUDIO_KEY, l as MASTRA_USER_KEY, m as isStudioClientTypeHeader, n as MASTRA_AUTH_TOKEN_KEY, o as MASTRA_RESOURCE_ID_KEY$1, p as isReservedRequestContextKey, r as MASTRA_CLIENT_TYPE_HEADER, s as MASTRA_STUDIO_CLIENT_TYPE, t as MASTRA_AUTH_MODE_KEY } from "../../constants-C631oS02.js";
|
|
5
5
|
import { formatZodError, isZodError } from "../handlers/error.js";
|
|
6
6
|
import { d as pathMatchesPattern, i as findMatchingCustomRoute, o as isCustomRoutePublic, r as coreAuthMiddleware } from "../../helpers-C_FYiA-F.js";
|
|
7
|
-
import { t as SERVER_ROUTES } from "../../routes-
|
|
7
|
+
import { t as SERVER_ROUTES } from "../../routes-DlbTsFpA.js";
|
|
8
8
|
import { z } from "zod/v4";
|
|
9
9
|
import { Readable } from "stream";
|
|
10
10
|
import { RequestContext } from "@mastra/core/request-context";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LIST_AGENTS_ROUTE, GET_AGENT_BY_ID_ROUTE, CLONE_AGENT_ROUTE, GENERATE_AGENT_ROUTE, GENERATE_AGENT_VNEXT_ROUTE, STREAM_GENERATE_ROUTE, STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE, SEND_AGENT_MESSAGE_ROUTE, QUEUE_AGENT_MESSAGE_ROUTE, SEND_AGENT_SIGNAL_ROUTE, ABORT_AGENT_THREAD_ROUTE, CANCEL_AGENT_PENDING_SIGNALS_ROUTE, SUBSCRIBE_AGENT_THREAD_ROUTE, GET_PROVIDERS_ROUTE, APPROVE_TOOL_CALL_ROUTE, SEND_TOOL_APPROVAL_ROUTE, LIST_SUSPENDED_RUNS_ROUTE, DECLINE_TOOL_CALL_ROUTE, RESUME_STREAM_ROUTE, RECOVER_ROUTE, APPROVE_TOOL_CALL_GENERATE_ROUTE, DECLINE_TOOL_CALL_GENERATE_ROUTE, STREAM_NETWORK_ROUTE, UPDATE_AGENT_MODEL_ROUTE, RESET_AGENT_MODEL_ROUTE, REORDER_AGENT_MODEL_LIST_ROUTE, UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE, ENHANCE_INSTRUCTIONS_ROUTE, STREAM_VNEXT_DEPRECATED_ROUTE, STREAM_UI_MESSAGE_VNEXT_DEPRECATED_ROUTE, STREAM_UI_MESSAGE_DEPRECATED_ROUTE, APPROVE_NETWORK_TOOL_CALL_ROUTE, DECLINE_NETWORK_TOOL_CALL_ROUTE, GET_AGENT_SKILL_ROUTE, STREAM_UNTIL_IDLE_GENERATE_ROUTE, RESUME_STREAM_UNTIL_IDLE_ROUTE } from '../../handlers/agents.js';
|
|
1
|
+
import { LIST_AGENTS_ROUTE, GET_AGENT_BY_ID_ROUTE, CLONE_AGENT_ROUTE, GENERATE_AGENT_ROUTE, GENERATE_AGENT_VNEXT_ROUTE, STREAM_GENERATE_ROUTE, STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE, SEND_AGENT_MESSAGE_ROUTE, QUEUE_AGENT_MESSAGE_ROUTE, QUEUE_AGENT_SIGNAL_ROUTE, SEND_AGENT_SIGNAL_ROUTE, ABORT_AGENT_THREAD_ROUTE, CANCEL_AGENT_PENDING_SIGNALS_ROUTE, SUBSCRIBE_AGENT_THREAD_ROUTE, GET_PROVIDERS_ROUTE, APPROVE_TOOL_CALL_ROUTE, SEND_TOOL_APPROVAL_ROUTE, LIST_SUSPENDED_RUNS_ROUTE, DECLINE_TOOL_CALL_ROUTE, RESUME_STREAM_ROUTE, RECOVER_ROUTE, APPROVE_TOOL_CALL_GENERATE_ROUTE, DECLINE_TOOL_CALL_GENERATE_ROUTE, STREAM_NETWORK_ROUTE, UPDATE_AGENT_MODEL_ROUTE, RESET_AGENT_MODEL_ROUTE, REORDER_AGENT_MODEL_LIST_ROUTE, UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE, ENHANCE_INSTRUCTIONS_ROUTE, STREAM_VNEXT_DEPRECATED_ROUTE, STREAM_UI_MESSAGE_VNEXT_DEPRECATED_ROUTE, STREAM_UI_MESSAGE_DEPRECATED_ROUTE, APPROVE_NETWORK_TOOL_CALL_ROUTE, DECLINE_NETWORK_TOOL_CALL_ROUTE, GET_AGENT_SKILL_ROUTE, STREAM_UNTIL_IDLE_GENERATE_ROUTE, RESUME_STREAM_UNTIL_IDLE_ROUTE } from '../../handlers/agents.js';
|
|
2
2
|
import { READ_AGENT_PLAN_ROUTE } from '../../handlers/plans.js';
|
|
3
3
|
import { GET_AGENT_TOOL_ROUTE, EXECUTE_AGENT_TOOL_ROUTE } from '../../handlers/tools.js';
|
|
4
4
|
import { GET_SPEAKERS_ROUTE, GET_SPEAKERS_DEPRECATED_ROUTE, GENERATE_SPEECH_ROUTE, GENERATE_SPEECH_DEPRECATED_ROUTE, TRANSCRIBE_SPEECH_ROUTE, TRANSCRIBE_SPEECH_DEPRECATED_ROUTE, GET_LISTENER_ROUTE } from '../../handlers/voice.js';
|
|
@@ -22,6 +22,7 @@ export type AgentRoutes = readonly [
|
|
|
22
22
|
typeof STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE,
|
|
23
23
|
typeof SEND_AGENT_MESSAGE_ROUTE,
|
|
24
24
|
typeof QUEUE_AGENT_MESSAGE_ROUTE,
|
|
25
|
+
typeof QUEUE_AGENT_SIGNAL_ROUTE,
|
|
25
26
|
typeof SEND_AGENT_SIGNAL_ROUTE,
|
|
26
27
|
typeof ABORT_AGENT_THREAD_ROUTE,
|
|
27
28
|
typeof CANCEL_AGENT_PENDING_SIGNALS_ROUTE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../../src/server/server-adapter/routes/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,sCAAsC,EAEtC,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC5B,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,gCAAgC,EAChC,gCAAgC,EAChC,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,sCAAsC,EACtC,0BAA0B,EAC1B,6BAA6B,EAC7B,wCAAwC,EACxC,kCAAkC,EAClC,+BAA+B,EAC/B,+BAA+B,EAC/B,qBAAqB,EACrB,gCAAgC,EAChC,8BAA8B,EAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,gCAAgC,EAChC,uBAAuB,EACvB,kCAAkC,EAClC,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAErC,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../../src/server/server-adapter/routes/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,sCAAsC,EAEtC,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC5B,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,gCAAgC,EAChC,gCAAgC,EAChC,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,sCAAsC,EACtC,0BAA0B,EAC1B,6BAA6B,EAC7B,wCAAwC,EACxC,kCAAkC,EAClC,+BAA+B,EAC/B,+BAA+B,EAC/B,qBAAqB,EACrB,gCAAgC,EAChC,8BAA8B,EAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACtF,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6BAA6B;IACpC,OAAO,wCAAwC;IAC/C,OAAO,kCAAkC;CAC1C,CAAC"}
|
|
@@ -190,11 +190,27 @@ async function enforceThreadAccess({ mastra, requestContext, threadId, thread, e
|
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
-
* Validates that a
|
|
194
|
-
*
|
|
193
|
+
* Validates that a caller may act on a workflow run.
|
|
194
|
+
*
|
|
195
|
+
* Without `server.auth.mapUserToResourceId` there is no tenancy model, and only a mismatch
|
|
196
|
+
* between two present resource ids is denied. With a mapper, a resource-scoped caller may only
|
|
197
|
+
* act on runs it owns (an owner-less run is not its run). An unscoped caller is a
|
|
198
|
+
* privileged/service context (see getContextResourceId), but that privilege is only granted when
|
|
199
|
+
* an FGA provider authorizes the route; otherwise it is refused rather than granted implicitly,
|
|
200
|
+
* as on the thread-transfer route.
|
|
195
201
|
*/
|
|
196
|
-
async function validateRunOwnership(run, effectiveResourceId) {
|
|
197
|
-
if (run
|
|
202
|
+
async function validateRunOwnership(run, effectiveResourceId, mastra) {
|
|
203
|
+
if (!run) return;
|
|
204
|
+
const server = mastra?.getServer?.();
|
|
205
|
+
if (!(typeof (server?.auth)?.mapUserToResourceId === "function")) {
|
|
206
|
+
if (effectiveResourceId && run.resourceId && run.resourceId !== effectiveResourceId) throw new require_http_exception.HTTPException(403, { message: "Access denied: workflow run belongs to a different resource" });
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (effectiveResourceId) {
|
|
210
|
+
if (run.resourceId !== effectiveResourceId) throw new require_http_exception.HTTPException(403, { message: "Access denied: workflow run belongs to a different resource" });
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (!server?.fga) throw new require_http_exception.HTTPException(403, { message: "Access denied: unscoped workflow run access requires explicit authorization. Configure an FGA provider to authorize privileged run access." });
|
|
198
214
|
}
|
|
199
215
|
//#endregion
|
|
200
216
|
Object.defineProperty(exports, "MastraFGAPermissions", {
|
|
@@ -288,4 +304,4 @@ Object.defineProperty(exports, "validateThreadOwnership", {
|
|
|
288
304
|
}
|
|
289
305
|
});
|
|
290
306
|
|
|
291
|
-
//# sourceMappingURL=utils-
|
|
307
|
+
//# sourceMappingURL=utils-DdGLbkOl.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-BF2Kbju4.cjs","names":["authEE","HTTPException","isReservedRequestContextKey","MASTRA_RESOURCE_ID_KEY","MastraMemory"],"sources":["../src/server/fga-permissions.ts","../src/server/handlers/utils.ts"],"sourcesContent":["/**\n * Safe re-export of `MastraFGAPermissions` from `@mastra/core/auth/ee`.\n *\n * Why this shim exists:\n * `MastraFGAPermissions` was introduced in `@mastra/core@1.32.0`. Earlier\n * versions of `@mastra/core` ship `@mastra/core/auth/ee` but do not export\n * this constant. A direct named import (`import { MastraFGAPermissions }\n * from '@mastra/core/auth/ee'`) fails at ESM link time when this version\n * of `@mastra/server` is paired with `@mastra/core < 1.32.0`, taking the\n * entire user bundle down before any code runs.\n *\n * A namespace import tolerates missing names — `ns.MissingExport` is just\n * `undefined`, no link-time error. We then expose the permission map.\n *\n * Fallback values:\n * If the consuming `@mastra/core` does not export `MastraFGAPermissions`,\n * we substitute a hardcoded map of the canonical permission strings used\n * by routes in `@mastra/server`. This preserves the explicit RBAC\n * permission overrides those routes already had as string literals in\n * `@mastra/server@1.31.0` (e.g. `requiresPermission: \"agents:execute\"`\n * on `/v1/responses`). Without this fallback, `requiresPermission` would\n * be `undefined` on old core and the auth layer would derive the wrong\n * permission from the route path (e.g. `v1:write` instead of\n * `agents:execute`), breaking RBAC users who upgrade `@mastra/server`\n * but stay on `@mastra/core@1.31.0`.\n *\n * Once the consuming `@mastra/core` is on `1.32.0+` the values are real\n * and behaviour is identical to a direct named import.\n */\n\nimport * as authEE from '@mastra/core/auth/ee';\n\n// Canonical strings for the FGA permission keys actually referenced by\n// `@mastra/server` source. Mirrors `MastraFGAPermissions` in\n// `@mastra/core@1.32.0+` for these specific keys, and matches the string\n// literals previously hardcoded on the same routes in `@mastra/server@1.31.0`.\nconst FALLBACK_PERMISSIONS = {\n AGENTS_CREATE: 'agents:create',\n AGENTS_DELETE: 'agents:delete',\n AGENTS_EXECUTE: 'agents:execute',\n AGENTS_READ: 'agents:read',\n MEMORY_DELETE: 'memory:delete',\n MEMORY_READ: 'memory:read',\n MEMORY_WRITE: 'memory:write',\n TOOLS_EXECUTE: 'tools:execute',\n TOOLS_READ: 'tools:read',\n STORED_WORKFLOWS_READ: 'stored-workflows:read',\n STORED_WORKFLOWS_WRITE: 'stored-workflows:write',\n WORKFLOWS_EXECUTE: 'workflows:execute',\n WORKFLOWS_READ: 'workflows:read',\n} as const;\n\nconst realPermissions = (authEE as any).MastraFGAPermissions;\n\n// Typed as `any` on purpose: consumers of `@mastra/server` may run their\n// typecheck against a `@mastra/core` that doesn't export `MastraFGAPermissions`\n// (anything < 1.32.0). Pinning to the real type would push that name into the\n// emitted `.d.ts` and break downstream typecheck. `any` lets the property\n// accesses (`MastraFGAPermissions.AGENTS_READ`) flow through cleanly on every\n// supported core.\nexport const MastraFGAPermissions: any =\n realPermissions && Object.keys(realPermissions).length > 0 ? realPermissions : FALLBACK_PERMISSIONS;\n","import type { Mastra } from '@mastra/core';\nimport type { MastraFGAPermissionInput } from '@mastra/core/auth/ee';\nimport type { RequestContext } from '@mastra/core/di';\nimport { MastraMemory } from '@mastra/core/memory';\nimport type { Workflow } from '@mastra/core/workflows';\nimport { MASTRA_RESOURCE_ID_KEY, MASTRA_THREAD_ID_KEY, isReservedRequestContextKey } from '../constants';\nimport { MastraFGAPermissions } from '../fga-permissions';\nimport { HTTPException } from '../http-exception';\n\n/**\n * Resolves a workflow by id or registration key from the set Mastra exposes\n * publicly. Unlike `mastra.getWorkflowById`, this excludes hidden internal\n * workflows (e.g. a durable agent's backing loop), which must never be\n * runnable through HTTP routes.\n */\nexport function getPublicWorkflowById(mastra: Mastra, workflowId: string): Workflow | undefined {\n const workflows = mastra.listWorkflows();\n return (\n Object.values(workflows).find(workflow => workflow.id === workflowId) ??\n (Object.hasOwn(workflows, workflowId) ? workflows[workflowId] : undefined)\n );\n}\n\n// Validation helper\nexport function validateBody(body: Record<string, unknown>) {\n const errorResponse = Object.entries(body).reduce<Record<string, string>>((acc, [key, value]) => {\n if (!value) {\n acc[key] = `Argument \"${key}\" is required`;\n }\n return acc;\n }, {});\n\n if (Object.keys(errorResponse).length > 0) {\n throw new HTTPException(400, { message: Object.values(errorResponse)[0] });\n }\n}\n\n/**\n * sanitizes the body by removing disallowed keys.\n * @param body body to sanitize\n * @param disallowedKeys keys to remove from the body\n */\nexport function sanitizeBody(body: Record<string, unknown>, disallowedKeys: string[]) {\n for (const key of disallowedKeys) {\n if (key in body) {\n delete body[key];\n }\n }\n}\n\nconst CREDENTIAL_HEADER_NAMES = new Set([\n 'authorization',\n 'proxy-authorization',\n 'x-api-key',\n 'api-key',\n 'x-goog-api-key',\n 'cookie',\n]);\n\n/**\n * Removes credential-bearing headers from client-supplied `modelSettings.headers`\n * so a caller's own auth (e.g. the app's bearer token) can never override the\n * provider credential configured on the server. Non-credential headers are kept.\n */\nexport function stripClientCredentialHeaders(body: Record<string, unknown>) {\n const modelSettings = body.modelSettings;\n if (!modelSettings || typeof modelSettings !== 'object') return;\n const headers = (modelSettings as { headers?: unknown }).headers;\n if (!headers || typeof headers !== 'object') return;\n\n const kept = Object.fromEntries(\n Object.entries(headers).filter(([name]) => !CREDENTIAL_HEADER_NAMES.has(name.toLowerCase())),\n );\n body.modelSettings = { ...modelSettings, headers: kept };\n}\n\nexport function parsePerPage(\n value: string | undefined,\n defaultValue: number = 100,\n max: number = 1000,\n): number | false {\n const normalized = (value || '').trim().toLowerCase();\n // Handle explicit false to bypass pagination\n if (normalized === 'false') {\n return false;\n }\n const parsed = parseInt(value || String(defaultValue), 10);\n if (isNaN(parsed)) return defaultValue;\n return Math.min(max, Math.max(1, parsed));\n}\n\n/**\n * Parses filter query parameters into a key-value object.\n */\nexport function parseFilters(filters: string | string[] | undefined): Record<string, string> | undefined {\n if (!filters) return undefined;\n\n return Object.fromEntries(\n (Array.isArray(filters) ? filters : [filters]).map((attr: string) => {\n const [key, ...valueParts] = attr.split(':');\n const value = valueParts.join(':'); // ✅ Handles colons in values\n return [key, value];\n }),\n );\n}\n\n/**\n * Merges a body-supplied requestContext into the trusted server RequestContext.\n * The server context is authoritative: reserved keys are skipped and body values\n * only fill keys the server context has not already set.\n */\nexport function mergeBodyRequestContext(serverRequestContext: RequestContext, bodyRequestContext: unknown): void {\n if (!bodyRequestContext || typeof bodyRequestContext !== 'object') {\n return;\n }\n\n for (const [key, value] of Object.entries(bodyRequestContext)) {\n if (isReservedRequestContextKey(key)) continue;\n if (serverRequestContext.get(key) === undefined) {\n serverRequestContext.set(key, value);\n }\n }\n}\n\n// ============================================================================\n// Authorization Utilities\n// ============================================================================\n\n/**\n * Gets the effective resourceId, preferring the reserved key from requestContext\n * over client-provided values for security.\n */\nexport function getEffectiveResourceId(\n requestContext: RequestContext | undefined,\n clientResourceId: string | undefined,\n): string | undefined {\n const contextResourceId = requestContext?.get(MASTRA_RESOURCE_ID_KEY) as string | undefined;\n return contextResourceId || clientResourceId;\n}\n\n/**\n * Returns the resource id resolved from the request context alone (set via\n * `mapUserToResourceId` or the `x-resource-id` header), ignoring any\n * client-provided value. Its presence indicates a resource-scoped caller;\n * its absence indicates a privileged/service context.\n */\nexport function getContextResourceId(requestContext: RequestContext | undefined): string | undefined {\n return requestContext?.get(MASTRA_RESOURCE_ID_KEY) as string | undefined;\n}\n\n/**\n * Ensures a memory request has a resolvable resource ID. The body's\n * `memory.resource` is optional so authenticated setups can rely on the\n * server-derived resource ID (MASTRA_RESOURCE_ID_KEY set via mapUserToResourceId).\n * When neither the body nor the request context provides one, reject with a\n * clear 400 instead of failing deep inside agent execution.\n */\nexport function requireEffectiveResourceId(\n effectiveResourceId: string | undefined,\n): asserts effectiveResourceId is string {\n if (!effectiveResourceId) {\n throw new HTTPException(400, {\n message:\n 'A resource ID is required when using memory. Provide memory.resource in the request body, or configure server auth with mapUserToResourceId to derive it from the authenticated user.',\n });\n }\n}\n\n/**\n * Gets the effective threadId, preferring the reserved key from requestContext\n * over client-provided values for security.\n */\nexport function getEffectiveThreadId(\n requestContext: RequestContext | undefined,\n clientThreadId: string | undefined,\n): string | undefined {\n const contextThreadId = requestContext?.get(MASTRA_THREAD_ID_KEY) as string | undefined;\n return contextThreadId || clientThreadId;\n}\n\n/**\n * Validates that a thread belongs to the specified resourceId.\n * Throws 403 if the thread exists but belongs to a different resource.\n * Threads with no resourceId are accessible to all (shared threads).\n */\nexport async function validateThreadOwnership(\n thread: { resourceId?: string | null } | null | undefined,\n effectiveResourceId: string | undefined,\n): Promise<void> {\n if (thread && effectiveResourceId && thread.resourceId && thread.resourceId !== effectiveResourceId) {\n throw new HTTPException(403, { message: 'Access denied: thread belongs to a different resource' });\n }\n}\n\n/**\n * Validates both coarse resource ownership and fine-grained thread access.\n * FGA enforcement is a no-op when no FGA provider is configured.\n */\nexport async function enforceThreadAccess({\n mastra,\n requestContext,\n threadId,\n thread,\n effectiveResourceId,\n permission = MastraFGAPermissions.MEMORY_READ,\n}: {\n mastra: any;\n requestContext?: RequestContext;\n threadId: string;\n thread?: { resourceId?: string | null } | null;\n effectiveResourceId?: string;\n permission?: MastraFGAPermissionInput;\n}): Promise<void> {\n await validateThreadOwnership(thread, effectiveResourceId);\n\n const fgaProvider = mastra?.getServer?.()?.fga;\n if (!fgaProvider) {\n return;\n }\n\n const user = requestContext?.get('user');\n if (!user || typeof user !== 'object') {\n throw new HTTPException(403, { message: 'FGA authorization denied: authenticated user is required' });\n }\n\n await MastraMemory.checkThreadFGA({\n mastra,\n user: user as { id: string; [key: string]: unknown },\n threadId,\n resourceId: thread?.resourceId ?? effectiveResourceId,\n requestContext,\n permission,\n });\n}\n\n/**\n * Validates that a workflow run belongs to the specified resourceId.\n * Throws 403 if the run exists but belongs to a different resource.\n */\nexport async function validateRunOwnership(\n run: { resourceId?: string | null } | null | undefined,\n effectiveResourceId: string | undefined,\n): Promise<void> {\n if (run && effectiveResourceId && run.resourceId && run.resourceId !== effectiveResourceId) {\n throw new HTTPException(403, { message: 'Access denied: workflow run belongs to a different resource' });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,uBAAuB;CAC3B,eAAe;CACf,eAAe;CACf,gBAAgB;CAChB,aAAa;CACb,eAAe;CACf,aAAa;CACb,cAAc;CACd,eAAe;CACf,YAAY;CACZ,uBAAuB;CACvB,wBAAwB;CACxB,mBAAmB;CACnB,gBAAgB;AAClB;AAEA,MAAM,kBAAmBA,qBAAe;AAQxC,MAAa,uBACX,mBAAmB,OAAO,KAAK,eAAe,CAAC,CAAC,SAAS,IAAI,kBAAkB;;;;;;;;;AC9CjF,SAAgB,sBAAsB,QAAgB,YAA0C;CAC9F,MAAM,YAAY,OAAO,cAAc;CACvC,OACE,OAAO,OAAO,SAAS,CAAC,CAAC,MAAK,aAAY,SAAS,OAAO,UAAU,MACnE,OAAO,OAAO,WAAW,UAAU,IAAI,UAAU,cAAc,KAAA;AAEpE;AAGA,SAAgB,aAAa,MAA+B;CAC1D,MAAM,gBAAgB,OAAO,QAAQ,IAAI,CAAC,CAAC,QAAgC,KAAK,CAAC,KAAK,WAAW;EAC/F,IAAI,CAAC,OACH,IAAI,OAAO,aAAa,IAAI;EAE9B,OAAO;CACT,GAAG,CAAC,CAAC;CAEL,IAAI,OAAO,KAAK,aAAa,CAAC,CAAC,SAAS,GACtC,MAAM,IAAIC,uBAAAA,cAAc,KAAK,EAAE,SAAS,OAAO,OAAO,aAAa,CAAC,CAAC,GAAG,CAAC;AAE7E;;;;;;AAOA,SAAgB,aAAa,MAA+B,gBAA0B;CACpF,KAAK,MAAM,OAAO,gBAChB,IAAI,OAAO,MACT,OAAO,KAAK;AAGlB;AAEA,MAAM,0CAA0B,IAAI,IAAI;CACtC;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;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,uBACd,gBACA,kBACoB;CAEpB,OAD0B,gBAAgB,IAAA,oBAA0B,KACxC;AAC9B;;;;;;;AAQA,SAAgB,qBAAqB,gBAAgE;CACnG,OAAO,gBAAgB,IAAIC,kBAAAA,sBAAsB;AACnD;;;;;;;;AASA,SAAgB,2BACd,qBACuC;CACvC,IAAI,CAAC,qBACH,MAAM,IAAIF,uBAAAA,cAAc,KAAK,EAC3B,SACE,wLACJ,CAAC;AAEL;;;;;AAMA,SAAgB,qBACd,gBACA,gBACoB;CAEpB,OADwB,gBAAgB,IAAA,kBAAwB,KACtC;AAC5B;;;;;;AAOA,eAAsB,wBACpB,QACA,qBACe;CACf,IAAI,UAAU,uBAAuB,OAAO,cAAc,OAAO,eAAe,qBAC9E,MAAM,IAAIA,uBAAAA,cAAc,KAAK,EAAE,SAAS,wDAAwD,CAAC;AAErG;;;;;AAMA,eAAsB,oBAAoB,EACxC,QACA,gBACA,UACA,QACA,qBACA,aAAa,qBAAqB,eAQlB;CAChB,MAAM,wBAAwB,QAAQ,mBAAmB;CAGzD,IAAI,CADgB,QAAQ,YAAY,CAAC,EAAE,KAEzC;CAGF,MAAM,OAAO,gBAAgB,IAAI,MAAM;CACvC,IAAI,CAAC,QAAQ,OAAO,SAAS,UAC3B,MAAM,IAAIA,uBAAAA,cAAc,KAAK,EAAE,SAAS,2DAA2D,CAAC;CAGtG,MAAMG,oBAAAA,aAAa,eAAe;EAChC;EACM;EACN;EACA,YAAY,QAAQ,cAAc;EAClC;EACA;CACF,CAAC;AACH;;;;;AAMA,eAAsB,qBACpB,KACA,qBACe;CACf,IAAI,OAAO,uBAAuB,IAAI,cAAc,IAAI,eAAe,qBACrE,MAAM,IAAIH,uBAAAA,cAAc,KAAK,EAAE,SAAS,8DAA8D,CAAC;AAE3G"}
|
|
1
|
+
{"version":3,"file":"utils-DdGLbkOl.cjs","names":["authEE","HTTPException","isReservedRequestContextKey","MASTRA_RESOURCE_ID_KEY","MastraMemory"],"sources":["../src/server/fga-permissions.ts","../src/server/handlers/utils.ts"],"sourcesContent":["/**\n * Safe re-export of `MastraFGAPermissions` from `@mastra/core/auth/ee`.\n *\n * Why this shim exists:\n * `MastraFGAPermissions` was introduced in `@mastra/core@1.32.0`. Earlier\n * versions of `@mastra/core` ship `@mastra/core/auth/ee` but do not export\n * this constant. A direct named import (`import { MastraFGAPermissions }\n * from '@mastra/core/auth/ee'`) fails at ESM link time when this version\n * of `@mastra/server` is paired with `@mastra/core < 1.32.0`, taking the\n * entire user bundle down before any code runs.\n *\n * A namespace import tolerates missing names — `ns.MissingExport` is just\n * `undefined`, no link-time error. We then expose the permission map.\n *\n * Fallback values:\n * If the consuming `@mastra/core` does not export `MastraFGAPermissions`,\n * we substitute a hardcoded map of the canonical permission strings used\n * by routes in `@mastra/server`. This preserves the explicit RBAC\n * permission overrides those routes already had as string literals in\n * `@mastra/server@1.31.0` (e.g. `requiresPermission: \"agents:execute\"`\n * on `/v1/responses`). Without this fallback, `requiresPermission` would\n * be `undefined` on old core and the auth layer would derive the wrong\n * permission from the route path (e.g. `v1:write` instead of\n * `agents:execute`), breaking RBAC users who upgrade `@mastra/server`\n * but stay on `@mastra/core@1.31.0`.\n *\n * Once the consuming `@mastra/core` is on `1.32.0+` the values are real\n * and behaviour is identical to a direct named import.\n */\n\nimport * as authEE from '@mastra/core/auth/ee';\n\n// Canonical strings for the FGA permission keys actually referenced by\n// `@mastra/server` source. Mirrors `MastraFGAPermissions` in\n// `@mastra/core@1.32.0+` for these specific keys, and matches the string\n// literals previously hardcoded on the same routes in `@mastra/server@1.31.0`.\nconst FALLBACK_PERMISSIONS = {\n AGENTS_CREATE: 'agents:create',\n AGENTS_DELETE: 'agents:delete',\n AGENTS_EXECUTE: 'agents:execute',\n AGENTS_READ: 'agents:read',\n MEMORY_DELETE: 'memory:delete',\n MEMORY_READ: 'memory:read',\n MEMORY_WRITE: 'memory:write',\n TOOLS_EXECUTE: 'tools:execute',\n TOOLS_READ: 'tools:read',\n STORED_WORKFLOWS_READ: 'stored-workflows:read',\n STORED_WORKFLOWS_WRITE: 'stored-workflows:write',\n WORKFLOWS_EXECUTE: 'workflows:execute',\n WORKFLOWS_READ: 'workflows:read',\n} as const;\n\nconst realPermissions = (authEE as any).MastraFGAPermissions;\n\n// Typed as `any` on purpose: consumers of `@mastra/server` may run their\n// typecheck against a `@mastra/core` that doesn't export `MastraFGAPermissions`\n// (anything < 1.32.0). Pinning to the real type would push that name into the\n// emitted `.d.ts` and break downstream typecheck. `any` lets the property\n// accesses (`MastraFGAPermissions.AGENTS_READ`) flow through cleanly on every\n// supported core.\nexport const MastraFGAPermissions: any =\n realPermissions && Object.keys(realPermissions).length > 0 ? realPermissions : FALLBACK_PERMISSIONS;\n","import type { Mastra } from '@mastra/core';\nimport type { MastraFGAPermissionInput } from '@mastra/core/auth/ee';\nimport type { RequestContext } from '@mastra/core/di';\nimport { MastraMemory } from '@mastra/core/memory';\nimport type { Workflow } from '@mastra/core/workflows';\nimport { MASTRA_RESOURCE_ID_KEY, MASTRA_THREAD_ID_KEY, isReservedRequestContextKey } from '../constants';\nimport { MastraFGAPermissions } from '../fga-permissions';\nimport { HTTPException } from '../http-exception';\n\n/**\n * Resolves a workflow by id or registration key from the set Mastra exposes\n * publicly. Unlike `mastra.getWorkflowById`, this excludes hidden internal\n * workflows (e.g. a durable agent's backing loop), which must never be\n * runnable through HTTP routes.\n */\nexport function getPublicWorkflowById(mastra: Mastra, workflowId: string): Workflow | undefined {\n const workflows = mastra.listWorkflows();\n return (\n Object.values(workflows).find(workflow => workflow.id === workflowId) ??\n (Object.hasOwn(workflows, workflowId) ? workflows[workflowId] : undefined)\n );\n}\n\n// Validation helper\nexport function validateBody(body: Record<string, unknown>) {\n const errorResponse = Object.entries(body).reduce<Record<string, string>>((acc, [key, value]) => {\n if (!value) {\n acc[key] = `Argument \"${key}\" is required`;\n }\n return acc;\n }, {});\n\n if (Object.keys(errorResponse).length > 0) {\n throw new HTTPException(400, { message: Object.values(errorResponse)[0] });\n }\n}\n\n/**\n * sanitizes the body by removing disallowed keys.\n * @param body body to sanitize\n * @param disallowedKeys keys to remove from the body\n */\nexport function sanitizeBody(body: Record<string, unknown>, disallowedKeys: string[]) {\n for (const key of disallowedKeys) {\n if (key in body) {\n delete body[key];\n }\n }\n}\n\nconst CREDENTIAL_HEADER_NAMES = new Set([\n 'authorization',\n 'proxy-authorization',\n 'x-api-key',\n 'api-key',\n 'x-goog-api-key',\n 'cookie',\n]);\n\n/**\n * Removes credential-bearing headers from client-supplied `modelSettings.headers`\n * so a caller's own auth (e.g. the app's bearer token) can never override the\n * provider credential configured on the server. Non-credential headers are kept.\n */\nexport function stripClientCredentialHeaders(body: Record<string, unknown>) {\n const modelSettings = body.modelSettings;\n if (!modelSettings || typeof modelSettings !== 'object') return;\n const headers = (modelSettings as { headers?: unknown }).headers;\n if (!headers || typeof headers !== 'object') return;\n\n const kept = Object.fromEntries(\n Object.entries(headers).filter(([name]) => !CREDENTIAL_HEADER_NAMES.has(name.toLowerCase())),\n );\n body.modelSettings = { ...modelSettings, headers: kept };\n}\n\nexport function parsePerPage(\n value: string | undefined,\n defaultValue: number = 100,\n max: number = 1000,\n): number | false {\n const normalized = (value || '').trim().toLowerCase();\n // Handle explicit false to bypass pagination\n if (normalized === 'false') {\n return false;\n }\n const parsed = parseInt(value || String(defaultValue), 10);\n if (isNaN(parsed)) return defaultValue;\n return Math.min(max, Math.max(1, parsed));\n}\n\n/**\n * Parses filter query parameters into a key-value object.\n */\nexport function parseFilters(filters: string | string[] | undefined): Record<string, string> | undefined {\n if (!filters) return undefined;\n\n return Object.fromEntries(\n (Array.isArray(filters) ? filters : [filters]).map((attr: string) => {\n const [key, ...valueParts] = attr.split(':');\n const value = valueParts.join(':'); // ✅ Handles colons in values\n return [key, value];\n }),\n );\n}\n\n/**\n * Merges a body-supplied requestContext into the trusted server RequestContext.\n * The server context is authoritative: reserved keys are skipped and body values\n * only fill keys the server context has not already set.\n */\nexport function mergeBodyRequestContext(serverRequestContext: RequestContext, bodyRequestContext: unknown): void {\n if (!bodyRequestContext || typeof bodyRequestContext !== 'object') {\n return;\n }\n\n for (const [key, value] of Object.entries(bodyRequestContext)) {\n if (isReservedRequestContextKey(key)) continue;\n if (serverRequestContext.get(key) === undefined) {\n serverRequestContext.set(key, value);\n }\n }\n}\n\n// ============================================================================\n// Authorization Utilities\n// ============================================================================\n\n/**\n * Gets the effective resourceId, preferring the reserved key from requestContext\n * over client-provided values for security.\n */\nexport function getEffectiveResourceId(\n requestContext: RequestContext | undefined,\n clientResourceId: string | undefined,\n): string | undefined {\n const contextResourceId = requestContext?.get(MASTRA_RESOURCE_ID_KEY) as string | undefined;\n return contextResourceId || clientResourceId;\n}\n\n/**\n * Returns the resource id resolved from the request context alone (set via\n * `mapUserToResourceId` or the `x-resource-id` header), ignoring any\n * client-provided value. Its presence indicates a resource-scoped caller;\n * its absence indicates a privileged/service context.\n */\nexport function getContextResourceId(requestContext: RequestContext | undefined): string | undefined {\n return requestContext?.get(MASTRA_RESOURCE_ID_KEY) as string | undefined;\n}\n\n/**\n * Ensures a memory request has a resolvable resource ID. The body's\n * `memory.resource` is optional so authenticated setups can rely on the\n * server-derived resource ID (MASTRA_RESOURCE_ID_KEY set via mapUserToResourceId).\n * When neither the body nor the request context provides one, reject with a\n * clear 400 instead of failing deep inside agent execution.\n */\nexport function requireEffectiveResourceId(\n effectiveResourceId: string | undefined,\n): asserts effectiveResourceId is string {\n if (!effectiveResourceId) {\n throw new HTTPException(400, {\n message:\n 'A resource ID is required when using memory. Provide memory.resource in the request body, or configure server auth with mapUserToResourceId to derive it from the authenticated user.',\n });\n }\n}\n\n/**\n * Gets the effective threadId, preferring the reserved key from requestContext\n * over client-provided values for security.\n */\nexport function getEffectiveThreadId(\n requestContext: RequestContext | undefined,\n clientThreadId: string | undefined,\n): string | undefined {\n const contextThreadId = requestContext?.get(MASTRA_THREAD_ID_KEY) as string | undefined;\n return contextThreadId || clientThreadId;\n}\n\n/**\n * Validates that a thread belongs to the specified resourceId.\n * Throws 403 if the thread exists but belongs to a different resource.\n * Threads with no resourceId are accessible to all (shared threads).\n */\nexport async function validateThreadOwnership(\n thread: { resourceId?: string | null } | null | undefined,\n effectiveResourceId: string | undefined,\n): Promise<void> {\n if (thread && effectiveResourceId && thread.resourceId && thread.resourceId !== effectiveResourceId) {\n throw new HTTPException(403, { message: 'Access denied: thread belongs to a different resource' });\n }\n}\n\n/**\n * Validates both coarse resource ownership and fine-grained thread access.\n * FGA enforcement is a no-op when no FGA provider is configured.\n */\nexport async function enforceThreadAccess({\n mastra,\n requestContext,\n threadId,\n thread,\n effectiveResourceId,\n permission = MastraFGAPermissions.MEMORY_READ,\n}: {\n mastra: any;\n requestContext?: RequestContext;\n threadId: string;\n thread?: { resourceId?: string | null } | null;\n effectiveResourceId?: string;\n permission?: MastraFGAPermissionInput;\n}): Promise<void> {\n await validateThreadOwnership(thread, effectiveResourceId);\n\n const fgaProvider = mastra?.getServer?.()?.fga;\n if (!fgaProvider) {\n return;\n }\n\n const user = requestContext?.get('user');\n if (!user || typeof user !== 'object') {\n throw new HTTPException(403, { message: 'FGA authorization denied: authenticated user is required' });\n }\n\n await MastraMemory.checkThreadFGA({\n mastra,\n user: user as { id: string; [key: string]: unknown },\n threadId,\n resourceId: thread?.resourceId ?? effectiveResourceId,\n requestContext,\n permission,\n });\n}\n\n/**\n * Validates that a caller may act on a workflow run.\n *\n * Without `server.auth.mapUserToResourceId` there is no tenancy model, and only a mismatch\n * between two present resource ids is denied. With a mapper, a resource-scoped caller may only\n * act on runs it owns (an owner-less run is not its run). An unscoped caller is a\n * privileged/service context (see getContextResourceId), but that privilege is only granted when\n * an FGA provider authorizes the route; otherwise it is refused rather than granted implicitly,\n * as on the thread-transfer route.\n */\nexport async function validateRunOwnership(\n run: { resourceId?: string | null } | null | undefined,\n effectiveResourceId: string | undefined,\n mastra?: { getServer?: () => { auth?: unknown; fga?: unknown } | undefined },\n): Promise<void> {\n if (!run) return;\n const server = mastra?.getServer?.();\n const tenancy =\n typeof (server?.auth as { mapUserToResourceId?: unknown } | undefined)?.mapUserToResourceId === 'function';\n if (!tenancy) {\n if (effectiveResourceId && run.resourceId && run.resourceId !== effectiveResourceId) {\n throw new HTTPException(403, { message: 'Access denied: workflow run belongs to a different resource' });\n }\n return;\n }\n if (effectiveResourceId) {\n if (run.resourceId !== effectiveResourceId) {\n throw new HTTPException(403, { message: 'Access denied: workflow run belongs to a different resource' });\n }\n return;\n }\n if (!server?.fga) {\n throw new HTTPException(403, {\n message:\n 'Access denied: unscoped workflow run access requires explicit authorization. Configure an FGA provider to authorize privileged run access.',\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,uBAAuB;CAC3B,eAAe;CACf,eAAe;CACf,gBAAgB;CAChB,aAAa;CACb,eAAe;CACf,aAAa;CACb,cAAc;CACd,eAAe;CACf,YAAY;CACZ,uBAAuB;CACvB,wBAAwB;CACxB,mBAAmB;CACnB,gBAAgB;AAClB;AAEA,MAAM,kBAAmBA,qBAAe;AAQxC,MAAa,uBACX,mBAAmB,OAAO,KAAK,eAAe,CAAC,CAAC,SAAS,IAAI,kBAAkB;;;;;;;;;AC9CjF,SAAgB,sBAAsB,QAAgB,YAA0C;CAC9F,MAAM,YAAY,OAAO,cAAc;CACvC,OACE,OAAO,OAAO,SAAS,CAAC,CAAC,MAAK,aAAY,SAAS,OAAO,UAAU,MACnE,OAAO,OAAO,WAAW,UAAU,IAAI,UAAU,cAAc,KAAA;AAEpE;AAGA,SAAgB,aAAa,MAA+B;CAC1D,MAAM,gBAAgB,OAAO,QAAQ,IAAI,CAAC,CAAC,QAAgC,KAAK,CAAC,KAAK,WAAW;EAC/F,IAAI,CAAC,OACH,IAAI,OAAO,aAAa,IAAI;EAE9B,OAAO;CACT,GAAG,CAAC,CAAC;CAEL,IAAI,OAAO,KAAK,aAAa,CAAC,CAAC,SAAS,GACtC,MAAM,IAAIC,uBAAAA,cAAc,KAAK,EAAE,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,IAAI,CAAC,KAAK;CACV,MAAM,SAAS,QAAQ,YAAY;CAGnC,IAAI,EADF,QAAQ,QAAQ,KAAA,EAAwD,wBAAwB,aACpF;EACZ,IAAI,uBAAuB,IAAI,cAAc,IAAI,eAAe,qBAC9D,MAAM,IAAIH,uBAAAA,cAAc,KAAK,EAAE,SAAS,8DAA8D,CAAC;EAEzG;CACF;CACA,IAAI,qBAAqB;EACvB,IAAI,IAAI,eAAe,qBACrB,MAAM,IAAIA,uBAAAA,cAAc,KAAK,EAAE,SAAS,8DAA8D,CAAC;EAEzG;CACF;CACA,IAAI,CAAC,QAAQ,KACX,MAAM,IAAIA,uBAAAA,cAAc,KAAK,EAC3B,SACE,6IACJ,CAAC;AAEL"}
|
|
@@ -188,13 +188,29 @@ async function enforceThreadAccess({ mastra, requestContext, threadId, thread, e
|
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
|
-
* Validates that a
|
|
192
|
-
*
|
|
191
|
+
* Validates that a caller may act on a workflow run.
|
|
192
|
+
*
|
|
193
|
+
* Without `server.auth.mapUserToResourceId` there is no tenancy model, and only a mismatch
|
|
194
|
+
* between two present resource ids is denied. With a mapper, a resource-scoped caller may only
|
|
195
|
+
* act on runs it owns (an owner-less run is not its run). An unscoped caller is a
|
|
196
|
+
* privileged/service context (see getContextResourceId), but that privilege is only granted when
|
|
197
|
+
* an FGA provider authorizes the route; otherwise it is refused rather than granted implicitly,
|
|
198
|
+
* as on the thread-transfer route.
|
|
193
199
|
*/
|
|
194
|
-
async function validateRunOwnership(run, effectiveResourceId) {
|
|
195
|
-
if (run
|
|
200
|
+
async function validateRunOwnership(run, effectiveResourceId, mastra) {
|
|
201
|
+
if (!run) return;
|
|
202
|
+
const server = mastra?.getServer?.();
|
|
203
|
+
if (!(typeof (server?.auth)?.mapUserToResourceId === "function")) {
|
|
204
|
+
if (effectiveResourceId && run.resourceId && run.resourceId !== effectiveResourceId) throw new HTTPException(403, { message: "Access denied: workflow run belongs to a different resource" });
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (effectiveResourceId) {
|
|
208
|
+
if (run.resourceId !== effectiveResourceId) throw new HTTPException(403, { message: "Access denied: workflow run belongs to a different resource" });
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (!server?.fga) throw new HTTPException(403, { message: "Access denied: unscoped workflow run access requires explicit authorization. Configure an FGA provider to authorize privileged run access." });
|
|
196
212
|
}
|
|
197
213
|
//#endregion
|
|
198
214
|
export { getPublicWorkflowById as a, parsePerPage as c, stripClientCredentialHeaders as d, validateBody as f, MastraFGAPermissions as h, getEffectiveThreadId as i, requireEffectiveResourceId as l, validateThreadOwnership as m, getContextResourceId as n, mergeBodyRequestContext as o, validateRunOwnership as p, getEffectiveResourceId as r, parseFilters as s, enforceThreadAccess as t, sanitizeBody as u };
|
|
199
215
|
|
|
200
|
-
//# sourceMappingURL=utils-
|
|
216
|
+
//# sourceMappingURL=utils-mIFmRM_j.js.map
|