@mastra/server 1.83.0-alpha.0 → 1.83.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{a2a-DCpd3CTv.js → a2a-D3996OEF.js} +2 -2
- package/dist/{a2a-DCpd3CTv.js.map → a2a-D3996OEF.js.map} +1 -1
- package/dist/{a2a-kz7NjjCg.cjs → a2a-EGLeyLjI.cjs} +2 -2
- package/dist/{a2a-kz7NjjCg.cjs.map → a2a-EGLeyLjI.cjs.map} +1 -1
- package/dist/{agent-builder-uDstZROq.cjs → agent-builder-B9gEkbch.cjs} +3 -3
- package/dist/{agent-builder-uDstZROq.cjs.map → agent-builder-B9gEkbch.cjs.map} +1 -1
- package/dist/{agent-builder-CocfOSi8.js → agent-builder-BF7OAl_R.js} +3 -3
- package/dist/{agent-builder-CocfOSi8.js.map → agent-builder-BF7OAl_R.js.map} +1 -1
- package/dist/{agent-versions-BccL4mEW.cjs → agent-versions-CwWhEoU5.cjs} +2 -2
- package/dist/{agent-versions-BccL4mEW.cjs.map → agent-versions-CwWhEoU5.cjs.map} +1 -1
- package/dist/{agent-versions-DFJyxWY1.js → agent-versions-DfcKpYNW.js} +2 -2
- package/dist/{agent-versions-DFJyxWY1.js.map → agent-versions-DfcKpYNW.js.map} +1 -1
- package/dist/{agents-DsfsDhIT.cjs → agents-B4-yvYFU.cjs} +221 -60
- package/dist/agents-B4-yvYFU.cjs.map +1 -0
- package/dist/{agents-BXqMKoOz.js → agents-BCgiMlDq.js} +2 -2
- package/dist/{agents-BXqMKoOz.js.map → agents-BCgiMlDq.js.map} +1 -1
- package/dist/{agents-BI8ez-FT.js → agents-CLE3kITm.js} +221 -60
- package/dist/agents-CLE3kITm.js.map +1 -0
- package/dist/{agents-DbnPZXIN.cjs → agents-CjcvdF2e.cjs} +2 -2
- package/dist/{agents-DbnPZXIN.cjs.map → agents-CjcvdF2e.cjs.map} +1 -1
- package/dist/{api-schema-manifest-ChxbN16M.js → api-schema-manifest-m9VMkNih.js} +2 -2
- package/dist/{api-schema-manifest-ChxbN16M.js.map → api-schema-manifest-m9VMkNih.js.map} +1 -1
- package/dist/{api-schema-manifest-DtYTPvh9.cjs → api-schema-manifest-zVIP5lY6.cjs} +2 -2
- package/dist/{api-schema-manifest-DtYTPvh9.cjs.map → api-schema-manifest-zVIP5lY6.cjs.map} +1 -1
- package/dist/{conversations-QuKJVEFe.cjs → conversations-C2_kgBVu.cjs} +2 -2
- package/dist/{conversations-QuKJVEFe.cjs.map → conversations-C2_kgBVu.cjs.map} +1 -1
- package/dist/{conversations-BbZYXKIa.js → conversations-Dl6909lT.js} +2 -2
- package/dist/{conversations-BbZYXKIa.js.map → conversations-Dl6909lT.js.map} +1 -1
- package/dist/docs/SKILL.md +3 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-agents-resumable-streams.md +140 -0
- package/dist/docs/references/docs-server-server-adapters.md +679 -0
- package/dist/docs/references/reference-observability-tracing-advanced-queries.md +47 -58
- package/dist/{editor-builder-CbfX5bvL.js → editor-builder-XP9obiam.js} +3 -3
- package/dist/{editor-builder-CbfX5bvL.js.map → editor-builder-XP9obiam.js.map} +1 -1
- package/dist/{editor-builder-Bln4Pg1U.js → editor-builder-fe70YP8g.js} +2 -2
- package/dist/{editor-builder-Bln4Pg1U.js.map → editor-builder-fe70YP8g.js.map} +1 -1
- package/dist/{editor-builder-CjJlqR9a.cjs → editor-builder-o8LOkCe1.cjs} +3 -3
- package/dist/{editor-builder-CjJlqR9a.cjs.map → editor-builder-o8LOkCe1.cjs.map} +1 -1
- package/dist/{editor-builder-BaI8pttR.cjs → editor-builder-xQmDgVgJ.cjs} +2 -2
- package/dist/{editor-builder-BaI8pttR.cjs.map → editor-builder-xQmDgVgJ.cjs.map} +1 -1
- package/dist/{observability-mnHHbnoc.cjs → observability-BB0DeGo4.cjs} +3 -2
- package/dist/{observability-mnHHbnoc.cjs.map → observability-BB0DeGo4.cjs.map} +1 -1
- package/dist/{observability-BCTkIhJT.js → observability-Cl3qZKTD.js} +3 -2
- package/dist/{observability-BCTkIhJT.js.map → observability-Cl3qZKTD.js.map} +1 -1
- package/dist/{observability-new-endpoints-B6fo20v5.cjs → observability-new-endpoints-DugFsWBU.cjs} +27 -3
- package/dist/observability-new-endpoints-DugFsWBU.cjs.map +1 -0
- package/dist/{observability-new-endpoints-DHn8uKyr.js → observability-new-endpoints-qE2NutZ1.js} +22 -4
- package/dist/observability-new-endpoints-qE2NutZ1.js.map +1 -0
- package/dist/{plans-9hdkc-t8.js → plans-DImsIR2v.js} +3 -3
- package/dist/{plans-9hdkc-t8.js.map → plans-DImsIR2v.js.map} +1 -1
- package/dist/{plans-DMs8SVBG.cjs → plans-jHcOmxx2.cjs} +3 -3
- package/dist/{plans-DMs8SVBG.cjs.map → plans-jHcOmxx2.cjs.map} +1 -1
- package/dist/{responses-B5_syoSo.js → responses-B-5RuNWh.js} +2 -2
- package/dist/{responses-B5_syoSo.js.map → responses-B-5RuNWh.js.map} +1 -1
- package/dist/{responses-CNKJoC5a.cjs → responses-DuSPxtip.cjs} +2 -2
- package/dist/{responses-CNKJoC5a.cjs.map → responses-DuSPxtip.cjs.map} +1 -1
- package/dist/{routes-BYQ38dFx.cjs → routes-BAn-IJa1.cjs} +15 -14
- package/dist/routes-BAn-IJa1.cjs.map +1 -0
- package/dist/{routes-C0pgNcG-.js → routes-BUczFZCF.js} +15 -14
- package/dist/routes-BUczFZCF.js.map +1 -0
- package/dist/{scorer-versions-vQVWyYWA.cjs → scorer-versions-Bhdvt-cX.cjs} +2 -2
- package/dist/{scorer-versions-vQVWyYWA.cjs.map → scorer-versions-Bhdvt-cX.cjs.map} +1 -1
- package/dist/{scorer-versions-BZ58s09W.js → scorer-versions-DhT7Lj33.js} +2 -2
- package/dist/{scorer-versions-BZ58s09W.js.map → scorer-versions-DhT7Lj33.js.map} +1 -1
- package/dist/{scores-B3mS6vqB.js → scores-D0d1KZaB.js} +2 -2
- package/dist/{scores-B3mS6vqB.js.map → scores-D0d1KZaB.js.map} +1 -1
- package/dist/{scores-Dxa8dDfV.cjs → scores-sijeq4-F.cjs} +2 -2
- package/dist/{scores-Dxa8dDfV.cjs.map → scores-sijeq4-F.cjs.map} +1 -1
- package/dist/server/handlers/a2a.cjs +1 -1
- package/dist/server/handlers/a2a.js +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 +13 -2
- package/dist/server/handlers/agent-controller.cjs.map +1 -1
- package/dist/server/handlers/agent-controller.d.ts.map +1 -1
- package/dist/server/handlers/agent-controller.js +13 -2
- package/dist/server/handlers/agent-controller.js.map +1 -1
- package/dist/server/handlers/agent-versions.cjs +1 -1
- package/dist/server/handlers/agent-versions.js +1 -1
- package/dist/server/handlers/agents.cjs +1 -1
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/datasets.cjs +4 -2
- package/dist/server/handlers/datasets.cjs.map +1 -1
- package/dist/server/handlers/datasets.d.ts.map +1 -1
- package/dist/server/handlers/datasets.js +4 -2
- package/dist/server/handlers/datasets.js.map +1 -1
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/error.cjs +1 -0
- package/dist/server/handlers/error.cjs.map +1 -1
- package/dist/server/handlers/error.d.ts.map +1 -1
- package/dist/server/handlers/error.js +1 -0
- package/dist/server/handlers/error.js.map +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +2 -1
- package/dist/server/handlers/observability-new-endpoints.d.ts +244 -0
- package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability-shared.cjs +6 -0
- package/dist/server/handlers/observability-shared.cjs.map +1 -1
- package/dist/server/handlers/observability-shared.d.ts +6 -0
- package/dist/server/handlers/observability-shared.d.ts.map +1 -1
- package/dist/server/handlers/observability-shared.js +6 -0
- package/dist/server/handlers/observability-shared.js.map +1 -1
- package/dist/server/handlers/observability.cjs +3 -2
- package/dist/server/handlers/observability.js +3 -3
- package/dist/server/handlers/plans.cjs +1 -1
- package/dist/server/handlers/plans.js +1 -1
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +1 -1
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/scores.cjs +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +2 -2
- package/dist/server/handlers/stored-agent-favorites.js +2 -2
- package/dist/server/handlers/stored-agents.cjs +4 -3
- package/dist/server/handlers/stored-agents.cjs.map +1 -1
- package/dist/server/handlers/stored-agents.d.ts +2 -6
- package/dist/server/handlers/stored-agents.d.ts.map +1 -1
- package/dist/server/handlers/stored-agents.js +4 -3
- package/dist/server/handlers/stored-agents.js.map +1 -1
- package/dist/server/handlers/stored-scorers.cjs +1 -1
- package/dist/server/handlers/stored-scorers.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 +1 -1
- package/dist/server/handlers/tools.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 +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +10 -10
- package/dist/server/handlers.js +10 -10
- package/dist/server/schemas/agents.d.ts.map +1 -1
- package/dist/server/schemas/feedback.d.ts +49 -0
- package/dist/server/schemas/feedback.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +6 -6
- package/dist/server/schemas/index.js +6 -6
- package/dist/server/schemas/stored-agents.d.ts +5 -10
- package/dist/server/schemas/stored-agents.d.ts.map +1 -1
- package/dist/server/server-adapter/index.cjs +1 -1
- package/dist/server/server-adapter/index.js +1 -1
- package/dist/server/server-adapter/routes/observability.d.ts +121 -0
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/dist/server/utils/agent-stream-events.d.ts +2 -0
- package/dist/server/utils/agent-stream-events.d.ts.map +1 -1
- package/dist/{stored-agents-DA8Zx6o9.js → stored-agents-DmN_pIIl.js} +10 -10
- package/dist/stored-agents-DmN_pIIl.js.map +1 -0
- package/dist/{stored-agents-TQ2lIFbx.cjs → stored-agents-m0Knvv29.cjs} +10 -10
- package/dist/stored-agents-m0Knvv29.cjs.map +1 -0
- package/dist/{stored-scorers-DhOq8ZQC.js → stored-scorers-2F2k6XSx.js} +2 -2
- package/dist/{stored-scorers-DhOq8ZQC.js.map → stored-scorers-2F2k6XSx.js.map} +1 -1
- package/dist/{stored-scorers-FJOs5774.cjs → stored-scorers-iM2Qq9Nh.cjs} +2 -2
- package/dist/{stored-scorers-FJOs5774.cjs.map → stored-scorers-iM2Qq9Nh.cjs.map} +1 -1
- package/dist/{tools-C9W7WvyI.cjs → tools-DF2XAjMu.cjs} +3 -3
- package/dist/{tools-C9W7WvyI.cjs.map → tools-DF2XAjMu.cjs.map} +1 -1
- package/dist/{tools-Ce7SFoT1.js → tools-FukgyRS8.js} +3 -3
- package/dist/{tools-Ce7SFoT1.js.map → tools-FukgyRS8.js.map} +1 -1
- package/dist/{workflow-builder-BNk301jl.js → workflow-builder-BUQfzD4L.js} +3 -3
- package/dist/{workflow-builder-BNk301jl.js.map → workflow-builder-BUQfzD4L.js.map} +1 -1
- package/dist/{workflow-builder-CsOEskDo.cjs → workflow-builder-C6J_1s56.cjs} +3 -3
- package/dist/{workflow-builder-CsOEskDo.cjs.map → workflow-builder-C6J_1s56.cjs.map} +1 -1
- package/dist/{workflows-BAFGmHCW.js → workflows-BkTNzH-i.js} +2 -2
- package/dist/{workflows-BAFGmHCW.js.map → workflows-BkTNzH-i.js.map} +1 -1
- package/dist/{workflows-CJz5Eh0B.cjs → workflows-CHUG5jh4.cjs} +2 -2
- package/dist/{workflows-CJz5Eh0B.cjs.map → workflows-CHUG5jh4.cjs.map} +1 -1
- package/package.json +5 -5
- package/dist/agents-BI8ez-FT.js.map +0 -1
- package/dist/agents-DsfsDhIT.cjs.map +0 -1
- package/dist/observability-new-endpoints-B6fo20v5.cjs.map +0 -1
- package/dist/observability-new-endpoints-DHn8uKyr.js.map +0 -1
- package/dist/routes-BYQ38dFx.cjs.map +0 -1
- package/dist/routes-C0pgNcG-.js.map +0 -1
- package/dist/stored-agents-DA8Zx6o9.js.map +0 -1
- package/dist/stored-agents-TQ2lIFbx.cjs.map +0 -1
|
@@ -4,8 +4,8 @@ import { _ as resolveToolConfig, d as MASTRA_USER_PERMISSIONS_KEY, i as MASTRA_I
|
|
|
4
4
|
import { n as standardSchemaToJSONSchema, r as toStandardSchema } from "./schema-Bf12g7KC-5EUrrnSf.js";
|
|
5
5
|
import { _ as MastraFGAPermissions, a as getEffectiveThreadId, c as mergeBodyRequestContext, d as requireEffectiveResourceId, f as sanitizeBody, g as validateThreadOwnership, h as validateRunOwnership, i as getEffectiveResourceId, m as validateBody, n as enforceThreadAccess, o as getHandlerFGAProvider, p as stripClientCredentialHeaders, r as getContextResourceId, t as applyEffectiveThreadId } from "./utils-CTYtskHa.js";
|
|
6
6
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
7
|
-
import { $ as toolCallResponseSchema, A as observeAgentBodySchema, B as sendAgentMessageBodySchema, C as generateResponseSchema, E as listSuspendedRunsResponseSchema, F as queueAgentSignalBodySchema, G as serializedAgentSchema, H as sendToolApprovalBodySchema, I as recoverBodySchema, L as reorderAgentModelListBodySchema, N as providersResponseSchema, O as modelConfigIdPathParams, P as queueAgentMessageBodySchema, Q as subscribeAgentThreadBodySchema, R as resumeStreamBodySchema, T as listSuspendedRunsQuerySchema, U as sendToolApprovalResponseSchema, V as sendAgentSignalBodySchema, X as streamResponseSchema, Z as streamUntilIdleBodySchema, _ as declineToolCallBodySchema, a as agentIdPathParams, c as agentRunPathParams, d as agentVersionQuerySchema, f as approveNetworkToolCallBodySchema, g as declineNetworkToolCallBodySchema, h as cancelPendingAgentSignalsResponseSchema, i as agentExecutionLegacyBodySchema, j as observeAgentResponseSchema, k as modelManagementResponseSchema, l as agentSkillPathParams, m as cancelPendingAgentSignalsBodySchema, n as abortAgentThreadResponseSchema, nt as updateAgentModelInModelListBodySchema, p as approveToolCallBodySchema, r as agentExecutionBodySchema, t as abortAgentThreadBodySchema, tt as updateAgentModelBodySchema, v as enhanceInstructionsBodySchema, w as listAgentsResponseSchema, y as enhanceInstructionsResponseSchema, z as resumeStreamUntilIdleBodySchema } from "./agents-
|
|
8
|
-
import { r as createStoredAgentResponseSchema } from "./stored-agents-
|
|
7
|
+
import { $ as toolCallResponseSchema, A as observeAgentBodySchema, B as sendAgentMessageBodySchema, C as generateResponseSchema, E as listSuspendedRunsResponseSchema, F as queueAgentSignalBodySchema, G as serializedAgentSchema, H as sendToolApprovalBodySchema, I as recoverBodySchema, L as reorderAgentModelListBodySchema, N as providersResponseSchema, O as modelConfigIdPathParams, P as queueAgentMessageBodySchema, Q as subscribeAgentThreadBodySchema, R as resumeStreamBodySchema, T as listSuspendedRunsQuerySchema, U as sendToolApprovalResponseSchema, V as sendAgentSignalBodySchema, X as streamResponseSchema, Z as streamUntilIdleBodySchema, _ as declineToolCallBodySchema, a as agentIdPathParams, c as agentRunPathParams, d as agentVersionQuerySchema, f as approveNetworkToolCallBodySchema, g as declineNetworkToolCallBodySchema, h as cancelPendingAgentSignalsResponseSchema, i as agentExecutionLegacyBodySchema, j as observeAgentResponseSchema, k as modelManagementResponseSchema, l as agentSkillPathParams, m as cancelPendingAgentSignalsBodySchema, n as abortAgentThreadResponseSchema, nt as updateAgentModelInModelListBodySchema, p as approveToolCallBodySchema, r as agentExecutionBodySchema, t as abortAgentThreadBodySchema, tt as updateAgentModelBodySchema, v as enhanceInstructionsBodySchema, w as listAgentsResponseSchema, y as enhanceInstructionsResponseSchema, z as resumeStreamUntilIdleBodySchema } from "./agents-BCgiMlDq.js";
|
|
8
|
+
import { r as createStoredAgentResponseSchema } from "./stored-agents-DmN_pIIl.js";
|
|
9
9
|
import { O as skillDisambiguationQuerySchema, h as getAgentSkillResponseSchema } from "./workspace-DBDA3UQl.js";
|
|
10
10
|
import { n as createRoute } from "./route-builder-BKEzjw_M.js";
|
|
11
11
|
import { assertWriteAccess, getCallerAuthorId } from "./server/handlers/authorship.js";
|
|
@@ -23,6 +23,7 @@ import { ModelRouterLanguageModel, PROVIDER_REGISTRY, defaultGateways, parseMode
|
|
|
23
23
|
// src/server/utils/agent-stream-events.ts
|
|
24
24
|
function toAgentStreamChunks(event) {
|
|
25
25
|
const { runId } = event;
|
|
26
|
+
const logIndex = typeof event.index === "number" ? { index: event.index } : void 0;
|
|
26
27
|
const abort = {
|
|
27
28
|
type: "abort",
|
|
28
29
|
runId,
|
|
@@ -30,10 +31,21 @@ function toAgentStreamChunks(event) {
|
|
|
30
31
|
payload: {}
|
|
31
32
|
};
|
|
32
33
|
switch (event.type) {
|
|
33
|
-
case "chunk":
|
|
34
|
+
case "chunk": {
|
|
35
|
+
const { index: _nestedIndex, ...data } = event.data;
|
|
36
|
+
return [{
|
|
37
|
+
...data,
|
|
38
|
+
...logIndex
|
|
39
|
+
}];
|
|
40
|
+
}
|
|
34
41
|
case "step-start": {
|
|
35
42
|
const chunk = event.data;
|
|
36
|
-
|
|
43
|
+
if (!chunk || !("type" in chunk)) return [];
|
|
44
|
+
const { index: _nestedIndex, ...data } = chunk;
|
|
45
|
+
return [{
|
|
46
|
+
...data,
|
|
47
|
+
...logIndex
|
|
48
|
+
}];
|
|
37
49
|
}
|
|
38
50
|
case "finish": {
|
|
39
51
|
const data = event.data;
|
|
@@ -49,6 +61,7 @@ function toAgentStreamChunks(event) {
|
|
|
49
61
|
type: "finish",
|
|
50
62
|
runId,
|
|
51
63
|
from: ChunkFrom.AGENT,
|
|
64
|
+
...logIndex,
|
|
52
65
|
payload: {
|
|
53
66
|
output: raw === void 0 ? data.output : {
|
|
54
67
|
...data.output,
|
|
@@ -69,6 +82,7 @@ function toAgentStreamChunks(event) {
|
|
|
69
82
|
type: "finish",
|
|
70
83
|
runId,
|
|
71
84
|
from: ChunkFrom.AGENT,
|
|
85
|
+
...logIndex,
|
|
72
86
|
payload: {
|
|
73
87
|
output: {
|
|
74
88
|
text: data.text,
|
|
@@ -87,10 +101,14 @@ function toAgentStreamChunks(event) {
|
|
|
87
101
|
}
|
|
88
102
|
}];
|
|
89
103
|
}
|
|
90
|
-
case "error":
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
case "error": {
|
|
105
|
+
const data = event.data;
|
|
106
|
+
return [{
|
|
107
|
+
type: "error",
|
|
108
|
+
...logIndex,
|
|
109
|
+
payload: { error: { ...data.error } }
|
|
110
|
+
}];
|
|
111
|
+
}
|
|
94
112
|
default: return [];
|
|
95
113
|
}
|
|
96
114
|
}
|
|
@@ -247,6 +265,12 @@ function hasSuspendedToolCall(snapshot, toolCallId) {
|
|
|
247
265
|
};
|
|
248
266
|
return visit(snapshot.context);
|
|
249
267
|
}
|
|
268
|
+
/** A run-log entry that ends the run. An error *chunk* can precede the finish, so it does not count. */
|
|
269
|
+
const isRunTerminalEvent = (event) => {
|
|
270
|
+
if (event?.type === "error") return true;
|
|
271
|
+
const type = event?.type === "chunk" ? event.data?.type : event?.type;
|
|
272
|
+
return type === "finish" || type === "abort";
|
|
273
|
+
};
|
|
250
274
|
const DURABLE_SNAPSHOT_WAIT_TIMEOUT_MS = 1e4;
|
|
251
275
|
const DURABLE_SNAPSHOT_WAIT_INTERVAL_MS = 25;
|
|
252
276
|
function getDurableLoopWorkflowName(agent) {
|
|
@@ -299,6 +323,50 @@ async function validateDurableToolCallAccess({ mastra, agent, runId, toolCallId,
|
|
|
299
323
|
*/
|
|
300
324
|
const ALIASED_API_KEY_ENV_VAR_PROVIDERS = /* @__PURE__ */ new Set(["google"]);
|
|
301
325
|
/**
|
|
326
|
+
* The shared ownership record of a plain agent run, readable from any server
|
|
327
|
+
* sharing the agent's record cache. Undefined when the run is unknown or
|
|
328
|
+
* expired. Falls back to the owner of a run executing in this process on a
|
|
329
|
+
* core without shared records. A record cache that cannot be read is a 503:
|
|
330
|
+
* the caller is refused, never let through.
|
|
331
|
+
*/
|
|
332
|
+
async function getPlainRunRecord(agent, runId) {
|
|
333
|
+
const resumable = agent;
|
|
334
|
+
if (typeof resumable.__getRunRecord === "function") try {
|
|
335
|
+
return await resumable.__getRunRecord.call(agent, runId);
|
|
336
|
+
} catch {
|
|
337
|
+
throw new HTTPException(503, { message: "Run ownership is temporarily unavailable" });
|
|
338
|
+
}
|
|
339
|
+
const owner = resumable.__getPublishedRunOwner?.call(agent, runId);
|
|
340
|
+
return owner ? {
|
|
341
|
+
...owner,
|
|
342
|
+
status: "running"
|
|
343
|
+
} : void 0;
|
|
344
|
+
}
|
|
345
|
+
/** The caller must own the run and have `permission` on its thread. */
|
|
346
|
+
async function authorizeRunOwner({ mastra, agent, owner, requestContext, permission }) {
|
|
347
|
+
await validateRunOwnership(owner, getContextResourceId(requestContext), mastra, requestContext);
|
|
348
|
+
if (!owner.threadId) return;
|
|
349
|
+
const thread = await (await agent.getMemory({ requestContext }))?.getThreadById({ threadId: owner.threadId });
|
|
350
|
+
await enforceThreadAccess({
|
|
351
|
+
mastra,
|
|
352
|
+
requestContext,
|
|
353
|
+
threadId: owner.threadId,
|
|
354
|
+
thread,
|
|
355
|
+
effectiveResourceId: getContextResourceId(requestContext),
|
|
356
|
+
permission
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/** Whether the agent publishes its runs, so a closed HTTP reader can detach instead of aborting. */
|
|
360
|
+
function hasResumableStreams(agent) {
|
|
361
|
+
if (isDurableAgentLike(agent)) return true;
|
|
362
|
+
const resumable = agent;
|
|
363
|
+
return typeof resumable.hasResumableStreams === "function" && resumable.hasResumableStreams();
|
|
364
|
+
}
|
|
365
|
+
/** The bus a plain Agent with resumable streams publishes its runs on. */
|
|
366
|
+
function getAgentStreamPubSub(agent) {
|
|
367
|
+
return agent.__getStreamBus?.()?.pubsub;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
302
370
|
* Checks if a provider has its required API key environment variable(s) configured.
|
|
303
371
|
* Handles provider IDs with suffixes (e.g., "openai.chat" -> "openai").
|
|
304
372
|
* Also handles custom gateway providers that are stored with gateway prefix (e.g., "acme/acme-openai").
|
|
@@ -1432,8 +1500,8 @@ const STREAM_GENERATE_ROUTE = createRoute({
|
|
|
1432
1500
|
...restOptions,
|
|
1433
1501
|
requestContext: serverRequestContext,
|
|
1434
1502
|
memory: authorizedMemoryOption,
|
|
1435
|
-
abortSignal:
|
|
1436
|
-
_detachObserverOnCancel:
|
|
1503
|
+
abortSignal: hasResumableStreams(agent) ? void 0 : abortSignal,
|
|
1504
|
+
_detachObserverOnCancel: hasResumableStreams(agent)
|
|
1437
1505
|
};
|
|
1438
1506
|
if (untilIdle) options.untilIdle = untilIdle;
|
|
1439
1507
|
return (structuredOutput ? await agent.stream(messages, {
|
|
@@ -1690,6 +1758,95 @@ const QUEUE_AGENT_SIGNAL_ROUTE = createRoute({
|
|
|
1690
1758
|
}
|
|
1691
1759
|
}
|
|
1692
1760
|
});
|
|
1761
|
+
/**
|
|
1762
|
+
* Authorizes a request against a durable run through its workflow rows: the
|
|
1763
|
+
* caller must own the run, the run must belong to `agent`, and the caller must
|
|
1764
|
+
* have `permission` on its thread. Throws 403 when access is denied.
|
|
1765
|
+
* Returns 'missing' when no row exists and 'unverified' when the run has not
|
|
1766
|
+
* checkpointed its input yet, so ownership cannot be confirmed.
|
|
1767
|
+
*/
|
|
1768
|
+
async function authorizeDurableRun({ mastra, agent, runId, requestContext, permission }) {
|
|
1769
|
+
const workflows = await mastra.getStorage()?.getStore("workflows");
|
|
1770
|
+
const run = await workflows?.getWorkflowRunById({
|
|
1771
|
+
workflowName: getDurableLoopWorkflowName(agent),
|
|
1772
|
+
runId
|
|
1773
|
+
});
|
|
1774
|
+
if (!run) return "missing";
|
|
1775
|
+
await validateRunOwnership(run, getContextResourceId(requestContext), mastra, requestContext);
|
|
1776
|
+
const ownershipSchema = z.object({ context: z.object({ input: z.object({
|
|
1777
|
+
agentId: z.string(),
|
|
1778
|
+
state: z.object({ threadId: z.string().optional() }).optional()
|
|
1779
|
+
}) }) });
|
|
1780
|
+
let parsed = ownershipSchema.safeParse(typeof run.snapshot === "string" ? JSON.parse(run.snapshot) : run.snapshot);
|
|
1781
|
+
if (!parsed.success) {
|
|
1782
|
+
const execution = await workflows?.getWorkflowRunById({
|
|
1783
|
+
workflowName: getDurableLoopWorkflowName(agent).replace(DurableStepIds.AGENTIC_LOOP, DurableStepIds.AGENTIC_EXECUTION),
|
|
1784
|
+
runId
|
|
1785
|
+
});
|
|
1786
|
+
await validateRunOwnership(execution, getContextResourceId(requestContext), mastra, requestContext);
|
|
1787
|
+
parsed = ownershipSchema.safeParse(typeof execution?.snapshot === "string" ? JSON.parse(execution.snapshot) : execution?.snapshot);
|
|
1788
|
+
}
|
|
1789
|
+
if (!parsed.success) return "unverified";
|
|
1790
|
+
if (parsed.data.context.input.agentId !== agent.id) throw new HTTPException(403, { message: "Access denied: run does not belong to this agent" });
|
|
1791
|
+
const threadId = parsed.data.context.input.state?.threadId;
|
|
1792
|
+
if (threadId) {
|
|
1793
|
+
const thread = await (await agent.getMemory({ requestContext }))?.getThreadById({ threadId });
|
|
1794
|
+
await enforceThreadAccess({
|
|
1795
|
+
mastra,
|
|
1796
|
+
requestContext,
|
|
1797
|
+
threadId,
|
|
1798
|
+
thread,
|
|
1799
|
+
effectiveResourceId: getContextResourceId(requestContext),
|
|
1800
|
+
permission
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
return "ok";
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* The ownership policy for observing (`MEMORY_READ`) and aborting
|
|
1807
|
+
* (`MEMORY_WRITE`) a run: the caller must own the run and have `permission` on
|
|
1808
|
+
* its thread. Throws 403 when access is denied and 503 when ownership cannot be
|
|
1809
|
+
* read. Returns undefined when the run is unknown, expired, or its owner cannot
|
|
1810
|
+
* be verified; the caller decides how to report that.
|
|
1811
|
+
*
|
|
1812
|
+
* Plain runs are checked against their shared run record. Durable runs are
|
|
1813
|
+
* checked against their workflow rows; observers may also use the owner the
|
|
1814
|
+
* agent tracks in this process, which outlives the run so finished runs can be
|
|
1815
|
+
* replayed. Aborts never use it, so a finished run is not reported stopped.
|
|
1816
|
+
*/
|
|
1817
|
+
async function authorizeRunAccess({ mastra, agent, runId, requestContext, permission }) {
|
|
1818
|
+
if (!isDurableAgentLike(agent)) {
|
|
1819
|
+
const record = await getPlainRunRecord(agent, runId);
|
|
1820
|
+
if (!record) return void 0;
|
|
1821
|
+
await authorizeRunOwner({
|
|
1822
|
+
mastra,
|
|
1823
|
+
agent,
|
|
1824
|
+
owner: record,
|
|
1825
|
+
requestContext,
|
|
1826
|
+
permission
|
|
1827
|
+
});
|
|
1828
|
+
return record;
|
|
1829
|
+
}
|
|
1830
|
+
const getOwner = agent.__getRunOwner;
|
|
1831
|
+
const owner = permission === MastraFGAPermissions.MEMORY_READ && typeof getOwner === "function" ? getOwner.call(agent, runId) : void 0;
|
|
1832
|
+
if (owner) {
|
|
1833
|
+
await authorizeRunOwner({
|
|
1834
|
+
mastra,
|
|
1835
|
+
agent,
|
|
1836
|
+
owner,
|
|
1837
|
+
requestContext,
|
|
1838
|
+
permission
|
|
1839
|
+
});
|
|
1840
|
+
return {};
|
|
1841
|
+
}
|
|
1842
|
+
return await authorizeDurableRun({
|
|
1843
|
+
mastra,
|
|
1844
|
+
agent,
|
|
1845
|
+
runId,
|
|
1846
|
+
requestContext,
|
|
1847
|
+
permission
|
|
1848
|
+
}) === "ok" ? {} : void 0;
|
|
1849
|
+
}
|
|
1693
1850
|
const ABORT_AGENT_RUN_ROUTE = createRoute({
|
|
1694
1851
|
method: "POST",
|
|
1695
1852
|
path: "/agents/:agentId/runs/:runId/abort",
|
|
@@ -1697,7 +1854,7 @@ const ABORT_AGENT_RUN_ROUTE = createRoute({
|
|
|
1697
1854
|
pathParamSchema: agentRunPathParams,
|
|
1698
1855
|
responseSchema: abortAgentThreadResponseSchema,
|
|
1699
1856
|
summary: "Abort an agent run",
|
|
1700
|
-
description: "Explicitly stop a durable run, including runs without a memory thread",
|
|
1857
|
+
description: "Explicitly stop a durable run or a run of an agent with resumable streams, including runs without a memory thread",
|
|
1701
1858
|
tags: ["Agents"],
|
|
1702
1859
|
requiresAuth: true,
|
|
1703
1860
|
requiresPermission: MastraFGAPermissions.AGENTS_EXECUTE,
|
|
@@ -1708,41 +1865,25 @@ const ABORT_AGENT_RUN_ROUTE = createRoute({
|
|
|
1708
1865
|
agentId,
|
|
1709
1866
|
requestContext
|
|
1710
1867
|
});
|
|
1711
|
-
if (!isDurableAgentLike(agent))
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
workflowName: getDurableLoopWorkflowName(agent),
|
|
1715
|
-
runId
|
|
1716
|
-
});
|
|
1717
|
-
if (!run) return { aborted: false };
|
|
1718
|
-
await validateRunOwnership(run, getContextResourceId(requestContext), mastra, requestContext);
|
|
1719
|
-
const ownershipSchema = z.object({ context: z.object({ input: z.object({
|
|
1720
|
-
agentId: z.string(),
|
|
1721
|
-
state: z.object({ threadId: z.string().optional() }).optional()
|
|
1722
|
-
}) }) });
|
|
1723
|
-
let parsed = ownershipSchema.safeParse(typeof run.snapshot === "string" ? JSON.parse(run.snapshot) : run.snapshot);
|
|
1724
|
-
if (!parsed.success) {
|
|
1725
|
-
const execution = await workflows?.getWorkflowRunById({
|
|
1726
|
-
workflowName: getDurableLoopWorkflowName(agent).replace(DurableStepIds.AGENTIC_LOOP, DurableStepIds.AGENTIC_EXECUTION),
|
|
1727
|
-
runId
|
|
1728
|
-
});
|
|
1729
|
-
await validateRunOwnership(execution, getContextResourceId(requestContext), mastra, requestContext);
|
|
1730
|
-
parsed = ownershipSchema.safeParse(typeof execution?.snapshot === "string" ? JSON.parse(execution.snapshot) : execution?.snapshot);
|
|
1868
|
+
if (!isDurableAgentLike(agent)) {
|
|
1869
|
+
const resumable = agent;
|
|
1870
|
+
if (typeof resumable.__getRunRecord !== "function" && typeof resumable.__getPublishedRunOwner !== "function" || !hasResumableStreams(agent)) throw new HTTPException(501, { message: "Run-scoped cancellation requires a durable agent or an agent with resumable streams" });
|
|
1731
1871
|
}
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
}
|
|
1872
|
+
const run = await authorizeRunAccess({
|
|
1873
|
+
mastra,
|
|
1874
|
+
agent,
|
|
1875
|
+
runId,
|
|
1876
|
+
requestContext,
|
|
1877
|
+
permission: MastraFGAPermissions.MEMORY_WRITE
|
|
1878
|
+
});
|
|
1879
|
+
if (!isDurableAgentLike(agent)) {
|
|
1880
|
+
if (!run) throw new HTTPException(404, { message: "Run not found" });
|
|
1881
|
+
if (run.status === "finished") return { aborted: false };
|
|
1882
|
+
const resumable = agent;
|
|
1883
|
+
if (typeof resumable.__abortRunAcknowledged === "function") return { aborted: await resumable.__abortRunAcknowledged.call(agent, runId) };
|
|
1884
|
+
return { aborted: agent.abortRunStream(runId) };
|
|
1745
1885
|
}
|
|
1886
|
+
if (!run) return { aborted: false };
|
|
1746
1887
|
if (typeof agent.__abortRunAcknowledged === "function") return { aborted: await agent.__abortRunAcknowledged(runId) };
|
|
1747
1888
|
return { aborted: await agent.abortRunStream(runId) };
|
|
1748
1889
|
} catch (error) {
|
|
@@ -2005,8 +2146,8 @@ const STREAM_UNTIL_IDLE_GENERATE_ROUTE = createRoute({
|
|
|
2005
2146
|
context: restOptions.context,
|
|
2006
2147
|
requestContext: serverRequestContext,
|
|
2007
2148
|
memory: authorizedMemoryOption,
|
|
2008
|
-
abortSignal:
|
|
2009
|
-
_detachObserverOnCancel:
|
|
2149
|
+
abortSignal: hasResumableStreams(agent) ? void 0 : abortSignal,
|
|
2150
|
+
_detachObserverOnCancel: hasResumableStreams(agent)
|
|
2010
2151
|
};
|
|
2011
2152
|
return (structuredOutput ? await agent.streamUntilIdle(messages, {
|
|
2012
2153
|
...options,
|
|
@@ -2040,24 +2181,44 @@ const OBSERVE_AGENT_STREAM_ROUTE = createRoute({
|
|
|
2040
2181
|
bodySchema: observeAgentBodySchema,
|
|
2041
2182
|
responseSchema: observeAgentResponseSchema,
|
|
2042
2183
|
summary: "Observe agent stream",
|
|
2043
|
-
description: "Reconnect to an existing agent stream to receive missed events.
|
|
2184
|
+
description: "Reconnect to an existing agent stream to receive missed events. Every frame except abort carries the run-log `index` it came from; pass `offset` as the index + 1 of the last frame that has one to resume without repeating indexed frames. Frames whose replay-cache write failed, or all frames when caching is off, carry no index, so no offset can resume at them; omitting `offset` replays whatever the transport itself retains, which can repeat frames already received.",
|
|
2044
2185
|
tags: ["Agents", "Streaming"],
|
|
2045
2186
|
requiresAuth: true,
|
|
2046
|
-
handler: async ({ mastra, agentId, runId, offset, abortSignal }) => {
|
|
2187
|
+
handler: async ({ mastra, agentId, runId, offset, abortSignal, requestContext }) => {
|
|
2047
2188
|
try {
|
|
2048
2189
|
const agent = await getAgentFromSystem({
|
|
2049
2190
|
mastra,
|
|
2050
|
-
agentId
|
|
2191
|
+
agentId,
|
|
2192
|
+
requestContext
|
|
2051
2193
|
});
|
|
2194
|
+
if (!await authorizeRunAccess({
|
|
2195
|
+
mastra,
|
|
2196
|
+
agent,
|
|
2197
|
+
runId,
|
|
2198
|
+
requestContext,
|
|
2199
|
+
permission: MastraFGAPermissions.MEMORY_READ
|
|
2200
|
+
})) throw new HTTPException(404, { message: "Run not found" });
|
|
2052
2201
|
const durableAgent = isDurableAgentLike(agent) ? agent : void 0;
|
|
2053
|
-
const pubsub = durableAgent?.pubsub ?? mastra.pubsub;
|
|
2202
|
+
const pubsub = durableAgent?.pubsub ?? getAgentStreamPubSub(agent) ?? mastra.pubsub;
|
|
2054
2203
|
const topic = AGENT_STREAM_TOPIC(runId);
|
|
2055
2204
|
const subscribe = (onEvent, onComplete) => {
|
|
2056
2205
|
if (typeof durableAgent?.__subscribeToRunStream === "function") return durableAgent.__subscribeToRunStream(runId, {
|
|
2057
2206
|
offset,
|
|
2058
2207
|
onComplete
|
|
2059
2208
|
}, onEvent);
|
|
2060
|
-
|
|
2209
|
+
if (offset === void 0) return pubsub.subscribeWithReplay(topic, onEvent).then(() => () => pubsub.unsubscribe(topic, onEvent));
|
|
2210
|
+
return pubsub.subscribeFromOffset(topic, offset, onEvent).then(() => {
|
|
2211
|
+
if (offset > 0) {
|
|
2212
|
+
const readTail = async () => {
|
|
2213
|
+
const window = await pubsub.getHistory(topic, offset - 1);
|
|
2214
|
+
return window.length > 0 ? window.at(-1) : (await pubsub.getHistory(topic, 0)).at(-1);
|
|
2215
|
+
};
|
|
2216
|
+
readTail().catch(() => void 0).then((last) => {
|
|
2217
|
+
if (typeof last?.index === "number" && last.index < offset && isRunTerminalEvent(last)) onComplete();
|
|
2218
|
+
});
|
|
2219
|
+
}
|
|
2220
|
+
return () => pubsub.unsubscribe(topic, onEvent);
|
|
2221
|
+
});
|
|
2061
2222
|
};
|
|
2062
2223
|
let closed = false;
|
|
2063
2224
|
let pendingRejection;
|
|
@@ -2186,8 +2347,8 @@ const APPROVE_TOOL_CALL_ROUTE = createRoute({
|
|
|
2186
2347
|
return (await agent.approveToolCall({
|
|
2187
2348
|
...params,
|
|
2188
2349
|
requestContext,
|
|
2189
|
-
abortSignal:
|
|
2190
|
-
_detachObserverOnCancel:
|
|
2350
|
+
abortSignal: hasResumableStreams(agent) ? void 0 : abortSignal,
|
|
2351
|
+
_detachObserverOnCancel: hasResumableStreams(agent)
|
|
2191
2352
|
})).fullStream;
|
|
2192
2353
|
} catch (error) {
|
|
2193
2354
|
return handleError(error, "error approving tool call");
|
|
@@ -2343,8 +2504,8 @@ const DECLINE_TOOL_CALL_ROUTE = createRoute({
|
|
|
2343
2504
|
return (await agent.declineToolCall({
|
|
2344
2505
|
...params,
|
|
2345
2506
|
requestContext,
|
|
2346
|
-
abortSignal:
|
|
2347
|
-
_detachObserverOnCancel:
|
|
2507
|
+
abortSignal: hasResumableStreams(agent) ? void 0 : abortSignal,
|
|
2508
|
+
_detachObserverOnCancel: hasResumableStreams(agent)
|
|
2348
2509
|
})).fullStream;
|
|
2349
2510
|
} catch (error) {
|
|
2350
2511
|
return handleError(error, "error declining tool call");
|
|
@@ -2428,8 +2589,8 @@ const RESUME_STREAM_ROUTE = createRoute({
|
|
|
2428
2589
|
...restOptions,
|
|
2429
2590
|
requestContext: serverRequestContext,
|
|
2430
2591
|
memory: authorizedMemoryOption,
|
|
2431
|
-
abortSignal:
|
|
2432
|
-
_detachObserverOnCancel:
|
|
2592
|
+
abortSignal: hasResumableStreams(agent) ? void 0 : abortSignal,
|
|
2593
|
+
_detachObserverOnCancel: hasResumableStreams(agent)
|
|
2433
2594
|
};
|
|
2434
2595
|
if (untilIdle) options.untilIdle = untilIdle;
|
|
2435
2596
|
return (structuredOutput ? await agent.resumeStream(resumeData, {
|
|
@@ -2558,8 +2719,8 @@ const RESUME_STREAM_UNTIL_IDLE_ROUTE = createRoute({
|
|
|
2558
2719
|
context: restOptions.context,
|
|
2559
2720
|
requestContext: serverRequestContext,
|
|
2560
2721
|
memory: authorizedMemoryOption,
|
|
2561
|
-
abortSignal:
|
|
2562
|
-
_detachObserverOnCancel:
|
|
2722
|
+
abortSignal: hasResumableStreams(agent) ? void 0 : abortSignal,
|
|
2723
|
+
_detachObserverOnCancel: hasResumableStreams(agent)
|
|
2563
2724
|
};
|
|
2564
2725
|
return (structuredOutput ? await agent.resumeStreamUntilIdle(resumeData, {
|
|
2565
2726
|
...options,
|
|
@@ -3076,4 +3237,4 @@ const GET_AGENT_SKILL_ROUTE = createRoute({
|
|
|
3076
3237
|
});
|
|
3077
3238
|
export { SEND_TOOL_APPROVAL_ROUTE as A, UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE as B, RECOVER_ROUTE as C, RESUME_STREAM_UNTIL_IDLE_ROUTE as D, RESUME_STREAM_ROUTE as E, STREAM_UI_MESSAGE_DEPRECATED_ROUTE as F, getAgentFromSystem as G, agents_exports as H, STREAM_UI_MESSAGE_VNEXT_DEPRECATED_ROUTE as I, getSerializedProcessors as J, getBrowserToolsFromAgent as K, STREAM_UNTIL_IDLE_GENERATE_ROUTE as L, STREAM_GENERATE_ROUTE as M, STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE as N, SEND_AGENT_MESSAGE_ROUTE as O, STREAM_NETWORK_ROUTE as P, STREAM_VNEXT_DEPRECATED_ROUTE as R, QUEUE_AGENT_SIGNAL_ROUTE as S, RESET_AGENT_MODEL_ROUTE as T, buildProvidersList as U, UPDATE_AGENT_MODEL_ROUTE as V, extractVersionOptions as W, getWorkspaceToolsFromAgent as X, getSerializedSkillsFromAgent as Y, isProviderConnected as Z, GET_PROVIDERS_ROUTE as _, APPROVE_TOOL_CALL_ROUTE as a, OBSERVE_AGENT_STREAM_ROUTE as b, DECLINE_NETWORK_TOOL_CALL_ROUTE as c, ENHANCE_INSTRUCTIONS_ROUTE as d, GENERATE_AGENT_ROUTE as f, GET_AGENT_SKILL_ROUTE as g, GET_AGENT_BY_ID_ROUTE as h, APPROVE_TOOL_CALL_GENERATE_ROUTE as i, STREAM_GENERATE_LEGACY_ROUTE as j, SEND_AGENT_SIGNAL_ROUTE as k, DECLINE_TOOL_CALL_GENERATE_ROUTE as l, GENERATE_LEGACY_ROUTE as m, ABORT_AGENT_THREAD_ROUTE as n, CANCEL_AGENT_PENDING_SIGNALS_ROUTE as o, GENERATE_AGENT_VNEXT_ROUTE as p, getSerializedAgentTools as q, APPROVE_NETWORK_TOOL_CALL_ROUTE as r, CLONE_AGENT_ROUTE as s, ABORT_AGENT_RUN_ROUTE as t, DECLINE_TOOL_CALL_ROUTE as u, LIST_AGENTS_ROUTE as v, REORDER_AGENT_MODEL_LIST_ROUTE as w, QUEUE_AGENT_MESSAGE_ROUTE as x, LIST_SUSPENDED_RUNS_ROUTE as y, SUBSCRIBE_AGENT_THREAD_ROUTE as z };
|
|
3078
3239
|
|
|
3079
|
-
//# sourceMappingURL=agents-
|
|
3240
|
+
//# sourceMappingURL=agents-CLE3kITm.js.map
|