@mastra/server 1.46.0-alpha.2 → 1.46.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/{api-schema-manifest-3MIPI77N.js → api-schema-manifest-F6SF6FJT.js} +3 -3
- package/dist/{api-schema-manifest-3MIPI77N.js.map → api-schema-manifest-F6SF6FJT.js.map} +1 -1
- package/dist/{api-schema-manifest-LFSM6XAL.cjs → api-schema-manifest-PVHR2FGG.cjs} +4 -4
- package/dist/{api-schema-manifest-LFSM6XAL.cjs.map → api-schema-manifest-PVHR2FGG.cjs.map} +1 -1
- package/dist/{chunk-UVJZRFSY.cjs → chunk-2CLXY7EU.cjs} +96 -56
- package/dist/chunk-2CLXY7EU.cjs.map +1 -0
- package/dist/{chunk-PVID56QD.js → chunk-5V2QWK2S.js} +3 -3
- package/dist/{chunk-PVID56QD.js.map → chunk-5V2QWK2S.js.map} +1 -1
- package/dist/{chunk-BYCLHKAC.js → chunk-7HMXQIPK.js} +3 -3
- package/dist/{chunk-BYCLHKAC.js.map → chunk-7HMXQIPK.js.map} +1 -1
- package/dist/{chunk-KBSTGVA4.cjs → chunk-E2EYPHRE.cjs} +3 -3
- package/dist/{chunk-KBSTGVA4.cjs.map → chunk-E2EYPHRE.cjs.map} +1 -1
- package/dist/{chunk-CYOIFE4C.js → chunk-FYBFIW5N.js} +52 -12
- package/dist/chunk-FYBFIW5N.js.map +1 -0
- package/dist/{chunk-YD3A4BO6.js → chunk-GADWAAGI.js} +15 -7
- package/dist/chunk-GADWAAGI.js.map +1 -0
- package/dist/chunk-I6AIWII6.cjs +1138 -0
- package/dist/chunk-I6AIWII6.cjs.map +1 -0
- package/dist/{chunk-J2LKP5LL.js → chunk-ILVGJFCT.js} +3 -3
- package/dist/{chunk-J2LKP5LL.js.map → chunk-ILVGJFCT.js.map} +1 -1
- package/dist/{chunk-QGCSJMS7.cjs → chunk-L4V4FQDA.cjs} +3 -3
- package/dist/{chunk-QGCSJMS7.cjs.map → chunk-L4V4FQDA.cjs.map} +1 -1
- package/dist/{chunk-EVIEMZPA.cjs → chunk-L5D33443.cjs} +27 -3
- package/dist/chunk-L5D33443.cjs.map +1 -0
- package/dist/chunk-MYNSU6B4.js +1103 -0
- package/dist/chunk-MYNSU6B4.js.map +1 -0
- package/dist/{chunk-NIM337G7.cjs → chunk-PJLW25AQ.cjs} +75 -67
- package/dist/chunk-PJLW25AQ.cjs.map +1 -0
- package/dist/{chunk-N624P3VO.js → chunk-X7KQ23MW.js} +27 -3
- package/dist/chunk-X7KQ23MW.js.map +1 -0
- package/dist/{chunk-WMVLRIPB.cjs → chunk-Y3MYKCTO.cjs} +3 -3
- package/dist/{chunk-WMVLRIPB.cjs.map → chunk-Y3MYKCTO.cjs.map} +1 -1
- package/dist/{dist-7DWILFVQ.js → dist-OWZWIJZY.js} +15 -3
- package/dist/{dist-7DWILFVQ.js.map → dist-OWZWIJZY.js.map} +1 -1
- package/dist/{dist-FN5GSHL2.cjs → dist-TXDLPF66.cjs} +15 -3
- package/dist/{dist-FN5GSHL2.cjs.map → dist-TXDLPF66.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/handlers/agent-builder.cjs +17 -17
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/datasets.cjs +26 -26
- package/dist/server/handlers/datasets.d.ts +312 -6
- package/dist/server/handlers/datasets.d.ts.map +1 -1
- package/dist/server/handlers/datasets.js +1 -1
- package/dist/server/handlers/harness.cjs +144 -0
- package/dist/server/handlers/harness.cjs.map +1 -0
- package/dist/server/handlers/harness.d.ts +707 -0
- package/dist/server/handlers/harness.d.ts.map +1 -0
- package/dist/server/handlers/harness.js +3 -0
- package/dist/server/handlers/harness.js.map +1 -0
- package/dist/server/handlers/stored-skill-favorites.cjs +3 -3
- package/dist/server/handlers/stored-skill-favorites.js +1 -1
- package/dist/server/handlers/system.cjs +3 -3
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers.cjs +13 -13
- package/dist/server/handlers.js +4 -4
- package/dist/server/schemas/datasets.d.ts +150 -0
- package/dist/server/schemas/datasets.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +84 -84
- package/dist/server/schemas/index.js +3 -3
- package/dist/server/server-adapter/index.cjs +13 -13
- package/dist/server/server-adapter/index.js +2 -2
- package/dist/server/server-adapter/routes/datasets.d.ts +312 -6
- package/dist/server/server-adapter/routes/datasets.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/harness.d.ts +3 -0
- package/dist/server/server-adapter/routes/harness.d.ts.map +1 -0
- package/dist/server/server-adapter/routes/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-CYOIFE4C.js.map +0 -1
- package/dist/chunk-EVIEMZPA.cjs.map +0 -1
- package/dist/chunk-N624P3VO.js.map +0 -1
- package/dist/chunk-NIM337G7.cjs.map +0 -1
- package/dist/chunk-UVJZRFSY.cjs.map +0 -1
- package/dist/chunk-YD3A4BO6.js.map +0 -1
|
@@ -0,0 +1,1138 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZ7LCIYK7_cjs = require('./chunk-Z7LCIYK7.cjs');
|
|
4
|
+
var chunkG54X6VE6_cjs = require('./chunk-G54X6VE6.cjs');
|
|
5
|
+
var chunk64ITUOXI_cjs = require('./chunk-64ITUOXI.cjs');
|
|
6
|
+
var v4 = require('zod/v4');
|
|
7
|
+
|
|
8
|
+
function getHarnessOrThrow(mastra, harnessId) {
|
|
9
|
+
const harness = mastra.getHarness(harnessId);
|
|
10
|
+
if (!harness) {
|
|
11
|
+
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: `harness "${harnessId}" not found` });
|
|
12
|
+
}
|
|
13
|
+
return harness;
|
|
14
|
+
}
|
|
15
|
+
async function getSession(harness, resourceId) {
|
|
16
|
+
await harness.init();
|
|
17
|
+
return harness.createSession({ resourceId });
|
|
18
|
+
}
|
|
19
|
+
var harnessIdPathParams = v4.z.object({ harnessId: v4.z.string() });
|
|
20
|
+
var sessionPathParams = v4.z.object({ harnessId: v4.z.string(), resourceId: v4.z.string() });
|
|
21
|
+
var createSessionBodySchema = v4.z.object({ resourceId: v4.z.string() });
|
|
22
|
+
var sendMessageBodySchema = v4.z.object({ message: v4.z.string() });
|
|
23
|
+
var steerBodySchema = v4.z.object({ message: v4.z.string() });
|
|
24
|
+
var toolApprovalBodySchema = v4.z.object({
|
|
25
|
+
toolCallId: v4.z.string(),
|
|
26
|
+
approved: v4.z.boolean()
|
|
27
|
+
});
|
|
28
|
+
var toolSuspensionBodySchema = v4.z.object({
|
|
29
|
+
toolCallId: v4.z.string(),
|
|
30
|
+
// Free-form resume payload. For ask_user this is a string (or string[] for
|
|
31
|
+
// multi-select); for submit_plan it's `{ action, feedback? }`; for
|
|
32
|
+
// request_access it's "Yes"/"No".
|
|
33
|
+
resumeData: v4.z.any()
|
|
34
|
+
});
|
|
35
|
+
var switchModeBodySchema = v4.z.object({ modeId: v4.z.string() });
|
|
36
|
+
var switchModelBodySchema = v4.z.object({
|
|
37
|
+
modelId: v4.z.string(),
|
|
38
|
+
scope: v4.z.enum(["global", "thread"]).optional(),
|
|
39
|
+
modeId: v4.z.string().optional()
|
|
40
|
+
});
|
|
41
|
+
var switchThreadBodySchema = v4.z.object({ threadId: v4.z.string() });
|
|
42
|
+
var createThreadBodySchema = v4.z.object({ title: v4.z.string().optional() });
|
|
43
|
+
var renameThreadBodySchema = v4.z.object({ title: v4.z.string() });
|
|
44
|
+
var threadPathParams = v4.z.object({ harnessId: v4.z.string(), resourceId: v4.z.string(), threadId: v4.z.string() });
|
|
45
|
+
var cloneThreadBodySchema = v4.z.object({
|
|
46
|
+
sourceThreadId: v4.z.string().optional(),
|
|
47
|
+
title: v4.z.string().optional()
|
|
48
|
+
});
|
|
49
|
+
var listMessagesQuerySchema = v4.z.object({ limit: v4.z.coerce.number().optional() });
|
|
50
|
+
var listThreadsQuerySchema = v4.z.object({ limit: v4.z.coerce.number().optional() });
|
|
51
|
+
var followUpBodySchema = v4.z.object({ message: v4.z.string() });
|
|
52
|
+
var sendNotificationBodySchema = v4.z.object({
|
|
53
|
+
source: v4.z.string(),
|
|
54
|
+
kind: v4.z.string(),
|
|
55
|
+
summary: v4.z.string(),
|
|
56
|
+
priority: v4.z.enum(["low", "medium", "high", "urgent"]).optional(),
|
|
57
|
+
payload: v4.z.any().optional(),
|
|
58
|
+
sourceId: v4.z.string().optional(),
|
|
59
|
+
dedupeKey: v4.z.string().optional(),
|
|
60
|
+
coalesceKey: v4.z.string().optional(),
|
|
61
|
+
attributes: v4.z.record(v4.z.string(), v4.z.unknown()).optional(),
|
|
62
|
+
metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional()
|
|
63
|
+
});
|
|
64
|
+
var listHarnessesResponseSchema = v4.z.object({
|
|
65
|
+
harnesses: v4.z.array(v4.z.object({ id: v4.z.string() }))
|
|
66
|
+
});
|
|
67
|
+
var createSessionResponseSchema = v4.z.object({
|
|
68
|
+
harnessId: v4.z.string(),
|
|
69
|
+
resourceId: v4.z.string(),
|
|
70
|
+
threadId: v4.z.string().optional()
|
|
71
|
+
});
|
|
72
|
+
var ackResponseSchema = v4.z.object({ ok: v4.z.boolean() });
|
|
73
|
+
var sessionStateResponseSchema = v4.z.object({
|
|
74
|
+
harnessId: v4.z.string(),
|
|
75
|
+
resourceId: v4.z.string(),
|
|
76
|
+
threadId: v4.z.string().optional(),
|
|
77
|
+
modeId: v4.z.string(),
|
|
78
|
+
modelId: v4.z.string()
|
|
79
|
+
});
|
|
80
|
+
var listModesResponseSchema = v4.z.object({
|
|
81
|
+
modes: v4.z.array(v4.z.object({ id: v4.z.string(), name: v4.z.string().optional() }))
|
|
82
|
+
});
|
|
83
|
+
var listThreadsResponseSchema = v4.z.object({
|
|
84
|
+
threads: v4.z.array(
|
|
85
|
+
v4.z.object({
|
|
86
|
+
id: v4.z.string(),
|
|
87
|
+
title: v4.z.string().optional(),
|
|
88
|
+
updatedAt: v4.z.string().optional()
|
|
89
|
+
})
|
|
90
|
+
)
|
|
91
|
+
});
|
|
92
|
+
var threadResponseSchema = v4.z.object({
|
|
93
|
+
id: v4.z.string(),
|
|
94
|
+
title: v4.z.string().optional(),
|
|
95
|
+
resourceId: v4.z.string().optional(),
|
|
96
|
+
createdAt: v4.z.string().optional(),
|
|
97
|
+
updatedAt: v4.z.string().optional()
|
|
98
|
+
});
|
|
99
|
+
var messageContentSchema = v4.z.object({
|
|
100
|
+
type: v4.z.string()
|
|
101
|
+
}).passthrough();
|
|
102
|
+
var listMessagesResponseSchema = v4.z.object({
|
|
103
|
+
messages: v4.z.array(
|
|
104
|
+
v4.z.object({
|
|
105
|
+
id: v4.z.string(),
|
|
106
|
+
role: v4.z.enum(["user", "assistant", "system"]),
|
|
107
|
+
content: v4.z.array(messageContentSchema),
|
|
108
|
+
createdAt: v4.z.string().optional()
|
|
109
|
+
})
|
|
110
|
+
)
|
|
111
|
+
});
|
|
112
|
+
var listModelsResponseSchema = v4.z.object({
|
|
113
|
+
models: v4.z.array(
|
|
114
|
+
v4.z.object({
|
|
115
|
+
id: v4.z.string(),
|
|
116
|
+
provider: v4.z.string(),
|
|
117
|
+
modelName: v4.z.string(),
|
|
118
|
+
hasApiKey: v4.z.boolean(),
|
|
119
|
+
useCount: v4.z.number()
|
|
120
|
+
})
|
|
121
|
+
)
|
|
122
|
+
});
|
|
123
|
+
var workspaceStatusResponseSchema = v4.z.object({
|
|
124
|
+
hasWorkspace: v4.z.boolean(),
|
|
125
|
+
isReady: v4.z.boolean()
|
|
126
|
+
});
|
|
127
|
+
var omRecordResponseSchema = v4.z.object({
|
|
128
|
+
record: v4.z.any().optional()
|
|
129
|
+
});
|
|
130
|
+
var permissionPolicyEnum = v4.z.enum(["allow", "ask", "deny"]);
|
|
131
|
+
var toolCategoryEnum = v4.z.enum(["read", "edit", "execute", "mcp", "other"]);
|
|
132
|
+
var permissionRulesResponseSchema = v4.z.object({
|
|
133
|
+
categories: v4.z.record(v4.z.string(), permissionPolicyEnum).optional(),
|
|
134
|
+
tools: v4.z.record(v4.z.string(), permissionPolicyEnum).optional()
|
|
135
|
+
});
|
|
136
|
+
var setCategoryPermissionBodySchema = v4.z.object({
|
|
137
|
+
category: toolCategoryEnum,
|
|
138
|
+
policy: permissionPolicyEnum
|
|
139
|
+
});
|
|
140
|
+
var setToolPermissionBodySchema = v4.z.object({
|
|
141
|
+
toolName: v4.z.string(),
|
|
142
|
+
policy: permissionPolicyEnum
|
|
143
|
+
});
|
|
144
|
+
var LIST_HARNESSES_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
145
|
+
method: "GET",
|
|
146
|
+
path: "/harness",
|
|
147
|
+
responseType: "json",
|
|
148
|
+
responseSchema: listHarnessesResponseSchema,
|
|
149
|
+
summary: "List harnesses",
|
|
150
|
+
description: "Lists the harnesses hosted on this Mastra instance.",
|
|
151
|
+
tags: ["Harness"],
|
|
152
|
+
requiresAuth: true,
|
|
153
|
+
requiresPermission: "harness:read",
|
|
154
|
+
handler: async ({ mastra }) => {
|
|
155
|
+
try {
|
|
156
|
+
const harnesses = mastra.listHarnesses();
|
|
157
|
+
return { harnesses: Object.keys(harnesses).map((id) => ({ id })) };
|
|
158
|
+
} catch (error) {
|
|
159
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error listing harnesses");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
var CREATE_HARNESS_SESSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
164
|
+
method: "POST",
|
|
165
|
+
path: "/harness/:harnessId/sessions",
|
|
166
|
+
responseType: "json",
|
|
167
|
+
pathParamSchema: harnessIdPathParams,
|
|
168
|
+
bodySchema: createSessionBodySchema,
|
|
169
|
+
responseSchema: createSessionResponseSchema,
|
|
170
|
+
summary: "Create or resume a harness session",
|
|
171
|
+
description: "Creates a session for the given resourceId, or returns the existing one (get-or-create), so reconnects resume the conversation.",
|
|
172
|
+
tags: ["Harness"],
|
|
173
|
+
requiresAuth: true,
|
|
174
|
+
requiresPermission: "harness:execute",
|
|
175
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
176
|
+
try {
|
|
177
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
178
|
+
const session = await getSession(harness, resourceId);
|
|
179
|
+
return {
|
|
180
|
+
harnessId,
|
|
181
|
+
resourceId,
|
|
182
|
+
threadId: session.thread.getId() ?? void 0
|
|
183
|
+
};
|
|
184
|
+
} catch (error) {
|
|
185
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error creating harness session");
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
var STREAM_HARNESS_SESSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
190
|
+
method: "GET",
|
|
191
|
+
path: "/harness/:harnessId/sessions/:resourceId/stream",
|
|
192
|
+
responseType: "stream",
|
|
193
|
+
streamFormat: "sse",
|
|
194
|
+
sseFlushOnConnect: true,
|
|
195
|
+
pathParamSchema: sessionPathParams,
|
|
196
|
+
summary: "Stream harness session events",
|
|
197
|
+
description: "Subscribes to a session\u2019s event bus and streams events to the client over SSE.",
|
|
198
|
+
tags: ["Harness", "Streaming"],
|
|
199
|
+
requiresAuth: true,
|
|
200
|
+
requiresPermission: "harness:read",
|
|
201
|
+
handler: async ({ mastra, harnessId, resourceId, abortSignal }) => {
|
|
202
|
+
try {
|
|
203
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
204
|
+
const session = await getSession(harness, resourceId);
|
|
205
|
+
let cleanedUp = false;
|
|
206
|
+
let heartbeat;
|
|
207
|
+
let unsubscribe;
|
|
208
|
+
const clearHeartbeat = () => {
|
|
209
|
+
if (heartbeat) {
|
|
210
|
+
clearTimeout(heartbeat);
|
|
211
|
+
heartbeat = void 0;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
const cleanup = (controller) => {
|
|
215
|
+
if (cleanedUp) return;
|
|
216
|
+
cleanedUp = true;
|
|
217
|
+
clearHeartbeat();
|
|
218
|
+
unsubscribe?.();
|
|
219
|
+
if (controller) {
|
|
220
|
+
try {
|
|
221
|
+
controller.close();
|
|
222
|
+
} catch {
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
return new ReadableStream({
|
|
227
|
+
start(controller) {
|
|
228
|
+
const scheduleHeartbeat = () => {
|
|
229
|
+
if (cleanedUp) return;
|
|
230
|
+
clearHeartbeat();
|
|
231
|
+
heartbeat = setTimeout(() => {
|
|
232
|
+
heartbeat = void 0;
|
|
233
|
+
if (cleanedUp) return;
|
|
234
|
+
try {
|
|
235
|
+
controller.enqueue(": heartbeat\n\n");
|
|
236
|
+
} catch {
|
|
237
|
+
cleanup();
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
scheduleHeartbeat();
|
|
241
|
+
}, 25e3);
|
|
242
|
+
};
|
|
243
|
+
unsubscribe = session.subscribe((event) => {
|
|
244
|
+
if (cleanedUp) return;
|
|
245
|
+
try {
|
|
246
|
+
controller.enqueue(`data: ${JSON.stringify(event)}
|
|
247
|
+
|
|
248
|
+
`);
|
|
249
|
+
scheduleHeartbeat();
|
|
250
|
+
} catch {
|
|
251
|
+
cleanup();
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const abortCleanup = () => cleanup(controller);
|
|
255
|
+
abortSignal?.addEventListener("abort", abortCleanup, { once: true });
|
|
256
|
+
scheduleHeartbeat();
|
|
257
|
+
},
|
|
258
|
+
cancel() {
|
|
259
|
+
cleanup();
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
} catch (error) {
|
|
263
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error streaming harness session");
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
var SEND_HARNESS_MESSAGE_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
268
|
+
method: "POST",
|
|
269
|
+
path: "/harness/:harnessId/sessions/:resourceId/messages",
|
|
270
|
+
responseType: "json",
|
|
271
|
+
pathParamSchema: sessionPathParams,
|
|
272
|
+
bodySchema: sendMessageBodySchema,
|
|
273
|
+
responseSchema: ackResponseSchema,
|
|
274
|
+
summary: "Send a message to a harness session",
|
|
275
|
+
description: "Sends a user message to the session. The reply streams as events on the session\u2019s SSE stream.",
|
|
276
|
+
tags: ["Harness", "Streaming"],
|
|
277
|
+
requiresAuth: true,
|
|
278
|
+
requiresPermission: "harness:execute",
|
|
279
|
+
handler: async ({ mastra, harnessId, resourceId, message }) => {
|
|
280
|
+
try {
|
|
281
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
282
|
+
const session = await getSession(harness, resourceId);
|
|
283
|
+
void session.sendMessage({ content: message });
|
|
284
|
+
return { ok: true };
|
|
285
|
+
} catch (error) {
|
|
286
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error sending harness message");
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
var ABORT_HARNESS_SESSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
291
|
+
method: "POST",
|
|
292
|
+
path: "/harness/:harnessId/sessions/:resourceId/abort",
|
|
293
|
+
responseType: "json",
|
|
294
|
+
pathParamSchema: sessionPathParams,
|
|
295
|
+
responseSchema: ackResponseSchema,
|
|
296
|
+
summary: "Abort a harness session run",
|
|
297
|
+
description: "Aborts the in-flight run for the session, if any.",
|
|
298
|
+
tags: ["Harness"],
|
|
299
|
+
requiresAuth: true,
|
|
300
|
+
requiresPermission: "harness:execute",
|
|
301
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
302
|
+
try {
|
|
303
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
304
|
+
const session = await getSession(harness, resourceId);
|
|
305
|
+
session.abort();
|
|
306
|
+
return { ok: true };
|
|
307
|
+
} catch (error) {
|
|
308
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error aborting harness session");
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
var HARNESS_TOOL_APPROVAL_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
313
|
+
method: "POST",
|
|
314
|
+
path: "/harness/:harnessId/sessions/:resourceId/tool-approval",
|
|
315
|
+
responseType: "json",
|
|
316
|
+
pathParamSchema: sessionPathParams,
|
|
317
|
+
bodySchema: toolApprovalBodySchema,
|
|
318
|
+
responseSchema: ackResponseSchema,
|
|
319
|
+
summary: "Respond to a harness tool approval",
|
|
320
|
+
description: "Approves or declines a pending tool call surfaced by the session.",
|
|
321
|
+
tags: ["Harness"],
|
|
322
|
+
requiresAuth: true,
|
|
323
|
+
requiresPermission: "harness:execute",
|
|
324
|
+
handler: async ({ mastra, harnessId, resourceId, toolCallId, approved }) => {
|
|
325
|
+
try {
|
|
326
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
327
|
+
const session = await getSession(harness, resourceId);
|
|
328
|
+
session.respondToToolApproval({ toolCallId, decision: approved ? "approve" : "decline" });
|
|
329
|
+
return { ok: true };
|
|
330
|
+
} catch (error) {
|
|
331
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error responding to harness tool approval");
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
var HARNESS_TOOL_SUSPENSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
336
|
+
method: "POST",
|
|
337
|
+
path: "/harness/:harnessId/sessions/:resourceId/tool-suspension",
|
|
338
|
+
responseType: "json",
|
|
339
|
+
pathParamSchema: sessionPathParams,
|
|
340
|
+
bodySchema: toolSuspensionBodySchema,
|
|
341
|
+
responseSchema: ackResponseSchema,
|
|
342
|
+
summary: "Respond to a suspended harness tool",
|
|
343
|
+
description: "Resumes a suspended interactive tool (ask_user, request_access, submit_plan) with the provided resume data.",
|
|
344
|
+
tags: ["Harness"],
|
|
345
|
+
requiresAuth: true,
|
|
346
|
+
requiresPermission: "harness:execute",
|
|
347
|
+
handler: async ({ mastra, harnessId, resourceId, toolCallId, resumeData }) => {
|
|
348
|
+
try {
|
|
349
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
350
|
+
const session = await getSession(harness, resourceId);
|
|
351
|
+
await session.respondToToolSuspension({ toolCallId, resumeData });
|
|
352
|
+
return { ok: true };
|
|
353
|
+
} catch (error) {
|
|
354
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error responding to harness tool suspension");
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
var STEER_HARNESS_SESSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
359
|
+
method: "POST",
|
|
360
|
+
path: "/harness/:harnessId/sessions/:resourceId/steer",
|
|
361
|
+
responseType: "json",
|
|
362
|
+
pathParamSchema: sessionPathParams,
|
|
363
|
+
bodySchema: steerBodySchema,
|
|
364
|
+
responseSchema: ackResponseSchema,
|
|
365
|
+
summary: "Steer the in-flight run",
|
|
366
|
+
description: "Injects a message into the running turn (interjection) without starting a new run.",
|
|
367
|
+
tags: ["Harness"],
|
|
368
|
+
requiresAuth: true,
|
|
369
|
+
requiresPermission: "harness:execute",
|
|
370
|
+
handler: async ({ mastra, harnessId, resourceId, message }) => {
|
|
371
|
+
try {
|
|
372
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
373
|
+
const session = await getSession(harness, resourceId);
|
|
374
|
+
void session.steer({ content: message });
|
|
375
|
+
return { ok: true };
|
|
376
|
+
} catch (error) {
|
|
377
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error steering harness session");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
var SWITCH_HARNESS_MODE_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
382
|
+
method: "POST",
|
|
383
|
+
path: "/harness/:harnessId/sessions/:resourceId/mode",
|
|
384
|
+
responseType: "json",
|
|
385
|
+
pathParamSchema: sessionPathParams,
|
|
386
|
+
bodySchema: switchModeBodySchema,
|
|
387
|
+
responseSchema: ackResponseSchema,
|
|
388
|
+
summary: "Switch the session mode",
|
|
389
|
+
description: "Switches the active mode (e.g. build, plan) for the session.",
|
|
390
|
+
tags: ["Harness"],
|
|
391
|
+
requiresAuth: true,
|
|
392
|
+
requiresPermission: "harness:execute",
|
|
393
|
+
handler: async ({ mastra, harnessId, resourceId, modeId }) => {
|
|
394
|
+
try {
|
|
395
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
396
|
+
const session = await getSession(harness, resourceId);
|
|
397
|
+
await session.mode.switch({ modeId });
|
|
398
|
+
return { ok: true };
|
|
399
|
+
} catch (error) {
|
|
400
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error switching harness mode");
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
var SWITCH_HARNESS_MODEL_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
405
|
+
method: "POST",
|
|
406
|
+
path: "/harness/:harnessId/sessions/:resourceId/model",
|
|
407
|
+
responseType: "json",
|
|
408
|
+
pathParamSchema: sessionPathParams,
|
|
409
|
+
bodySchema: switchModelBodySchema,
|
|
410
|
+
responseSchema: ackResponseSchema,
|
|
411
|
+
summary: "Switch the session model",
|
|
412
|
+
description: "Switches the model for the session, scoped to the thread by default.",
|
|
413
|
+
tags: ["Harness"],
|
|
414
|
+
requiresAuth: true,
|
|
415
|
+
requiresPermission: "harness:execute",
|
|
416
|
+
handler: async ({ mastra, harnessId, resourceId, modelId, scope, modeId }) => {
|
|
417
|
+
try {
|
|
418
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
419
|
+
const session = await getSession(harness, resourceId);
|
|
420
|
+
await session.model.switch({ modelId, scope, modeId });
|
|
421
|
+
return { ok: true };
|
|
422
|
+
} catch (error) {
|
|
423
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error switching harness model");
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
var SWITCH_HARNESS_THREAD_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
428
|
+
method: "POST",
|
|
429
|
+
path: "/harness/:harnessId/sessions/:resourceId/thread",
|
|
430
|
+
responseType: "json",
|
|
431
|
+
pathParamSchema: sessionPathParams,
|
|
432
|
+
bodySchema: switchThreadBodySchema,
|
|
433
|
+
responseSchema: ackResponseSchema,
|
|
434
|
+
summary: "Switch the session thread",
|
|
435
|
+
description: "Switches the session to an existing thread (rebinding its stream and state).",
|
|
436
|
+
tags: ["Harness"],
|
|
437
|
+
requiresAuth: true,
|
|
438
|
+
requiresPermission: "harness:execute",
|
|
439
|
+
handler: async ({ mastra, harnessId, resourceId, threadId }) => {
|
|
440
|
+
try {
|
|
441
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
442
|
+
const session = await getSession(harness, resourceId);
|
|
443
|
+
await session.thread.switch({ threadId });
|
|
444
|
+
return { ok: true };
|
|
445
|
+
} catch (error) {
|
|
446
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error switching harness thread");
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
var GET_HARNESS_SESSION_STATE_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
451
|
+
method: "GET",
|
|
452
|
+
path: "/harness/:harnessId/sessions/:resourceId",
|
|
453
|
+
responseType: "json",
|
|
454
|
+
pathParamSchema: sessionPathParams,
|
|
455
|
+
responseSchema: sessionStateResponseSchema,
|
|
456
|
+
summary: "Get session state",
|
|
457
|
+
description: "Returns the current mode, model, and thread for the session (for initial UI hydration).",
|
|
458
|
+
tags: ["Harness"],
|
|
459
|
+
requiresAuth: true,
|
|
460
|
+
requiresPermission: "harness:read",
|
|
461
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
462
|
+
try {
|
|
463
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
464
|
+
const session = await getSession(harness, resourceId);
|
|
465
|
+
return {
|
|
466
|
+
harnessId,
|
|
467
|
+
resourceId,
|
|
468
|
+
threadId: session.thread.getId() ?? void 0,
|
|
469
|
+
modeId: session.mode.get(),
|
|
470
|
+
modelId: session.model.get()
|
|
471
|
+
};
|
|
472
|
+
} catch (error) {
|
|
473
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error reading harness session state");
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
var LIST_HARNESS_MODES_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
478
|
+
method: "GET",
|
|
479
|
+
path: "/harness/:harnessId/modes",
|
|
480
|
+
responseType: "json",
|
|
481
|
+
pathParamSchema: harnessIdPathParams,
|
|
482
|
+
responseSchema: listModesResponseSchema,
|
|
483
|
+
summary: "List harness modes",
|
|
484
|
+
description: "Lists the modes configured on the harness (e.g. build, plan).",
|
|
485
|
+
tags: ["Harness"],
|
|
486
|
+
requiresAuth: true,
|
|
487
|
+
requiresPermission: "harness:read",
|
|
488
|
+
handler: async ({ mastra, harnessId }) => {
|
|
489
|
+
try {
|
|
490
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
491
|
+
return {
|
|
492
|
+
modes: harness.listModes().map((mode) => ({ id: mode.id, name: mode.name }))
|
|
493
|
+
};
|
|
494
|
+
} catch (error) {
|
|
495
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error listing harness modes");
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
var LIST_HARNESS_THREADS_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
500
|
+
method: "GET",
|
|
501
|
+
path: "/harness/:harnessId/sessions/:resourceId/threads",
|
|
502
|
+
responseType: "json",
|
|
503
|
+
pathParamSchema: sessionPathParams,
|
|
504
|
+
queryParamSchema: listThreadsQuerySchema,
|
|
505
|
+
responseSchema: listThreadsResponseSchema,
|
|
506
|
+
summary: "List session threads",
|
|
507
|
+
description: "Lists the threads for the session\u2019s resource, most-recently-updated first. Pass `limit` to return only the newest N (e.g. for a sidebar).",
|
|
508
|
+
tags: ["Harness"],
|
|
509
|
+
requiresAuth: true,
|
|
510
|
+
requiresPermission: "harness:read",
|
|
511
|
+
handler: async ({ mastra, harnessId, resourceId, limit }) => {
|
|
512
|
+
try {
|
|
513
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
514
|
+
const session = await getSession(harness, resourceId);
|
|
515
|
+
const threads = await session.thread.list();
|
|
516
|
+
const toTime = (t) => (t.updatedAt ?? t.createdAt)?.getTime() ?? 0;
|
|
517
|
+
const sorted = [...threads].sort((a, b) => toTime(b) - toTime(a));
|
|
518
|
+
const max = Number(limit);
|
|
519
|
+
const limited = Number.isFinite(max) && max > 0 ? sorted.slice(0, max) : sorted;
|
|
520
|
+
return {
|
|
521
|
+
threads: limited.map((t) => ({
|
|
522
|
+
id: t.id,
|
|
523
|
+
title: t.title,
|
|
524
|
+
updatedAt: t.updatedAt instanceof Date ? t.updatedAt.toISOString() : void 0
|
|
525
|
+
}))
|
|
526
|
+
};
|
|
527
|
+
} catch (error) {
|
|
528
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error listing harness threads");
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
var SEND_HARNESS_NOTIFICATION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
533
|
+
method: "POST",
|
|
534
|
+
path: "/harness/:harnessId/sessions/:resourceId/notifications",
|
|
535
|
+
responseType: "json",
|
|
536
|
+
pathParamSchema: sessionPathParams,
|
|
537
|
+
bodySchema: sendNotificationBodySchema,
|
|
538
|
+
responseSchema: v4.z.object({
|
|
539
|
+
accepted: v4.z.boolean(),
|
|
540
|
+
notificationId: v4.z.string().optional(),
|
|
541
|
+
decision: v4.z.string().optional(),
|
|
542
|
+
runId: v4.z.string().optional()
|
|
543
|
+
}),
|
|
544
|
+
summary: "Send a notification signal to a session",
|
|
545
|
+
description: "Delivers a notification to the session\u2019s current agent/thread. The agent\u2019s delivery policy determines whether the notification wakes an idle thread, is summarised, or is persisted for later.",
|
|
546
|
+
tags: ["Harness"],
|
|
547
|
+
requiresAuth: true,
|
|
548
|
+
requiresPermission: "harness:execute",
|
|
549
|
+
handler: async ({
|
|
550
|
+
mastra,
|
|
551
|
+
harnessId,
|
|
552
|
+
resourceId,
|
|
553
|
+
source,
|
|
554
|
+
kind,
|
|
555
|
+
summary,
|
|
556
|
+
priority,
|
|
557
|
+
payload,
|
|
558
|
+
sourceId,
|
|
559
|
+
dedupeKey,
|
|
560
|
+
coalesceKey,
|
|
561
|
+
attributes,
|
|
562
|
+
metadata
|
|
563
|
+
}) => {
|
|
564
|
+
try {
|
|
565
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
566
|
+
const session = await getSession(harness, resourceId);
|
|
567
|
+
const result = await session.sendNotificationSignal({
|
|
568
|
+
source,
|
|
569
|
+
kind,
|
|
570
|
+
summary,
|
|
571
|
+
priority,
|
|
572
|
+
payload,
|
|
573
|
+
sourceId,
|
|
574
|
+
dedupeKey,
|
|
575
|
+
coalesceKey,
|
|
576
|
+
attributes,
|
|
577
|
+
metadata
|
|
578
|
+
});
|
|
579
|
+
return {
|
|
580
|
+
accepted: result.accepted !== void 0,
|
|
581
|
+
notificationId: result.record?.id,
|
|
582
|
+
decision: result.decision?.action,
|
|
583
|
+
runId: result.runId
|
|
584
|
+
};
|
|
585
|
+
} catch (error) {
|
|
586
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error sending harness notification");
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
var CREATE_HARNESS_THREAD_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
591
|
+
method: "POST",
|
|
592
|
+
path: "/harness/:harnessId/sessions/:resourceId/threads",
|
|
593
|
+
responseType: "json",
|
|
594
|
+
pathParamSchema: sessionPathParams,
|
|
595
|
+
bodySchema: createThreadBodySchema,
|
|
596
|
+
responseSchema: threadResponseSchema,
|
|
597
|
+
summary: "Create a new thread",
|
|
598
|
+
description: "Creates a new thread in the session (unbinds the previous thread, binds the new one).",
|
|
599
|
+
tags: ["Harness", "Threads"],
|
|
600
|
+
requiresAuth: true,
|
|
601
|
+
requiresPermission: "harness:execute",
|
|
602
|
+
handler: async ({ mastra, harnessId, resourceId, title }) => {
|
|
603
|
+
try {
|
|
604
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
605
|
+
const session = await getSession(harness, resourceId);
|
|
606
|
+
const thread = await session.thread.create({ title });
|
|
607
|
+
return {
|
|
608
|
+
id: thread.id,
|
|
609
|
+
title: thread.title,
|
|
610
|
+
resourceId: thread.resourceId,
|
|
611
|
+
createdAt: thread.createdAt instanceof Date ? thread.createdAt.toISOString() : void 0,
|
|
612
|
+
updatedAt: thread.updatedAt instanceof Date ? thread.updatedAt.toISOString() : void 0
|
|
613
|
+
};
|
|
614
|
+
} catch (error) {
|
|
615
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error creating harness thread");
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
var DELETE_HARNESS_THREAD_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
620
|
+
method: "DELETE",
|
|
621
|
+
path: "/harness/:harnessId/sessions/:resourceId/threads/:threadId",
|
|
622
|
+
responseType: "json",
|
|
623
|
+
pathParamSchema: threadPathParams,
|
|
624
|
+
responseSchema: ackResponseSchema,
|
|
625
|
+
summary: "Delete a thread",
|
|
626
|
+
description: "Deletes a thread. If the deleted thread is the active one, the session is unbound.",
|
|
627
|
+
tags: ["Harness", "Threads"],
|
|
628
|
+
requiresAuth: true,
|
|
629
|
+
requiresPermission: "harness:execute",
|
|
630
|
+
handler: async ({ mastra, harnessId, resourceId, threadId }) => {
|
|
631
|
+
try {
|
|
632
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
633
|
+
const session = await getSession(harness, resourceId);
|
|
634
|
+
await session.thread.delete({ threadId });
|
|
635
|
+
return { ok: true };
|
|
636
|
+
} catch (error) {
|
|
637
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error deleting harness thread");
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
var RENAME_HARNESS_THREAD_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
642
|
+
method: "PUT",
|
|
643
|
+
path: "/harness/:harnessId/sessions/:resourceId/threads/:threadId",
|
|
644
|
+
responseType: "json",
|
|
645
|
+
pathParamSchema: threadPathParams,
|
|
646
|
+
bodySchema: renameThreadBodySchema,
|
|
647
|
+
responseSchema: ackResponseSchema,
|
|
648
|
+
summary: "Rename a thread",
|
|
649
|
+
description: "Renames the specified thread.",
|
|
650
|
+
tags: ["Harness", "Threads"],
|
|
651
|
+
requiresAuth: true,
|
|
652
|
+
requiresPermission: "harness:execute",
|
|
653
|
+
handler: async ({ mastra, harnessId, resourceId, threadId, title }) => {
|
|
654
|
+
try {
|
|
655
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
656
|
+
const session = await getSession(harness, resourceId);
|
|
657
|
+
if (session.thread.getId() !== threadId) {
|
|
658
|
+
await session.thread.switch({ threadId });
|
|
659
|
+
}
|
|
660
|
+
await session.thread.rename({ title });
|
|
661
|
+
return { ok: true };
|
|
662
|
+
} catch (error) {
|
|
663
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error renaming harness thread");
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
var CLONE_HARNESS_THREAD_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
668
|
+
method: "POST",
|
|
669
|
+
path: "/harness/:harnessId/sessions/:resourceId/threads/clone",
|
|
670
|
+
responseType: "json",
|
|
671
|
+
pathParamSchema: sessionPathParams,
|
|
672
|
+
bodySchema: cloneThreadBodySchema,
|
|
673
|
+
responseSchema: threadResponseSchema,
|
|
674
|
+
summary: "Clone a thread",
|
|
675
|
+
description: "Clones a thread (and its messages). The session binds to the new clone.",
|
|
676
|
+
tags: ["Harness", "Threads"],
|
|
677
|
+
requiresAuth: true,
|
|
678
|
+
requiresPermission: "harness:execute",
|
|
679
|
+
handler: async ({ mastra, harnessId, resourceId, sourceThreadId, title }) => {
|
|
680
|
+
try {
|
|
681
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
682
|
+
const session = await getSession(harness, resourceId);
|
|
683
|
+
const thread = await session.thread.clone({ sourceThreadId, title });
|
|
684
|
+
return {
|
|
685
|
+
id: thread.id,
|
|
686
|
+
title: thread.title,
|
|
687
|
+
resourceId: thread.resourceId,
|
|
688
|
+
createdAt: thread.createdAt instanceof Date ? thread.createdAt.toISOString() : void 0,
|
|
689
|
+
updatedAt: thread.updatedAt instanceof Date ? thread.updatedAt.toISOString() : void 0
|
|
690
|
+
};
|
|
691
|
+
} catch (error) {
|
|
692
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error cloning harness thread");
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
var LIST_HARNESS_THREAD_MESSAGES_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
697
|
+
method: "GET",
|
|
698
|
+
path: "/harness/:harnessId/sessions/:resourceId/threads/:threadId/messages",
|
|
699
|
+
responseType: "json",
|
|
700
|
+
pathParamSchema: threadPathParams,
|
|
701
|
+
queryParamSchema: listMessagesQuerySchema,
|
|
702
|
+
responseSchema: listMessagesResponseSchema,
|
|
703
|
+
summary: "List thread messages",
|
|
704
|
+
description: "Lists messages for a specific thread. Returns most recent messages first.",
|
|
705
|
+
tags: ["Harness", "Threads"],
|
|
706
|
+
requiresAuth: true,
|
|
707
|
+
requiresPermission: "harness:read",
|
|
708
|
+
handler: async ({ mastra, harnessId, resourceId, threadId, limit }) => {
|
|
709
|
+
try {
|
|
710
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
711
|
+
const session = await getSession(harness, resourceId);
|
|
712
|
+
const messages = await session.thread.listMessages({ threadId, limit });
|
|
713
|
+
return {
|
|
714
|
+
messages: messages.map((m) => ({
|
|
715
|
+
id: m.id,
|
|
716
|
+
role: m.role,
|
|
717
|
+
content: m.content,
|
|
718
|
+
createdAt: m.createdAt instanceof Date ? m.createdAt.toISOString() : void 0
|
|
719
|
+
}))
|
|
720
|
+
};
|
|
721
|
+
} catch (error) {
|
|
722
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error listing harness thread messages");
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
var FOLLOW_UP_HARNESS_SESSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
727
|
+
method: "POST",
|
|
728
|
+
path: "/harness/:harnessId/sessions/:resourceId/follow-up",
|
|
729
|
+
responseType: "json",
|
|
730
|
+
pathParamSchema: sessionPathParams,
|
|
731
|
+
bodySchema: followUpBodySchema,
|
|
732
|
+
responseSchema: ackResponseSchema,
|
|
733
|
+
summary: "Queue a follow-up message",
|
|
734
|
+
description: "Queues a follow-up message. If the session is idle it sends immediately; if a run is active it queues for after completion.",
|
|
735
|
+
tags: ["Harness"],
|
|
736
|
+
requiresAuth: true,
|
|
737
|
+
requiresPermission: "harness:execute",
|
|
738
|
+
handler: async ({ mastra, harnessId, resourceId, message }) => {
|
|
739
|
+
try {
|
|
740
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
741
|
+
const session = await getSession(harness, resourceId);
|
|
742
|
+
void session.followUp({ content: message });
|
|
743
|
+
return { ok: true };
|
|
744
|
+
} catch (error) {
|
|
745
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error queuing harness follow-up");
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
var LIST_HARNESS_MODELS_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
750
|
+
method: "GET",
|
|
751
|
+
path: "/harness/:harnessId/models",
|
|
752
|
+
responseType: "json",
|
|
753
|
+
pathParamSchema: harnessIdPathParams,
|
|
754
|
+
responseSchema: listModelsResponseSchema,
|
|
755
|
+
summary: "List available models",
|
|
756
|
+
description: "Lists all models available on this harness (with auth status and use counts).",
|
|
757
|
+
tags: ["Harness"],
|
|
758
|
+
requiresAuth: true,
|
|
759
|
+
requiresPermission: "harness:read",
|
|
760
|
+
handler: async ({ mastra, harnessId }) => {
|
|
761
|
+
try {
|
|
762
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
763
|
+
await harness.init();
|
|
764
|
+
const models = await harness.listAvailableModels();
|
|
765
|
+
return {
|
|
766
|
+
models: models.map((m) => ({
|
|
767
|
+
id: m.id,
|
|
768
|
+
provider: m.provider,
|
|
769
|
+
modelName: m.modelName,
|
|
770
|
+
hasApiKey: m.hasApiKey,
|
|
771
|
+
useCount: m.useCount
|
|
772
|
+
}))
|
|
773
|
+
};
|
|
774
|
+
} catch (error) {
|
|
775
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error listing harness models");
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
var GET_HARNESS_WORKSPACE_STATUS_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
780
|
+
method: "GET",
|
|
781
|
+
path: "/harness/:harnessId/workspace",
|
|
782
|
+
responseType: "json",
|
|
783
|
+
pathParamSchema: harnessIdPathParams,
|
|
784
|
+
responseSchema: workspaceStatusResponseSchema,
|
|
785
|
+
summary: "Get workspace status",
|
|
786
|
+
description: "Returns whether the harness has a workspace configured and whether it is ready.",
|
|
787
|
+
tags: ["Harness"],
|
|
788
|
+
requiresAuth: true,
|
|
789
|
+
requiresPermission: "harness:read",
|
|
790
|
+
handler: async ({ mastra, harnessId }) => {
|
|
791
|
+
try {
|
|
792
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
793
|
+
await harness.init();
|
|
794
|
+
return {
|
|
795
|
+
hasWorkspace: harness.hasWorkspace(),
|
|
796
|
+
isReady: harness.isWorkspaceReady()
|
|
797
|
+
};
|
|
798
|
+
} catch (error) {
|
|
799
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error reading harness workspace status");
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
var GET_HARNESS_OM_RECORD_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
804
|
+
method: "GET",
|
|
805
|
+
path: "/harness/:harnessId/sessions/:resourceId/om",
|
|
806
|
+
responseType: "json",
|
|
807
|
+
pathParamSchema: sessionPathParams,
|
|
808
|
+
responseSchema: omRecordResponseSchema,
|
|
809
|
+
summary: "Get observational memory record",
|
|
810
|
+
description: "Returns the current observational memory record for the session\u2019s thread/resource.",
|
|
811
|
+
tags: ["Harness"],
|
|
812
|
+
requiresAuth: true,
|
|
813
|
+
requiresPermission: "harness:read",
|
|
814
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
815
|
+
try {
|
|
816
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
817
|
+
const session = await getSession(harness, resourceId);
|
|
818
|
+
const record = await harness.getObservationalMemoryRecord(session);
|
|
819
|
+
return { record: record ?? void 0 };
|
|
820
|
+
} catch (error) {
|
|
821
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error reading harness OM record");
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
var SET_HARNESS_RESOURCE_ID_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
826
|
+
method: "POST",
|
|
827
|
+
path: "/harness/:harnessId/sessions/:resourceId/resource",
|
|
828
|
+
responseType: "json",
|
|
829
|
+
pathParamSchema: sessionPathParams,
|
|
830
|
+
bodySchema: v4.z.object({ newResourceId: v4.z.string() }),
|
|
831
|
+
responseSchema: ackResponseSchema,
|
|
832
|
+
summary: "Change the session resource ID",
|
|
833
|
+
description: "Updates the session\u2019s resource identity (e.g. when a user logs in).",
|
|
834
|
+
tags: ["Harness"],
|
|
835
|
+
requiresAuth: true,
|
|
836
|
+
requiresPermission: "harness:execute",
|
|
837
|
+
handler: async ({ mastra, harnessId, resourceId, newResourceId }) => {
|
|
838
|
+
try {
|
|
839
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
840
|
+
const session = await getSession(harness, resourceId);
|
|
841
|
+
await harness.setResourceId(session, { resourceId: newResourceId });
|
|
842
|
+
return { ok: true };
|
|
843
|
+
} catch (error) {
|
|
844
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error setting harness resource ID");
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
var GET_HARNESS_RESOURCE_IDS_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
849
|
+
method: "GET",
|
|
850
|
+
path: "/harness/:harnessId/sessions/:resourceId/resources",
|
|
851
|
+
responseType: "json",
|
|
852
|
+
pathParamSchema: sessionPathParams,
|
|
853
|
+
responseSchema: v4.z.object({ resourceIds: v4.z.array(v4.z.string()) }),
|
|
854
|
+
summary: "Get known resource IDs",
|
|
855
|
+
description: "Lists the resource IDs known to this session (from threads).",
|
|
856
|
+
tags: ["Harness"],
|
|
857
|
+
requiresAuth: true,
|
|
858
|
+
requiresPermission: "harness:read",
|
|
859
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
860
|
+
try {
|
|
861
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
862
|
+
const session = await getSession(harness, resourceId);
|
|
863
|
+
const resourceIds = await harness.getKnownResourceIds(session);
|
|
864
|
+
return { resourceIds };
|
|
865
|
+
} catch (error) {
|
|
866
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error listing harness resource IDs");
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
var setGoalBodySchema = v4.z.object({
|
|
871
|
+
objective: v4.z.string(),
|
|
872
|
+
judgeModelId: v4.z.string().optional(),
|
|
873
|
+
maxRuns: v4.z.number().optional()
|
|
874
|
+
});
|
|
875
|
+
var updateGoalBodySchema = v4.z.object({
|
|
876
|
+
judgeModelId: v4.z.string().optional(),
|
|
877
|
+
maxRuns: v4.z.number().optional(),
|
|
878
|
+
status: v4.z.enum(["active", "paused", "done"]).optional()
|
|
879
|
+
});
|
|
880
|
+
var goalRecordSchema = v4.z.object({
|
|
881
|
+
id: v4.z.string().optional(),
|
|
882
|
+
objective: v4.z.string(),
|
|
883
|
+
status: v4.z.enum(["active", "paused", "done"]),
|
|
884
|
+
runsUsed: v4.z.number(),
|
|
885
|
+
maxRuns: v4.z.number().optional(),
|
|
886
|
+
judgeModelId: v4.z.string().optional(),
|
|
887
|
+
startedAt: v4.z.number(),
|
|
888
|
+
updatedAt: v4.z.number(),
|
|
889
|
+
pausedReason: v4.z.string().optional()
|
|
890
|
+
});
|
|
891
|
+
var goalResponseSchema = v4.z.object({ goal: goalRecordSchema.optional() });
|
|
892
|
+
function getAgentForSession(harness, session) {
|
|
893
|
+
return harness.getCurrentAgent(session);
|
|
894
|
+
}
|
|
895
|
+
var GET_HARNESS_GOAL_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
896
|
+
method: "GET",
|
|
897
|
+
path: "/harness/:harnessId/sessions/:resourceId/goal",
|
|
898
|
+
responseType: "json",
|
|
899
|
+
pathParamSchema: sessionPathParams,
|
|
900
|
+
responseSchema: goalResponseSchema,
|
|
901
|
+
summary: "Get the current goal",
|
|
902
|
+
description: "Returns the active/paused/done goal objective for the session\u2019s thread, if any.",
|
|
903
|
+
tags: ["Harness", "Goals"],
|
|
904
|
+
requiresAuth: true,
|
|
905
|
+
requiresPermission: "harness:read",
|
|
906
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
907
|
+
try {
|
|
908
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
909
|
+
const session = await getSession(harness, resourceId);
|
|
910
|
+
const threadId = session.thread.getId();
|
|
911
|
+
if (!threadId) return { goal: void 0 };
|
|
912
|
+
const agent = getAgentForSession(harness, session);
|
|
913
|
+
const record = await agent.getObjective({ threadId });
|
|
914
|
+
return { goal: record ?? void 0 };
|
|
915
|
+
} catch (error) {
|
|
916
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error reading harness goal");
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
var SET_HARNESS_GOAL_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
921
|
+
method: "POST",
|
|
922
|
+
path: "/harness/:harnessId/sessions/:resourceId/goal",
|
|
923
|
+
responseType: "json",
|
|
924
|
+
pathParamSchema: sessionPathParams,
|
|
925
|
+
bodySchema: setGoalBodySchema,
|
|
926
|
+
responseSchema: goalResponseSchema,
|
|
927
|
+
summary: "Set a goal",
|
|
928
|
+
description: "Sets a new objective for the session\u2019s thread. The agent\u2019s in-loop goal judge evaluates progress after each turn.",
|
|
929
|
+
tags: ["Harness", "Goals"],
|
|
930
|
+
requiresAuth: true,
|
|
931
|
+
requiresPermission: "harness:execute",
|
|
932
|
+
handler: async ({ mastra, harnessId, resourceId, objective, judgeModelId, maxRuns }) => {
|
|
933
|
+
try {
|
|
934
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
935
|
+
const session = await getSession(harness, resourceId);
|
|
936
|
+
const threadId = session.thread.getId();
|
|
937
|
+
if (!threadId) throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "session has no active thread" });
|
|
938
|
+
const agent = getAgentForSession(harness, session);
|
|
939
|
+
const record = await agent.setObjective(objective, {
|
|
940
|
+
threadId,
|
|
941
|
+
resourceId: session.identity.getResourceId(),
|
|
942
|
+
...judgeModelId ? { judgeModelId } : {},
|
|
943
|
+
...maxRuns != null ? { maxRuns } : {}
|
|
944
|
+
});
|
|
945
|
+
return { goal: record ?? void 0 };
|
|
946
|
+
} catch (error) {
|
|
947
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error setting harness goal");
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
var UPDATE_HARNESS_GOAL_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
952
|
+
method: "PUT",
|
|
953
|
+
path: "/harness/:harnessId/sessions/:resourceId/goal",
|
|
954
|
+
responseType: "json",
|
|
955
|
+
pathParamSchema: sessionPathParams,
|
|
956
|
+
bodySchema: updateGoalBodySchema,
|
|
957
|
+
responseSchema: goalResponseSchema,
|
|
958
|
+
summary: "Update goal options",
|
|
959
|
+
description: "Updates the judge model, max runs, or status of the active goal. No-op when no goal is set.",
|
|
960
|
+
tags: ["Harness", "Goals"],
|
|
961
|
+
requiresAuth: true,
|
|
962
|
+
requiresPermission: "harness:execute",
|
|
963
|
+
handler: async ({ mastra, harnessId, resourceId, judgeModelId, maxRuns, status }) => {
|
|
964
|
+
try {
|
|
965
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
966
|
+
const session = await getSession(harness, resourceId);
|
|
967
|
+
const threadId = session.thread.getId();
|
|
968
|
+
if (!threadId) throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "session has no active thread" });
|
|
969
|
+
const agent = getAgentForSession(harness, session);
|
|
970
|
+
const record = await agent.updateObjectiveOptions({
|
|
971
|
+
threadId,
|
|
972
|
+
...judgeModelId !== void 0 ? { judgeModelId } : {},
|
|
973
|
+
...maxRuns !== void 0 ? { maxRuns } : {},
|
|
974
|
+
...status !== void 0 ? { status } : {}
|
|
975
|
+
});
|
|
976
|
+
return { goal: record ?? void 0 };
|
|
977
|
+
} catch (error) {
|
|
978
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error updating harness goal");
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
var CLEAR_HARNESS_GOAL_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
983
|
+
method: "DELETE",
|
|
984
|
+
path: "/harness/:harnessId/sessions/:resourceId/goal",
|
|
985
|
+
responseType: "json",
|
|
986
|
+
pathParamSchema: sessionPathParams,
|
|
987
|
+
responseSchema: ackResponseSchema,
|
|
988
|
+
summary: "Clear the goal",
|
|
989
|
+
description: "Removes the active goal from the session\u2019s thread.",
|
|
990
|
+
tags: ["Harness", "Goals"],
|
|
991
|
+
requiresAuth: true,
|
|
992
|
+
requiresPermission: "harness:execute",
|
|
993
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
994
|
+
try {
|
|
995
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
996
|
+
const session = await getSession(harness, resourceId);
|
|
997
|
+
const threadId = session.thread.getId();
|
|
998
|
+
if (!threadId) throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "session has no active thread" });
|
|
999
|
+
const agent = getAgentForSession(harness, session);
|
|
1000
|
+
await agent.clearObjective({ threadId });
|
|
1001
|
+
return { ok: true };
|
|
1002
|
+
} catch (error) {
|
|
1003
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error clearing harness goal");
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
var GET_HARNESS_PERMISSIONS_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
1008
|
+
method: "GET",
|
|
1009
|
+
path: "/harness/:harnessId/sessions/:resourceId/permissions",
|
|
1010
|
+
responseType: "json",
|
|
1011
|
+
pathParamSchema: sessionPathParams,
|
|
1012
|
+
responseSchema: permissionRulesResponseSchema,
|
|
1013
|
+
summary: "Get permission rules",
|
|
1014
|
+
description: "Returns the current permission rules (per-category and per-tool policies) for the session.",
|
|
1015
|
+
tags: ["Harness", "Permissions"],
|
|
1016
|
+
requiresAuth: true,
|
|
1017
|
+
requiresPermission: "harness:read",
|
|
1018
|
+
handler: async ({ mastra, harnessId, resourceId }) => {
|
|
1019
|
+
try {
|
|
1020
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
1021
|
+
const session = await getSession(harness, resourceId);
|
|
1022
|
+
const rules = session.permissions.getRules();
|
|
1023
|
+
return {
|
|
1024
|
+
categories: rules.categories,
|
|
1025
|
+
tools: rules.tools
|
|
1026
|
+
};
|
|
1027
|
+
} catch (error) {
|
|
1028
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error getting harness permissions");
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
var SET_HARNESS_CATEGORY_PERMISSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
1033
|
+
method: "PUT",
|
|
1034
|
+
path: "/harness/:harnessId/sessions/:resourceId/permissions/category",
|
|
1035
|
+
responseType: "json",
|
|
1036
|
+
pathParamSchema: sessionPathParams,
|
|
1037
|
+
bodySchema: setCategoryPermissionBodySchema,
|
|
1038
|
+
responseSchema: ackResponseSchema,
|
|
1039
|
+
summary: "Set permission for a tool category",
|
|
1040
|
+
description: "Sets the approval policy (allow/ask/deny) for all tools in a category.",
|
|
1041
|
+
tags: ["Harness", "Permissions"],
|
|
1042
|
+
requiresAuth: true,
|
|
1043
|
+
requiresPermission: "harness:execute",
|
|
1044
|
+
handler: async ({ mastra, harnessId, resourceId, category, policy }) => {
|
|
1045
|
+
try {
|
|
1046
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
1047
|
+
const session = await getSession(harness, resourceId);
|
|
1048
|
+
await session.permissions.setForCategory({ category, policy });
|
|
1049
|
+
return { ok: true };
|
|
1050
|
+
} catch (error) {
|
|
1051
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error setting harness category permission");
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
});
|
|
1055
|
+
var SET_HARNESS_TOOL_PERMISSION_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
1056
|
+
method: "PUT",
|
|
1057
|
+
path: "/harness/:harnessId/sessions/:resourceId/permissions/tool",
|
|
1058
|
+
responseType: "json",
|
|
1059
|
+
pathParamSchema: sessionPathParams,
|
|
1060
|
+
bodySchema: setToolPermissionBodySchema,
|
|
1061
|
+
responseSchema: ackResponseSchema,
|
|
1062
|
+
summary: "Set permission for a specific tool",
|
|
1063
|
+
description: "Sets the approval policy (allow/ask/deny) for a specific tool by name. Per-tool overrides take precedence over category policies.",
|
|
1064
|
+
tags: ["Harness", "Permissions"],
|
|
1065
|
+
requiresAuth: true,
|
|
1066
|
+
requiresPermission: "harness:execute",
|
|
1067
|
+
handler: async ({ mastra, harnessId, resourceId, toolName, policy }) => {
|
|
1068
|
+
try {
|
|
1069
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
1070
|
+
const session = await getSession(harness, resourceId);
|
|
1071
|
+
await session.permissions.setForTool({ toolName, policy });
|
|
1072
|
+
return { ok: true };
|
|
1073
|
+
} catch (error) {
|
|
1074
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error setting harness tool permission");
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
var setSessionStateBodySchema = v4.z.object({ state: v4.z.record(v4.z.string(), v4.z.unknown()) });
|
|
1079
|
+
var SET_HARNESS_SESSION_STATE_ROUTE = chunkG54X6VE6_cjs.createRoute({
|
|
1080
|
+
method: "PUT",
|
|
1081
|
+
path: "/harness/:harnessId/sessions/:resourceId/state",
|
|
1082
|
+
responseType: "json",
|
|
1083
|
+
pathParamSchema: sessionPathParams,
|
|
1084
|
+
bodySchema: setSessionStateBodySchema,
|
|
1085
|
+
responseSchema: ackResponseSchema,
|
|
1086
|
+
summary: "Set session state",
|
|
1087
|
+
description: "Merges the provided key-value pairs into the session state. Existing keys not in the payload are preserved.",
|
|
1088
|
+
tags: ["Harness"],
|
|
1089
|
+
requiresAuth: true,
|
|
1090
|
+
requiresPermission: "harness:execute",
|
|
1091
|
+
handler: async ({ mastra, harnessId, resourceId, state }) => {
|
|
1092
|
+
try {
|
|
1093
|
+
const harness = getHarnessOrThrow(mastra, harnessId);
|
|
1094
|
+
const session = await getSession(harness, resourceId);
|
|
1095
|
+
await session.state.set(state);
|
|
1096
|
+
return { ok: true };
|
|
1097
|
+
} catch (error) {
|
|
1098
|
+
return chunkZ7LCIYK7_cjs.handleError(error, "error setting harness session state");
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
exports.ABORT_HARNESS_SESSION_ROUTE = ABORT_HARNESS_SESSION_ROUTE;
|
|
1104
|
+
exports.CLEAR_HARNESS_GOAL_ROUTE = CLEAR_HARNESS_GOAL_ROUTE;
|
|
1105
|
+
exports.CLONE_HARNESS_THREAD_ROUTE = CLONE_HARNESS_THREAD_ROUTE;
|
|
1106
|
+
exports.CREATE_HARNESS_SESSION_ROUTE = CREATE_HARNESS_SESSION_ROUTE;
|
|
1107
|
+
exports.CREATE_HARNESS_THREAD_ROUTE = CREATE_HARNESS_THREAD_ROUTE;
|
|
1108
|
+
exports.DELETE_HARNESS_THREAD_ROUTE = DELETE_HARNESS_THREAD_ROUTE;
|
|
1109
|
+
exports.FOLLOW_UP_HARNESS_SESSION_ROUTE = FOLLOW_UP_HARNESS_SESSION_ROUTE;
|
|
1110
|
+
exports.GET_HARNESS_GOAL_ROUTE = GET_HARNESS_GOAL_ROUTE;
|
|
1111
|
+
exports.GET_HARNESS_OM_RECORD_ROUTE = GET_HARNESS_OM_RECORD_ROUTE;
|
|
1112
|
+
exports.GET_HARNESS_PERMISSIONS_ROUTE = GET_HARNESS_PERMISSIONS_ROUTE;
|
|
1113
|
+
exports.GET_HARNESS_RESOURCE_IDS_ROUTE = GET_HARNESS_RESOURCE_IDS_ROUTE;
|
|
1114
|
+
exports.GET_HARNESS_SESSION_STATE_ROUTE = GET_HARNESS_SESSION_STATE_ROUTE;
|
|
1115
|
+
exports.GET_HARNESS_WORKSPACE_STATUS_ROUTE = GET_HARNESS_WORKSPACE_STATUS_ROUTE;
|
|
1116
|
+
exports.HARNESS_TOOL_APPROVAL_ROUTE = HARNESS_TOOL_APPROVAL_ROUTE;
|
|
1117
|
+
exports.HARNESS_TOOL_SUSPENSION_ROUTE = HARNESS_TOOL_SUSPENSION_ROUTE;
|
|
1118
|
+
exports.LIST_HARNESSES_ROUTE = LIST_HARNESSES_ROUTE;
|
|
1119
|
+
exports.LIST_HARNESS_MODELS_ROUTE = LIST_HARNESS_MODELS_ROUTE;
|
|
1120
|
+
exports.LIST_HARNESS_MODES_ROUTE = LIST_HARNESS_MODES_ROUTE;
|
|
1121
|
+
exports.LIST_HARNESS_THREADS_ROUTE = LIST_HARNESS_THREADS_ROUTE;
|
|
1122
|
+
exports.LIST_HARNESS_THREAD_MESSAGES_ROUTE = LIST_HARNESS_THREAD_MESSAGES_ROUTE;
|
|
1123
|
+
exports.RENAME_HARNESS_THREAD_ROUTE = RENAME_HARNESS_THREAD_ROUTE;
|
|
1124
|
+
exports.SEND_HARNESS_MESSAGE_ROUTE = SEND_HARNESS_MESSAGE_ROUTE;
|
|
1125
|
+
exports.SEND_HARNESS_NOTIFICATION_ROUTE = SEND_HARNESS_NOTIFICATION_ROUTE;
|
|
1126
|
+
exports.SET_HARNESS_CATEGORY_PERMISSION_ROUTE = SET_HARNESS_CATEGORY_PERMISSION_ROUTE;
|
|
1127
|
+
exports.SET_HARNESS_GOAL_ROUTE = SET_HARNESS_GOAL_ROUTE;
|
|
1128
|
+
exports.SET_HARNESS_RESOURCE_ID_ROUTE = SET_HARNESS_RESOURCE_ID_ROUTE;
|
|
1129
|
+
exports.SET_HARNESS_SESSION_STATE_ROUTE = SET_HARNESS_SESSION_STATE_ROUTE;
|
|
1130
|
+
exports.SET_HARNESS_TOOL_PERMISSION_ROUTE = SET_HARNESS_TOOL_PERMISSION_ROUTE;
|
|
1131
|
+
exports.STEER_HARNESS_SESSION_ROUTE = STEER_HARNESS_SESSION_ROUTE;
|
|
1132
|
+
exports.STREAM_HARNESS_SESSION_ROUTE = STREAM_HARNESS_SESSION_ROUTE;
|
|
1133
|
+
exports.SWITCH_HARNESS_MODEL_ROUTE = SWITCH_HARNESS_MODEL_ROUTE;
|
|
1134
|
+
exports.SWITCH_HARNESS_MODE_ROUTE = SWITCH_HARNESS_MODE_ROUTE;
|
|
1135
|
+
exports.SWITCH_HARNESS_THREAD_ROUTE = SWITCH_HARNESS_THREAD_ROUTE;
|
|
1136
|
+
exports.UPDATE_HARNESS_GOAL_ROUTE = UPDATE_HARNESS_GOAL_ROUTE;
|
|
1137
|
+
//# sourceMappingURL=chunk-I6AIWII6.cjs.map
|
|
1138
|
+
//# sourceMappingURL=chunk-I6AIWII6.cjs.map
|