@mastra/client-js 1.47.0-alpha.1 → 1.47.0-alpha.3
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/_types/@ai-sdk_provider/package.json +1 -0
- package/dist/_types/@ai-sdk_provider-utils/dist/index.d.ts +1 -1
- package/dist/_types/@ai-sdk_provider-utils/package.json +1 -0
- package/dist/_types/@ai-sdk_ui-utils/dist/index.d.ts +3 -3
- package/dist/_types/@ai-sdk_ui-utils/package.json +1 -0
- package/dist/client.d.ts +45 -201
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-connections-a2a.md +4 -3
- package/dist/docs/references/reference-client-js-mastra-client.md +1 -1
- package/dist/index.cjs +40 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -28
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +25 -40
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent-controller.d.ts +5 -4
- package/dist/resources/agent-controller.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +34 -72
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/channels.d.ts +13 -31
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/resources/conversations.d.ts +6 -3
- package/dist/resources/conversations.d.ts.map +1 -1
- package/dist/resources/mcp-tool.d.ts +9 -6
- package/dist/resources/mcp-tool.d.ts.map +1 -1
- package/dist/resources/memory-thread.d.ts +6 -11
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/observability-route-types.d.ts +88 -0
- package/dist/resources/observability-route-types.d.ts.map +1 -0
- package/dist/resources/observability.d.ts +6 -9
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/responses.d.ts +5 -2
- package/dist/resources/responses.d.ts.map +1 -1
- package/dist/resources/run.d.ts +21 -57
- package/dist/resources/run.d.ts.map +1 -1
- package/dist/resources/tool.d.ts +6 -4
- package/dist/resources/tool.d.ts.map +1 -1
- package/dist/resources/vector.d.ts +5 -10
- package/dist/resources/vector.d.ts.map +1 -1
- package/dist/resources/workflow.d.ts +8 -10
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/route-types.generated.d.ts +3108 -2558
- package/dist/route-types.generated.d.ts.map +1 -1
- package/dist/types.d.ts +236 -1599
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import type { JSONValue, ToolInvocationUIPart } from './_types/@ai-sdk_ui-utils/dist/index.
|
|
1
|
+
import type { JSONValue, ToolInvocationUIPart } from './_types/@ai-sdk_ui-utils/dist/index.js';
|
|
2
2
|
import type { AgentExecutionOptions, MultiPrimitiveExecutionOptions, AgentGenerateOptions, AgentStreamOptions, SerializableStructuredOutputOptions, ToolsInput, UIMessageWithMetadata, AgentInstructions, AgentEditorConfig } from '@mastra/core/agent';
|
|
3
3
|
import type { MessageListInput } from '@mastra/core/agent/message-list';
|
|
4
4
|
import type { BuilderModelPolicy, DefaultModelEntry, ProviderModelEntry } from '@mastra/core/agent-builder/ee';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ScoreRowData } from '@mastra/core/evals';
|
|
6
6
|
import type { CoreMessage, Provider as ModelProviderId } from '@mastra/core/llm';
|
|
7
|
-
import type { LogLevel } from '@mastra/core/logger';
|
|
8
|
-
import type { MCPToolType, ServerInfo } from '@mastra/core/mcp';
|
|
9
7
|
import type { AiMessageType, MastraMessageV1, MastraDBMessage, MemoryConfig, StorageThreadType } from '@mastra/core/memory';
|
|
10
8
|
import type { TracingOptions } from '@mastra/core/observability';
|
|
11
9
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
12
|
-
import type { AgentInstructionBlock, PaginationInfo, WorkflowRuns,
|
|
10
|
+
import type { AgentInstructionBlock, PaginationInfo, WorkflowRuns, Rule, RuleGroup, StorageConditionalVariant, StorageConditionalField, StoredProcessorGraph } from '@mastra/core/storage';
|
|
13
11
|
import type { ChunkType } from '@mastra/core/stream';
|
|
14
12
|
import type { QueryResult } from '@mastra/core/vector';
|
|
15
|
-
import type {
|
|
13
|
+
import type { SerializedStepFlowEntry, WorkflowResult, WorkflowRunStatus, WorkflowState } from '@mastra/core/workflows';
|
|
16
14
|
import type { PublicSchema } from '@mastra/schema-compat/schema';
|
|
17
15
|
import type { JSONSchema7 } from 'json-schema';
|
|
18
16
|
import type { ZodSchema as ZodSchemaV3 } from 'zod/v3';
|
|
19
17
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
20
|
-
import type { Body, QueryParams, RouteKey, RouteResponse, Simplify } from './route-types.generated.js';
|
|
18
|
+
import type { Body, PathParams, QueryParams, RouteKey, RouteResponse, Simplify } from './route-types.generated.js';
|
|
21
19
|
export type ZodSchema = ZodSchemaV3 | ZodTypeV4;
|
|
22
20
|
/**
|
|
23
21
|
* Provider metadata as it travels on a message part: a two-level map of
|
|
@@ -47,8 +45,13 @@ type RequestContextOptions = {
|
|
|
47
45
|
};
|
|
48
46
|
type GeneratedRequest<T> = OptionalizeUndefined<T>;
|
|
49
47
|
type GeneratedResponse<T extends RouteKey> = Serialized<RouteResponse<T>>;
|
|
48
|
+
export type SerializedRouteResponse<T extends RouteKey> = GeneratedResponse<T>;
|
|
49
|
+
type WithoutIndexSignatures<T> = {
|
|
50
|
+
[K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K];
|
|
51
|
+
};
|
|
50
52
|
export type ListFeedbackResponse = GeneratedResponse<'GET /observability/feedback'>;
|
|
51
53
|
export type FeedbackItem = ListFeedbackResponse['feedback'][number];
|
|
54
|
+
export type GetMetricTimeSeriesResponse = GeneratedResponse<'POST /observability/metrics/timeseries'>;
|
|
52
55
|
export interface ClientOptions {
|
|
53
56
|
/** Base URL for API requests */
|
|
54
57
|
baseUrl: string;
|
|
@@ -131,162 +134,43 @@ export interface RequestOptions {
|
|
|
131
134
|
/** Credentials mode for requests. See https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials for more info. */
|
|
132
135
|
credentials?: 'omit' | 'same-origin' | 'include';
|
|
133
136
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
export type ResponseInputMessage =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
export type
|
|
143
|
-
type: 'json_object';
|
|
144
|
-
} | {
|
|
145
|
-
type: 'json_schema';
|
|
146
|
-
name: string;
|
|
147
|
-
description?: string;
|
|
148
|
-
schema: Record<string, unknown>;
|
|
149
|
-
strict?: boolean;
|
|
150
|
-
};
|
|
151
|
-
export type ResponseTextConfig = {
|
|
152
|
-
format: ResponseTextFormat;
|
|
153
|
-
};
|
|
154
|
-
export type ResponseOutputText = {
|
|
155
|
-
type: 'output_text';
|
|
156
|
-
text: string;
|
|
157
|
-
annotations?: unknown[];
|
|
158
|
-
logprobs?: unknown[];
|
|
159
|
-
};
|
|
160
|
-
export type ResponseOutputMessage = {
|
|
161
|
-
id: string;
|
|
137
|
+
type ResponseInput = Body<'POST /v1/responses'>['input'];
|
|
138
|
+
type ResponseInputMessageFromRoute = Exclude<ResponseInput, string>[number];
|
|
139
|
+
type ResponsePayload = GeneratedResponse<'POST /v1/responses'>;
|
|
140
|
+
export type ResponseInputTextPart = Exclude<ResponseInputMessageFromRoute['content'], string>[number];
|
|
141
|
+
export type ResponseInputMessage = ResponseInputMessageFromRoute;
|
|
142
|
+
export type ResponseTextConfig = NonNullable<Body<'POST /v1/responses'>['text']>;
|
|
143
|
+
export type ResponseTextFormat = ResponseTextConfig['format'];
|
|
144
|
+
export type ResponseOutputItem = ResponsePayload['output'][number];
|
|
145
|
+
export type ResponseOutputMessage = Extract<ResponseOutputItem, {
|
|
162
146
|
type: 'message';
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
};
|
|
167
|
-
export type ResponseOutputFunctionCall = {
|
|
168
|
-
id: string;
|
|
147
|
+
}>;
|
|
148
|
+
export type ResponseOutputText = ResponseOutputMessage['content'][number];
|
|
149
|
+
export type ResponseOutputFunctionCall = Extract<ResponseOutputItem, {
|
|
169
150
|
type: 'function_call';
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
arguments: string;
|
|
173
|
-
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
174
|
-
};
|
|
175
|
-
export type ResponseOutputFunctionCallOutput = {
|
|
176
|
-
id: string;
|
|
151
|
+
}>;
|
|
152
|
+
export type ResponseOutputFunctionCallOutput = Extract<ResponseOutputItem, {
|
|
177
153
|
type: 'function_call_output';
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
export type
|
|
182
|
-
|
|
183
|
-
output_tokens: number;
|
|
184
|
-
total_tokens: number;
|
|
185
|
-
input_tokens_details?: {
|
|
186
|
-
cached_tokens: number;
|
|
187
|
-
};
|
|
188
|
-
output_tokens_details?: {
|
|
189
|
-
reasoning_tokens: number;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
export type ResponseTool = {
|
|
193
|
-
type: 'function';
|
|
194
|
-
name: string;
|
|
195
|
-
description?: string;
|
|
196
|
-
parameters?: unknown;
|
|
197
|
-
};
|
|
198
|
-
export type ResponseOutputItem = ResponseOutputMessage | ResponseOutputFunctionCall | ResponseOutputFunctionCallOutput;
|
|
199
|
-
export type ConversationItemInputText = {
|
|
200
|
-
type: 'input_text';
|
|
201
|
-
text: string;
|
|
202
|
-
};
|
|
203
|
-
export type ConversationItemMessage = {
|
|
204
|
-
id: string;
|
|
154
|
+
}>;
|
|
155
|
+
export type ResponseUsage = NonNullable<ResponsePayload['usage']>;
|
|
156
|
+
export type ResponseTool = NonNullable<ResponsePayload['tools']>[number];
|
|
157
|
+
export type ConversationItem = GeneratedResponse<'GET /v1/conversations/:conversationId/items'>['data'][number];
|
|
158
|
+
export type ConversationItemMessage = Extract<ConversationItem, {
|
|
205
159
|
type: 'message';
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
export type
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
data: ConversationItem[];
|
|
214
|
-
first_id: string | null;
|
|
215
|
-
last_id: string | null;
|
|
216
|
-
has_more: boolean;
|
|
217
|
-
};
|
|
218
|
-
export type ResponsesResponse = {
|
|
219
|
-
id: string;
|
|
220
|
-
object: 'response';
|
|
221
|
-
created_at: number;
|
|
222
|
-
completed_at?: number | null;
|
|
223
|
-
model: string;
|
|
224
|
-
status: 'in_progress' | 'completed' | 'incomplete';
|
|
225
|
-
output: ResponseOutputItem[];
|
|
226
|
-
usage: ResponseUsage | null;
|
|
227
|
-
error?: {
|
|
228
|
-
code?: string;
|
|
229
|
-
message?: string;
|
|
230
|
-
} | null;
|
|
231
|
-
incomplete_details?: {
|
|
232
|
-
reason?: string;
|
|
233
|
-
} | null;
|
|
234
|
-
instructions?: string | null;
|
|
235
|
-
text?: ResponseTextConfig | null;
|
|
236
|
-
previous_response_id?: string | null;
|
|
237
|
-
conversation_id?: string | null;
|
|
238
|
-
/** Provider-returned response state, such as `openai.responseId`, for provider-native continuation. */
|
|
239
|
-
providerOptions?: Record<string, Record<string, unknown> | undefined>;
|
|
240
|
-
tools?: ResponseTool[];
|
|
241
|
-
store?: boolean;
|
|
160
|
+
}>;
|
|
161
|
+
export type ConversationItemInputText = Extract<ConversationItemMessage['content'][number], {
|
|
162
|
+
type: 'input_text';
|
|
163
|
+
}>;
|
|
164
|
+
export type ConversationItemsPage = GeneratedResponse<'GET /v1/conversations/:conversationId/items'>;
|
|
165
|
+
/** Response payload augmented by the SDK with concatenated message text. */
|
|
166
|
+
export type ResponsesResponse = ResponsePayload & {
|
|
242
167
|
output_text: string;
|
|
243
168
|
};
|
|
244
|
-
export type ResponsesDeleteResponse =
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
export type CreateResponseParams = {
|
|
250
|
-
/** Optional model override, such as `openai/gpt-5`. When omitted, the agent default model is used. */
|
|
251
|
-
model?: string;
|
|
252
|
-
/** Mastra agent ID for the request. Required on initial requests; stored follow-ups can omit it when using `previous_response_id`. */
|
|
253
|
-
agent_id?: string;
|
|
254
|
-
/** Input text or message history for the current turn. */
|
|
255
|
-
input: string | ResponseInputMessage[];
|
|
256
|
-
/** Request-scoped instructions for the current response. */
|
|
257
|
-
instructions?: string;
|
|
258
|
-
/** Optional text output format. Supports `json_object` and `json_schema`. */
|
|
259
|
-
text?: ResponseTextConfig;
|
|
260
|
-
/** Optional conversation ID. In Mastra this is the raw threadId. */
|
|
261
|
-
conversation_id?: string;
|
|
262
|
-
/** Optional provider-specific options passed through to the underlying model call. */
|
|
263
|
-
providerOptions?: Record<string, Record<string, unknown> | undefined>;
|
|
264
|
-
/** When true, returns a streaming Responses API event stream. */
|
|
265
|
-
stream?: boolean;
|
|
266
|
-
/** Persists the response through the selected agent's memory. Requires a memory-backed agent. */
|
|
267
|
-
store?: boolean;
|
|
268
|
-
/** Continues a previously stored response chain. */
|
|
269
|
-
previous_response_id?: string;
|
|
270
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
271
|
-
};
|
|
272
|
-
export type Conversation = {
|
|
273
|
-
id: string;
|
|
274
|
-
object: 'conversation';
|
|
275
|
-
thread: StorageThreadType;
|
|
276
|
-
};
|
|
277
|
-
export type ConversationDeleted = {
|
|
278
|
-
id: string;
|
|
279
|
-
object: 'conversation.deleted';
|
|
280
|
-
deleted: true;
|
|
281
|
-
};
|
|
282
|
-
export type CreateConversationParams = {
|
|
283
|
-
agent_id: string;
|
|
284
|
-
conversation_id?: string;
|
|
285
|
-
resource_id?: string;
|
|
286
|
-
title?: string;
|
|
287
|
-
metadata?: Record<string, unknown>;
|
|
288
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
289
|
-
};
|
|
169
|
+
export type ResponsesDeleteResponse = GeneratedResponse<'DELETE /v1/responses/:responseId'>;
|
|
170
|
+
export type CreateResponseParams = GeneratedRequest<WithoutIndexSignatures<Body<'POST /v1/responses'>>> & RequestContextOptions;
|
|
171
|
+
export type Conversation = GeneratedResponse<'POST /v1/conversations'>;
|
|
172
|
+
export type ConversationDeleted = GeneratedResponse<'DELETE /v1/conversations/:conversationId'>;
|
|
173
|
+
export type CreateConversationParams = GeneratedRequest<Body<'POST /v1/conversations'>> & RequestContextOptions;
|
|
290
174
|
export type ResponsesCreatedEvent = {
|
|
291
175
|
type: 'response.created';
|
|
292
176
|
response: ResponsesResponse;
|
|
@@ -372,11 +256,9 @@ export type NetworkStreamParams<OUTPUT = undefined> = {
|
|
|
372
256
|
model?: string;
|
|
373
257
|
tracingOptions?: TracingOptions;
|
|
374
258
|
} & Omit<MultiPrimitiveExecutionOptions<OUTPUT>, 'model'>;
|
|
375
|
-
export
|
|
259
|
+
export type GetAgentResponse = GeneratedResponse<'GET /agents/:agentId'> & {
|
|
260
|
+
/** Handler-provided identifier omitted from the serialized route schema's value shape. */
|
|
376
261
|
id: string;
|
|
377
|
-
name: string;
|
|
378
|
-
description?: string;
|
|
379
|
-
metadata?: Record<string, unknown>;
|
|
380
262
|
instructions: AgentInstructions;
|
|
381
263
|
tools: Record<string, GetToolResponse>;
|
|
382
264
|
workflows: Record<string, GetWorkflowResponse>;
|
|
@@ -386,52 +268,21 @@ export interface GetAgentResponse {
|
|
|
386
268
|
}>;
|
|
387
269
|
skills?: SkillMetadata[];
|
|
388
270
|
workspaceTools?: string[];
|
|
389
|
-
/** Browser tool names available to this agent (if browser is configured) */
|
|
390
271
|
browserTools?: string[];
|
|
391
|
-
/**
|
|
392
|
-
* Whether the agent has any browser provider — agent-level SDK browser or
|
|
393
|
-
* workspace-level CLI browser. Gates the Studio browser viewer.
|
|
394
|
-
*/
|
|
395
272
|
hasBrowser?: boolean;
|
|
396
|
-
/** ID of the agent's workspace (if configured) */
|
|
397
273
|
workspaceId?: string;
|
|
398
|
-
provider: string;
|
|
399
|
-
modelId: string;
|
|
400
|
-
modelVersion: string;
|
|
401
|
-
supportsMemory?: boolean;
|
|
402
|
-
modelList: Array<{
|
|
403
|
-
id: string;
|
|
404
|
-
enabled: boolean;
|
|
405
|
-
maxRetries: number;
|
|
406
|
-
model: {
|
|
407
|
-
modelId: string;
|
|
408
|
-
provider: string;
|
|
409
|
-
modelVersion: string;
|
|
410
|
-
};
|
|
411
|
-
}> | undefined;
|
|
412
|
-
inputProcessors?: Array<{
|
|
413
|
-
id: string;
|
|
414
|
-
name: string;
|
|
415
|
-
}>;
|
|
416
|
-
outputProcessors?: Array<{
|
|
417
|
-
id: string;
|
|
418
|
-
name: string;
|
|
419
|
-
}>;
|
|
420
274
|
defaultOptions: WithoutMethods<AgentExecutionOptions>;
|
|
421
275
|
defaultGenerateOptionsLegacy: WithoutMethods<AgentGenerateOptions>;
|
|
422
276
|
defaultStreamOptionsLegacy: WithoutMethods<AgentStreamOptions>;
|
|
423
|
-
/** Serialized JSON schema for request context validation */
|
|
424
277
|
requestContextSchema?: string;
|
|
425
|
-
source?: 'code' | 'stored';
|
|
426
|
-
status?: 'draft' | 'published' | 'archived';
|
|
427
|
-
activeVersionId?: string;
|
|
428
|
-
hasDraft?: boolean;
|
|
429
278
|
editor?: AgentEditorConfig;
|
|
430
|
-
}
|
|
279
|
+
};
|
|
431
280
|
/**
|
|
432
|
-
* Response from the browser session probe endpoint.
|
|
281
|
+
* Response from the deployer-provided browser session probe endpoint.
|
|
433
282
|
*
|
|
434
|
-
*
|
|
283
|
+
* This route is registered dynamically by deployer adapters rather than the
|
|
284
|
+
* server route registry, so it has no generated contract. Use it to decide
|
|
285
|
+
* whether to open a screencast WebSocket for an agent/thread:
|
|
435
286
|
* - `screencastAvailable`: server has the `ws` / `@hono/node-ws` packages installed.
|
|
436
287
|
* When false, opening a WS will fail and trigger a reconnect loop — skip it.
|
|
437
288
|
* - `hasSession`: the agent has an active browser session for this thread. When
|
|
@@ -486,48 +337,24 @@ export type StreamParams<OUTPUT = undefined> = StreamParamsBase<OUTPUT> & {
|
|
|
486
337
|
* ids flow through (see Phase 1 of the admin model configuration plan).
|
|
487
338
|
*/
|
|
488
339
|
export type AdminProviderId = ModelProviderId | (string & {});
|
|
489
|
-
export type UpdateModelParams =
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
modelId: string;
|
|
497
|
-
provider: AdminProviderId;
|
|
498
|
-
};
|
|
499
|
-
maxRetries?: number;
|
|
500
|
-
enabled?: boolean;
|
|
340
|
+
export type UpdateModelParams = GeneratedRequest<Body<'POST /agents/:agentId/model'>>;
|
|
341
|
+
export type UpdateModelInModelListParams = Omit<PathParams<'POST /agents/:agentId/models/:modelConfigId'>, 'agentId'> & GeneratedRequest<Body<'POST /agents/:agentId/models/:modelConfigId'>>;
|
|
342
|
+
export type ReorderModelListParams = GeneratedRequest<Body<'POST /agents/:agentId/models/reorder'>>;
|
|
343
|
+
export type GetToolResponse = GeneratedResponse<'GET /tools/:toolId'>;
|
|
344
|
+
/** Query contract with the SDK's legacy `false` sentinel for `limit`. */
|
|
345
|
+
export type ListWorkflowRunsParams = Omit<GeneratedRequest<QueryParams<'GET /workflows/:workflowId/runs'>>, 'limit'> & {
|
|
346
|
+
limit?: number | false;
|
|
501
347
|
};
|
|
502
|
-
|
|
503
|
-
|
|
348
|
+
type WorkflowRunsRouteResponse = SerializedRouteResponse<'GET /workflows/:workflowId/runs'>;
|
|
349
|
+
type WorkflowRunSnapshot = WorkflowRuns['runs'][number]['snapshot'];
|
|
350
|
+
export type ListWorkflowRunsResponse = Omit<WorkflowRunsRouteResponse, 'runs'> & {
|
|
351
|
+
runs: Array<Omit<WorkflowRunsRouteResponse['runs'][number], 'snapshot'> & {
|
|
352
|
+
snapshot: WorkflowRunSnapshot;
|
|
353
|
+
}>;
|
|
504
354
|
};
|
|
505
|
-
export
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
inputSchema: string;
|
|
509
|
-
outputSchema: string;
|
|
510
|
-
requestContextSchema?: string;
|
|
511
|
-
}
|
|
512
|
-
export interface ListWorkflowRunsParams {
|
|
513
|
-
fromDate?: Date;
|
|
514
|
-
toDate?: Date;
|
|
515
|
-
page?: number;
|
|
516
|
-
perPage?: number;
|
|
517
|
-
resourceId?: string;
|
|
518
|
-
status?: WorkflowRunStatus;
|
|
519
|
-
/** @deprecated Use page instead */
|
|
520
|
-
offset?: number;
|
|
521
|
-
/** @deprecated Use perPage instead */
|
|
522
|
-
limit?: number | false;
|
|
523
|
-
}
|
|
524
|
-
export type ListWorkflowRunsResponse = WorkflowRuns;
|
|
525
|
-
export interface WorkflowRunCounts {
|
|
526
|
-
running: number;
|
|
527
|
-
suspended: number;
|
|
528
|
-
}
|
|
529
|
-
export type ListWorkflowRunCountsResponse = Record<string, WorkflowRunCounts>;
|
|
530
|
-
export type GetWorkflowRunByIdResponse = WorkflowState;
|
|
355
|
+
export type WorkflowRunCounts = GeneratedResponse<'GET /workflows/run-counts'>[string];
|
|
356
|
+
export type ListWorkflowRunCountsResponse = GeneratedResponse<'GET /workflows/run-counts'>;
|
|
357
|
+
export type GetWorkflowRunByIdResponse = GeneratedResponse<'GET /workflows/:workflowId/runs/:runId'> & Serialized<WorkflowState>;
|
|
531
358
|
export type ListDynamicWorkflowsParams = GeneratedRequest<QueryParams<'GET /stored/workflows'>>;
|
|
532
359
|
export type ListDynamicWorkflowsResponse = GeneratedResponse<'GET /stored/workflows'>;
|
|
533
360
|
export type UpsertDynamicWorkflowParams = GeneratedRequest<Body<'POST /stored/workflows'>>;
|
|
@@ -535,154 +362,59 @@ export type UpsertDynamicWorkflowResponse = GeneratedResponse<'POST /stored/work
|
|
|
535
362
|
type DynamicWorkflowDefinitionField = 'description' | 'inputSchema' | 'outputSchema' | 'stateSchema' | 'requestContextSchema' | 'graph';
|
|
536
363
|
export type DynamicWorkflowDefinition = Omit<GeneratedResponse<'GET /stored/workflows/:dynamicWorkflowId'>, DynamicWorkflowDefinitionField> & Pick<UpsertDynamicWorkflowParams, DynamicWorkflowDefinitionField>;
|
|
537
364
|
export type DeleteDynamicWorkflowResponse = GeneratedResponse<'DELETE /stored/workflows/:dynamicWorkflowId'>;
|
|
538
|
-
export
|
|
365
|
+
export type GetWorkflowResponse = Omit<GeneratedResponse<'GET /workflows/:workflowId'>, 'name' | 'stepGraph'> & {
|
|
539
366
|
name: string;
|
|
540
|
-
|
|
541
|
-
metadata?: Record<string, unknown>;
|
|
542
|
-
steps: {
|
|
543
|
-
[key: string]: {
|
|
544
|
-
id: string;
|
|
545
|
-
description: string;
|
|
546
|
-
inputSchema: string;
|
|
547
|
-
outputSchema: string;
|
|
548
|
-
resumeSchema: string;
|
|
549
|
-
suspendSchema: string;
|
|
550
|
-
stateSchema: string;
|
|
551
|
-
metadata?: Record<string, unknown>;
|
|
552
|
-
};
|
|
553
|
-
};
|
|
554
|
-
allSteps: {
|
|
555
|
-
[key: string]: {
|
|
556
|
-
id: string;
|
|
557
|
-
description: string;
|
|
558
|
-
inputSchema: string;
|
|
559
|
-
outputSchema: string;
|
|
560
|
-
resumeSchema: string;
|
|
561
|
-
suspendSchema: string;
|
|
562
|
-
stateSchema: string;
|
|
563
|
-
isWorkflow: boolean;
|
|
564
|
-
metadata?: Record<string, unknown>;
|
|
565
|
-
};
|
|
566
|
-
};
|
|
567
|
-
stepGraph: Workflow['serializedStepGraph'];
|
|
568
|
-
inputSchema: string;
|
|
569
|
-
outputSchema: string;
|
|
570
|
-
stateSchema: string;
|
|
571
|
-
/** Serialized JSON schema for request context validation */
|
|
367
|
+
stepGraph?: SerializedStepFlowEntry[];
|
|
572
368
|
requestContextSchema?: string;
|
|
573
|
-
|
|
574
|
-
isProcessorWorkflow?: boolean;
|
|
575
|
-
/**
|
|
576
|
-
* How this workflow got into the live registry. `'code'` for statically
|
|
577
|
-
* authored or `addWorkflow()`-added workflows, `'dynamic'` for anything
|
|
578
|
-
* hydrated or added via `addDynamicWorkflow()`. Absent on older servers.
|
|
579
|
-
*/
|
|
580
|
-
origin?: 'code' | 'dynamic';
|
|
581
|
-
}
|
|
369
|
+
};
|
|
582
370
|
export type WorkflowRunResult = WorkflowResult<any, any, any, any>;
|
|
583
371
|
export type UpsertVectorParams = GeneratedRequest<Body<'POST /vector/:vectorName/upsert'>>;
|
|
584
372
|
export type CreateIndexParams = GeneratedRequest<Body<'POST /vector/:vectorName/create-index'>>;
|
|
585
|
-
export
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
topK?: number;
|
|
589
|
-
filter?: Record<string, any>;
|
|
590
|
-
includeVector?: boolean;
|
|
591
|
-
}
|
|
592
|
-
export type QueryVectorResponse = QueryResult[];
|
|
373
|
+
export type QueryVectorParams = GeneratedRequest<Body<'POST /vector/:vectorName/query'>>;
|
|
374
|
+
/** The server schema currently represents vector-store-specific result rows as `unknown`. */
|
|
375
|
+
export type QueryVectorResponse = GeneratedResponse<'POST /vector/:vectorName/query'> & QueryResult[];
|
|
593
376
|
export type GetVectorIndexResponse = GeneratedResponse<'GET /vector/:vectorName/indexes/:indexName'>;
|
|
594
|
-
export
|
|
377
|
+
export type SaveMessageToMemoryParams = GeneratedRequest<Body<'POST /memory/save-messages'> & QueryParams<'POST /memory/save-messages'>> & RequestContextOptions & {
|
|
595
378
|
messages: (MastraMessageV1 | MastraDBMessage)[];
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}
|
|
599
|
-
export interface SaveNetworkMessageToMemoryParams {
|
|
379
|
+
};
|
|
380
|
+
export type SaveNetworkMessageToMemoryParams = GeneratedRequest<Body<'POST /memory/network/save-messages'> & QueryParams<'POST /memory/network/save-messages'>> & {
|
|
600
381
|
messages: (MastraMessageV1 | MastraDBMessage)[];
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
export type SaveMessageToMemoryResponse = {
|
|
382
|
+
};
|
|
383
|
+
/** The server schema currently represents persisted message payloads as `unknown`. */
|
|
384
|
+
export type SaveMessageToMemoryResponse = GeneratedResponse<'POST /memory/save-messages'> & {
|
|
604
385
|
messages: (MastraMessageV1 | MastraDBMessage)[];
|
|
605
386
|
};
|
|
606
387
|
export type CreateMemoryThreadParams = GeneratedRequest<Body<'POST /memory/threads'> & QueryParams<'POST /memory/threads'>> & RequestContextOptions;
|
|
607
388
|
export type CreateMemoryThreadResponse = GeneratedResponse<'POST /memory/threads'>;
|
|
608
|
-
export
|
|
609
|
-
/**
|
|
610
|
-
* Optional resourceId to filter threads. When not provided, returns all threads.
|
|
611
|
-
*/
|
|
612
|
-
resourceId?: string;
|
|
613
|
-
/**
|
|
614
|
-
* Optional metadata filter. Threads must match all specified key-value pairs (AND logic).
|
|
615
|
-
*/
|
|
616
|
-
metadata?: Record<string, unknown>;
|
|
617
|
-
/**
|
|
618
|
-
* Optional agentId. When not provided and storage is configured on the server,
|
|
619
|
-
* threads will be retrieved using storage directly.
|
|
620
|
-
*/
|
|
621
|
-
agentId?: string;
|
|
622
|
-
page?: number;
|
|
623
|
-
perPage?: number;
|
|
624
|
-
orderBy?: {
|
|
625
|
-
field?: 'createdAt' | 'updatedAt';
|
|
626
|
-
direction?: 'ASC' | 'DESC';
|
|
627
|
-
};
|
|
628
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
629
|
-
}
|
|
389
|
+
export type ListMemoryThreadsParams = GeneratedRequest<QueryParams<'GET /memory/threads'>> & RequestContextOptions;
|
|
630
390
|
export type ListMemoryThreadsResponse = GeneratedResponse<'GET /memory/threads'>;
|
|
631
391
|
export type GetMemoryConfigParams = GeneratedRequest<QueryParams<'GET /memory/config'>> & RequestContextOptions;
|
|
632
392
|
export type GetMemoryConfigResponse = GeneratedResponse<'GET /memory/config'>;
|
|
633
|
-
export
|
|
634
|
-
|
|
635
|
-
metadata: Record<string, any>;
|
|
636
|
-
resourceId: string;
|
|
637
|
-
/**
|
|
638
|
-
* Agent ID. Required by the server for write operations. If omitted, the agentId provided
|
|
639
|
-
* to `getMemoryThread({ threadId, agentId })` is used.
|
|
640
|
-
*/
|
|
393
|
+
export type UpdateMemoryThreadParams = Omit<GeneratedRequest<Body<'PATCH /memory/threads/:threadId'> & QueryParams<'PATCH /memory/threads/:threadId'>>, 'agentId'> & RequestContextOptions & {
|
|
394
|
+
/** Resolved from the resource constructor when omitted. */
|
|
641
395
|
agentId?: string;
|
|
642
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
643
|
-
}
|
|
644
|
-
export type ListMemoryThreadMessagesParams = Omit<StorageListMessagesInput, 'threadId'> & {
|
|
645
|
-
includeSystemReminders?: boolean;
|
|
646
396
|
};
|
|
647
|
-
export type
|
|
397
|
+
export type ListMemoryThreadMessagesParams = GeneratedRequest<QueryParams<'GET /memory/threads/:threadId/messages'>>;
|
|
398
|
+
/** The route schema intentionally keeps persisted message payloads opaque. */
|
|
399
|
+
export type ListMemoryThreadMessagesResponse = GeneratedResponse<'GET /memory/threads/:threadId/messages'> & {
|
|
648
400
|
messages: MastraDBMessage[];
|
|
649
401
|
};
|
|
650
|
-
export
|
|
651
|
-
|
|
652
|
-
resourceId?: string;
|
|
653
|
-
title?: string;
|
|
654
|
-
metadata?: Record<string, any>;
|
|
655
|
-
options?: {
|
|
656
|
-
messageLimit?: number;
|
|
657
|
-
messageFilter?: {
|
|
658
|
-
startDate?: Date;
|
|
659
|
-
endDate?: Date;
|
|
660
|
-
messageIds?: string[];
|
|
661
|
-
};
|
|
662
|
-
};
|
|
663
|
-
/**
|
|
664
|
-
* Agent ID. Required by the server for write operations. If omitted, the agentId provided
|
|
665
|
-
* to `getMemoryThread({ threadId, agentId })` is used.
|
|
666
|
-
*/
|
|
402
|
+
export type CloneMemoryThreadParams = Omit<GeneratedRequest<Body<'POST /memory/threads/:threadId/clone'> & QueryParams<'POST /memory/threads/:threadId/clone'>>, 'agentId'> & RequestContextOptions & {
|
|
403
|
+
/** Resolved from the resource constructor when omitted. */
|
|
667
404
|
agentId?: string;
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
export type CloneMemoryThreadResponse = {
|
|
405
|
+
};
|
|
406
|
+
/** The route schema intentionally keeps cloned persisted message payloads opaque. */
|
|
407
|
+
export type CloneMemoryThreadResponse = GeneratedResponse<'POST /memory/threads/:threadId/clone'> & {
|
|
671
408
|
thread: StorageThreadType;
|
|
672
409
|
clonedMessages: MastraDBMessage[];
|
|
673
410
|
};
|
|
674
411
|
export type TransferMemoryThreadParams = GeneratedRequest<Body<'POST /memory/threads/:threadId/transfer'> & QueryParams<'POST /memory/threads/:threadId/transfer'>> & RequestContextOptions;
|
|
675
412
|
export type GetLogsParams = GeneratedRequest<QueryParams<'GET /logs'>>;
|
|
676
|
-
export
|
|
677
|
-
|
|
678
|
-
transportId: string;
|
|
413
|
+
export type GetLogParams = Omit<PathParams<'GET /logs/:runId'> & GeneratedRequest<QueryParams<'GET /logs/:runId'>>, 'fromDate' | 'toDate'> & {
|
|
414
|
+
/** SDK convenience inputs serialized to the route's ISO date query values. */
|
|
679
415
|
fromDate?: Date;
|
|
680
416
|
toDate?: Date;
|
|
681
|
-
|
|
682
|
-
filters?: Record<string, string>;
|
|
683
|
-
page?: number;
|
|
684
|
-
perPage?: number;
|
|
685
|
-
}
|
|
417
|
+
};
|
|
686
418
|
export type GetLogsResponse = GeneratedResponse<'GET /logs'>;
|
|
687
419
|
export type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
|
|
688
420
|
export interface GetVNextNetworkResponse {
|
|
@@ -745,28 +477,20 @@ export interface LoopVNextNetworkResponse {
|
|
|
745
477
|
};
|
|
746
478
|
steps: WorkflowResult<any, any, any, any>['steps'];
|
|
747
479
|
}
|
|
748
|
-
export
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
description?: string;
|
|
757
|
-
inputSchema: string;
|
|
758
|
-
toolType?: MCPToolType;
|
|
759
|
-
_meta?: Record<string, unknown>;
|
|
760
|
-
}
|
|
761
|
-
export interface McpServerToolListResponse {
|
|
762
|
-
tools: McpToolInfo[];
|
|
763
|
-
}
|
|
480
|
+
export type McpServerListResponse = GeneratedResponse<'GET /mcp/v0/servers'>;
|
|
481
|
+
export type McpToolInfo = GeneratedResponse<'GET /mcp/:serverId/tools/:toolId'>;
|
|
482
|
+
export type McpServerToolListResponse = GeneratedResponse<'GET /mcp/:serverId/tools'>;
|
|
483
|
+
/**
|
|
484
|
+
* `{ result }` for a completed tool, or the suspended shape a 2026-07-28 server reports
|
|
485
|
+
* when the tool asked for input (answer with `resumeData` and the echoed `suspendPayload`).
|
|
486
|
+
*/
|
|
487
|
+
export type McpToolExecuteResponse = RouteResponse<'POST /mcp/:serverId/tools/:toolId/execute'>;
|
|
764
488
|
/**
|
|
765
489
|
* Client version of ScoreRowData with dates serialized as strings (from JSON)
|
|
766
490
|
*/
|
|
767
491
|
export type ClientScoreRowData = Omit<ScoreRowData, 'createdAt' | 'updatedAt'> & {
|
|
768
492
|
createdAt: string;
|
|
769
|
-
updatedAt: string;
|
|
493
|
+
updatedAt: string | null;
|
|
770
494
|
};
|
|
771
495
|
/**
|
|
772
496
|
* Response for listing scores (client version with serialized dates)
|
|
@@ -775,40 +499,19 @@ export type ListScoresResponse = {
|
|
|
775
499
|
pagination: PaginationInfo;
|
|
776
500
|
scores: ClientScoreRowData[];
|
|
777
501
|
};
|
|
778
|
-
export
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
export interface ListScoresByScorerIdParams {
|
|
784
|
-
scorerId: string;
|
|
785
|
-
entityId?: string;
|
|
786
|
-
entityType?: string;
|
|
787
|
-
page?: number;
|
|
788
|
-
perPage?: number;
|
|
789
|
-
}
|
|
790
|
-
export interface ListScoresByEntityIdParams {
|
|
791
|
-
entityId: string;
|
|
792
|
-
entityType: string;
|
|
793
|
-
page?: number;
|
|
794
|
-
perPage?: number;
|
|
795
|
-
}
|
|
796
|
-
export interface SaveScoreParams {
|
|
502
|
+
export type ListScoresByRunIdParams = GeneratedRequest<PathParams<'GET /scores/run/:runId'> & QueryParams<'GET /scores/run/:runId'>>;
|
|
503
|
+
export type ListScoresByScorerIdParams = GeneratedRequest<PathParams<'GET /scores/scorer/:scorerId'> & QueryParams<'GET /scores/scorer/:scorerId'>>;
|
|
504
|
+
export type ListScoresByEntityIdParams = GeneratedRequest<PathParams<'GET /scores/entity/:entityType/:entityId'> & QueryParams<'GET /scores/entity/:entityType/:entityId'>>;
|
|
505
|
+
/** Score records remain opaque in the route schema because their shape is scorer-specific. */
|
|
506
|
+
export type SaveScoreParams = GeneratedRequest<Body<'POST /scores'>> & {
|
|
797
507
|
score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>;
|
|
798
|
-
}
|
|
799
|
-
|
|
508
|
+
};
|
|
509
|
+
/** Score records remain opaque in the route schema because their shape is scorer-specific. */
|
|
510
|
+
export type SaveScoreResponse = GeneratedResponse<'POST /scores'> & {
|
|
800
511
|
score: ClientScoreRowData;
|
|
801
|
-
}
|
|
802
|
-
export type GetScorerResponse = MastraScorerEntry & {
|
|
803
|
-
agentIds: string[];
|
|
804
|
-
agentNames: string[];
|
|
805
|
-
workflowIds: string[];
|
|
806
|
-
isRegistered: boolean;
|
|
807
|
-
source: 'code' | 'stored';
|
|
808
512
|
};
|
|
809
|
-
export
|
|
810
|
-
|
|
811
|
-
}
|
|
513
|
+
export type GetScorerResponse = GeneratedResponse<'GET /scores/scorers/:scorerId'>;
|
|
514
|
+
export type GetScorersResponse = GeneratedResponse<'GET /scores/scorers'>;
|
|
812
515
|
export interface TemplateInstallationRequest {
|
|
813
516
|
/** Template repository URL or slug */
|
|
814
517
|
repo: string;
|
|
@@ -856,17 +559,9 @@ export interface MemorySearchResult {
|
|
|
856
559
|
}>;
|
|
857
560
|
};
|
|
858
561
|
}
|
|
859
|
-
export
|
|
860
|
-
step: string | string[];
|
|
861
|
-
inputData?: Record<string, any>;
|
|
862
|
-
resumeData?: Record<string, any>;
|
|
863
|
-
initialState?: Record<string, any>;
|
|
864
|
-
context?: TimeTravelContext<any, any, any, any>;
|
|
865
|
-
nestedStepsContext?: Record<string, TimeTravelContext<any, any, any, any>>;
|
|
562
|
+
export type TimeTravelParams = Omit<Body<'POST /workflows/:workflowId/time-travel'>, 'requestContext'> & {
|
|
866
563
|
requestContext?: RequestContext | Record<string, any>;
|
|
867
|
-
|
|
868
|
-
perStep?: boolean;
|
|
869
|
-
}
|
|
564
|
+
};
|
|
870
565
|
/**
|
|
871
566
|
* Semantic recall configuration for vector-based memory retrieval
|
|
872
567
|
*/
|
|
@@ -1085,17 +780,9 @@ export interface StoredAgentSkillConfig {
|
|
|
1085
780
|
/** Resolution strategy: 'latest' = latest published version, 'live' = read from filesystem */
|
|
1086
781
|
strategy?: 'latest' | 'live';
|
|
1087
782
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
*/
|
|
1092
|
-
export type StoredWorkspaceRef = {
|
|
1093
|
-
type: 'id';
|
|
1094
|
-
workspaceId: string;
|
|
1095
|
-
} | {
|
|
1096
|
-
type: 'inline';
|
|
1097
|
-
config: Record<string, unknown>;
|
|
1098
|
-
};
|
|
783
|
+
export type StoredWorkspaceRef = Extract<NonNullable<GeneratedRequest<Body<'POST /stored/agents'>>['workspace']>, {
|
|
784
|
+
type: 'id' | 'inline' | 'provider';
|
|
785
|
+
}>;
|
|
1099
786
|
export interface StoredBrowserConfig {
|
|
1100
787
|
provider: string;
|
|
1101
788
|
headless?: boolean;
|
|
@@ -1146,67 +833,11 @@ export type StoredAgentDurableConfig = boolean | {
|
|
|
1146
833
|
/**
|
|
1147
834
|
* Stored agent data returned from API
|
|
1148
835
|
*/
|
|
1149
|
-
export
|
|
1150
|
-
id: string;
|
|
1151
|
-
status: string;
|
|
1152
|
-
activeVersionId?: string;
|
|
1153
|
-
authorId?: string;
|
|
1154
|
-
author?: ResolvedAuthor;
|
|
1155
|
-
visibility?: 'private' | 'public';
|
|
1156
|
-
metadata?: Record<string, unknown>;
|
|
1157
|
-
createdAt: string;
|
|
1158
|
-
updatedAt: string;
|
|
1159
|
-
name: string;
|
|
1160
|
-
description?: string;
|
|
1161
|
-
instructions: string | AgentInstructionBlock[];
|
|
1162
|
-
model: ConditionalField<{
|
|
1163
|
-
provider: string;
|
|
1164
|
-
name: string;
|
|
1165
|
-
[key: string]: unknown;
|
|
1166
|
-
}>;
|
|
1167
|
-
tools?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1168
|
-
defaultOptions?: ConditionalField<DefaultOptions>;
|
|
1169
|
-
workflows?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1170
|
-
agents?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1171
|
-
integrationTools?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1172
|
-
toolProviders?: ConditionalField<Record<string, StoredToolProviderConfig>>;
|
|
1173
|
-
mcpClients?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1174
|
-
inputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1175
|
-
outputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1176
|
-
memory?: ConditionalField<SerializedMemoryConfig>;
|
|
1177
|
-
scorers?: ConditionalField<Record<string, StoredAgentScorerConfig>>;
|
|
1178
|
-
skills?: ConditionalField<Record<string, StoredAgentSkillConfig>>;
|
|
1179
|
-
workspace?: ConditionalField<StoredWorkspaceRef>;
|
|
1180
|
-
browser?: ConditionalField<StoredBrowserRef> | boolean | null;
|
|
1181
|
-
requestContextSchema?: Record<string, unknown>;
|
|
1182
|
-
durable?: StoredAgentDurableConfig;
|
|
1183
|
-
isFavorited?: boolean;
|
|
1184
|
-
favoriteCount?: number;
|
|
1185
|
-
}
|
|
836
|
+
export type StoredAgentResponse = GeneratedResponse<'GET /stored/agents/:storedAgentId'>;
|
|
1186
837
|
/**
|
|
1187
838
|
* Parameters for listing stored agents
|
|
1188
839
|
*/
|
|
1189
|
-
export
|
|
1190
|
-
page?: number;
|
|
1191
|
-
perPage?: number;
|
|
1192
|
-
orderBy?: {
|
|
1193
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1194
|
-
direction?: 'ASC' | 'DESC';
|
|
1195
|
-
};
|
|
1196
|
-
status?: 'draft' | 'published' | 'archived';
|
|
1197
|
-
authorId?: string;
|
|
1198
|
-
/**
|
|
1199
|
-
* Restrict the list to public records. Only `'public'` is accepted by the
|
|
1200
|
-
* server filter; private records are surfaced via the default scope-aware
|
|
1201
|
-
* filter (caller's own rows + legacy unowned).
|
|
1202
|
-
*/
|
|
1203
|
-
visibility?: 'public';
|
|
1204
|
-
metadata?: Record<string, unknown>;
|
|
1205
|
-
/** When true, only return agents favorited by the caller (or by `pinFavoritedFor`). */
|
|
1206
|
-
favoritedOnly?: boolean;
|
|
1207
|
-
/** When set, sort favorited-first for this user id. Required for `favoritedOnly`. */
|
|
1208
|
-
pinFavoritedFor?: string;
|
|
1209
|
-
}
|
|
840
|
+
export type ListStoredAgentsParams = GeneratedRequest<QueryParams<'GET /stored/agents'>>;
|
|
1210
841
|
/**
|
|
1211
842
|
* Response from favorite / unfavorite mutations.
|
|
1212
843
|
*/
|
|
@@ -1217,13 +848,7 @@ export interface FavoriteToggleResponse {
|
|
|
1217
848
|
/**
|
|
1218
849
|
* Response for listing stored agents
|
|
1219
850
|
*/
|
|
1220
|
-
export
|
|
1221
|
-
agents: StoredAgentResponse[];
|
|
1222
|
-
total: number;
|
|
1223
|
-
page: number;
|
|
1224
|
-
perPage: number | false;
|
|
1225
|
-
hasMore: boolean;
|
|
1226
|
-
}
|
|
851
|
+
export type ListStoredAgentsResponse = GeneratedResponse<'GET /stored/agents'>;
|
|
1227
852
|
/**
|
|
1228
853
|
* Parameters for cloning an agent to a stored agent
|
|
1229
854
|
*/
|
|
@@ -1245,51 +870,7 @@ export interface CloneAgentParams {
|
|
|
1245
870
|
* Parameters for creating a stored agent.
|
|
1246
871
|
* Flat union of agent-record fields and config fields.
|
|
1247
872
|
*/
|
|
1248
|
-
export
|
|
1249
|
-
/** Unique identifier for the agent. If not provided, derived from name via slugify. */
|
|
1250
|
-
id?: string;
|
|
1251
|
-
authorId?: string;
|
|
1252
|
-
/** Visibility of the agent. Defaults to 'private'. */
|
|
1253
|
-
visibility?: 'private' | 'public';
|
|
1254
|
-
metadata?: Record<string, unknown>;
|
|
1255
|
-
name: string;
|
|
1256
|
-
description?: string;
|
|
1257
|
-
instructions: string | AgentInstructionBlock[];
|
|
1258
|
-
model: ConditionalField<{
|
|
1259
|
-
provider: string;
|
|
1260
|
-
name: string;
|
|
1261
|
-
[key: string]: unknown;
|
|
1262
|
-
}>;
|
|
1263
|
-
tools?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1264
|
-
defaultOptions?: ConditionalField<DefaultOptions>;
|
|
1265
|
-
workflows?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1266
|
-
agents?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1267
|
-
integrationTools?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1268
|
-
toolProviders?: ConditionalField<Record<string, StoredToolProviderConfig>>;
|
|
1269
|
-
mcpClients?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1270
|
-
inputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1271
|
-
outputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1272
|
-
memory?: ConditionalField<SerializedMemoryConfig>;
|
|
1273
|
-
scorers?: ConditionalField<Record<string, StoredAgentScorerConfig>>;
|
|
1274
|
-
skills?: ConditionalField<Record<string, StoredAgentSkillConfig>>;
|
|
1275
|
-
workspace?: ConditionalField<StoredWorkspaceRef>;
|
|
1276
|
-
/** Browser config. `true` = use admin default, `false` = no browser. */
|
|
1277
|
-
browser?: ConditionalField<StoredBrowserRef> | boolean | null;
|
|
1278
|
-
requestContextSchema?: Record<string, unknown>;
|
|
1279
|
-
/**
|
|
1280
|
-
* Run this agent with durable execution once it is hydrated by the server.
|
|
1281
|
-
* Cache and pubsub are inherited from the server's Mastra instance — without
|
|
1282
|
-
* distributed backends durability is process-local.
|
|
1283
|
-
*/
|
|
1284
|
-
durable?: StoredAgentDurableConfig;
|
|
1285
|
-
/**
|
|
1286
|
-
* Publish the initial version so the agent resolves at `status: 'published'`.
|
|
1287
|
-
* Defaults to true when omitted. Pass false to stage the agent as an unpublished
|
|
1288
|
-
* draft — useful when overriding a code-defined agent, whose code definition keeps
|
|
1289
|
-
* serving traffic until the override is published.
|
|
1290
|
-
*/
|
|
1291
|
-
autoPublish?: boolean;
|
|
1292
|
-
}
|
|
873
|
+
export type CreateStoredAgentParams = GeneratedRequest<Body<'POST /stored/agents'>>;
|
|
1293
874
|
/**
|
|
1294
875
|
* Parameters for updating a stored agent
|
|
1295
876
|
*/
|
|
@@ -1299,67 +880,20 @@ export type OpenStoredAgentChangeRequestParams = ExportStoredAgentParams & {
|
|
|
1299
880
|
userName?: string;
|
|
1300
881
|
inspectOnly?: boolean;
|
|
1301
882
|
};
|
|
1302
|
-
export
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
export
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
export interface
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
visibility?: 'private' | 'public';
|
|
1317
|
-
metadata?: Record<string, unknown>;
|
|
1318
|
-
name?: string;
|
|
1319
|
-
description?: string;
|
|
1320
|
-
instructions?: string | AgentInstructionBlock[];
|
|
1321
|
-
model?: ConditionalField<{
|
|
1322
|
-
provider: string;
|
|
1323
|
-
name: string;
|
|
1324
|
-
[key: string]: unknown;
|
|
1325
|
-
}>;
|
|
1326
|
-
tools?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1327
|
-
defaultOptions?: ConditionalField<DefaultOptions>;
|
|
1328
|
-
workflows?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1329
|
-
agents?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1330
|
-
integrationTools?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1331
|
-
toolProviders?: ConditionalField<Record<string, StoredToolProviderConfig>>;
|
|
1332
|
-
mcpClients?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1333
|
-
inputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1334
|
-
outputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1335
|
-
memory?: ConditionalField<SerializedMemoryConfig>;
|
|
1336
|
-
scorers?: ConditionalField<Record<string, StoredAgentScorerConfig>>;
|
|
1337
|
-
skills?: ConditionalField<Record<string, StoredAgentSkillConfig>>;
|
|
1338
|
-
workspace?: ConditionalField<StoredWorkspaceRef>;
|
|
1339
|
-
/** Browser config. `true` = use admin default, `false` = no browser. */
|
|
1340
|
-
browser?: ConditionalField<StoredBrowserRef> | boolean | null;
|
|
1341
|
-
requestContextSchema?: Record<string, unknown>;
|
|
1342
|
-
/** Run this agent with durable execution once it is hydrated by the server. */
|
|
1343
|
-
durable?: StoredAgentDurableConfig;
|
|
1344
|
-
/** Optional message describing the changes for the auto-created version */
|
|
1345
|
-
changeMessage?: string;
|
|
1346
|
-
/** Immediately activate the auto-created version. Defaults to false when omitted. */
|
|
1347
|
-
autoPublish?: boolean;
|
|
1348
|
-
}
|
|
1349
|
-
/**
|
|
1350
|
-
* Response for deleting a stored agent
|
|
1351
|
-
*/
|
|
1352
|
-
export interface DeleteStoredAgentResponse {
|
|
1353
|
-
success: boolean;
|
|
1354
|
-
message: string;
|
|
1355
|
-
}
|
|
1356
|
-
/**
|
|
1357
|
-
* A single agent that references another agent as a sub-agent. Includes both
|
|
1358
|
-
* public and the caller's own private agents — anything the caller can read.
|
|
1359
|
-
*/
|
|
1360
|
-
export interface StoredAgentDependent {
|
|
1361
|
-
id: string;
|
|
1362
|
-
name: string;
|
|
883
|
+
export type ExportStoredAgentResponse = GeneratedResponse<'POST /stored/agents/:storedAgentId/export'>;
|
|
884
|
+
export type OpenStoredAgentChangeRequestResponse = GeneratedResponse<'POST /stored/agents/:storedAgentId/change-request'>;
|
|
885
|
+
export type UpdateStoredAgentParams = GeneratedRequest<Body<'PATCH /stored/agents/:storedAgentId'>>;
|
|
886
|
+
/**
|
|
887
|
+
* Response for deleting a stored agent
|
|
888
|
+
*/
|
|
889
|
+
export type DeleteStoredAgentResponse = GeneratedResponse<'DELETE /stored/agents/:storedAgentId'>;
|
|
890
|
+
/**
|
|
891
|
+
* A single agent that references another agent as a sub-agent. Includes both
|
|
892
|
+
* public and the caller's own private agents — anything the caller can read.
|
|
893
|
+
*/
|
|
894
|
+
export interface StoredAgentDependent {
|
|
895
|
+
id: string;
|
|
896
|
+
name: string;
|
|
1363
897
|
}
|
|
1364
898
|
/**
|
|
1365
899
|
* Response for listing dependents of a stored agent.
|
|
@@ -1367,10 +901,7 @@ export interface StoredAgentDependent {
|
|
|
1367
901
|
* `hiddenCount` aggregates dependents the caller cannot read; it is only
|
|
1368
902
|
* non-zero when the target agent is public.
|
|
1369
903
|
*/
|
|
1370
|
-
export
|
|
1371
|
-
dependents: StoredAgentDependent[];
|
|
1372
|
-
hiddenCount: number;
|
|
1373
|
-
}
|
|
904
|
+
export type StoredAgentDependentsResponse = GeneratedResponse<'GET /stored/agents/:storedAgentId/dependents'>;
|
|
1374
905
|
/**
|
|
1375
906
|
* Sampling configuration for scorers
|
|
1376
907
|
*/
|
|
@@ -1387,105 +918,27 @@ export type StoredScorerType = 'llm-judge' | 'answer-relevancy' | 'answer-simila
|
|
|
1387
918
|
/**
|
|
1388
919
|
* Stored scorer definition data returned from API
|
|
1389
920
|
*/
|
|
1390
|
-
export
|
|
1391
|
-
id: string;
|
|
1392
|
-
status: string;
|
|
1393
|
-
activeVersionId?: string;
|
|
1394
|
-
authorId?: string;
|
|
1395
|
-
metadata?: Record<string, unknown>;
|
|
1396
|
-
createdAt: string;
|
|
1397
|
-
updatedAt: string;
|
|
1398
|
-
name: string;
|
|
1399
|
-
description?: string;
|
|
1400
|
-
type: StoredScorerType;
|
|
1401
|
-
model?: {
|
|
1402
|
-
provider: string;
|
|
1403
|
-
name: string;
|
|
1404
|
-
[key: string]: unknown;
|
|
1405
|
-
};
|
|
1406
|
-
instructions?: string;
|
|
1407
|
-
scoreRange?: {
|
|
1408
|
-
min?: number;
|
|
1409
|
-
max?: number;
|
|
1410
|
-
};
|
|
1411
|
-
presetConfig?: Record<string, unknown>;
|
|
1412
|
-
defaultSampling?: ScorerSamplingConfig;
|
|
1413
|
-
}
|
|
921
|
+
export type StoredScorerResponse = GeneratedResponse<'GET /stored/scorers/:storedScorerId'>;
|
|
1414
922
|
/**
|
|
1415
923
|
* Parameters for listing stored scorer definitions
|
|
1416
924
|
*/
|
|
1417
|
-
export
|
|
1418
|
-
page?: number;
|
|
1419
|
-
perPage?: number;
|
|
1420
|
-
orderBy?: {
|
|
1421
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1422
|
-
direction?: 'ASC' | 'DESC';
|
|
1423
|
-
};
|
|
1424
|
-
authorId?: string;
|
|
1425
|
-
metadata?: Record<string, unknown>;
|
|
1426
|
-
}
|
|
925
|
+
export type ListStoredScorersParams = GeneratedRequest<QueryParams<'GET /stored/scorers'>>;
|
|
1427
926
|
/**
|
|
1428
927
|
* Response for listing stored scorer definitions
|
|
1429
928
|
*/
|
|
1430
|
-
export
|
|
1431
|
-
scorerDefinitions: StoredScorerResponse[];
|
|
1432
|
-
total: number;
|
|
1433
|
-
page: number;
|
|
1434
|
-
perPage: number | false;
|
|
1435
|
-
hasMore: boolean;
|
|
1436
|
-
}
|
|
929
|
+
export type ListStoredScorersResponse = GeneratedResponse<'GET /stored/scorers'>;
|
|
1437
930
|
/**
|
|
1438
931
|
* Parameters for creating a stored scorer definition
|
|
1439
932
|
*/
|
|
1440
|
-
export
|
|
1441
|
-
id?: string;
|
|
1442
|
-
authorId?: string;
|
|
1443
|
-
metadata?: Record<string, unknown>;
|
|
1444
|
-
name: string;
|
|
1445
|
-
description?: string;
|
|
1446
|
-
type: StoredScorerType;
|
|
1447
|
-
model?: {
|
|
1448
|
-
provider: string;
|
|
1449
|
-
name: string;
|
|
1450
|
-
[key: string]: unknown;
|
|
1451
|
-
};
|
|
1452
|
-
instructions?: string;
|
|
1453
|
-
scoreRange?: {
|
|
1454
|
-
min?: number;
|
|
1455
|
-
max?: number;
|
|
1456
|
-
};
|
|
1457
|
-
presetConfig?: Record<string, unknown>;
|
|
1458
|
-
defaultSampling?: ScorerSamplingConfig;
|
|
1459
|
-
}
|
|
933
|
+
export type CreateStoredScorerParams = GeneratedRequest<Body<'POST /stored/scorers'>>;
|
|
1460
934
|
/**
|
|
1461
935
|
* Parameters for updating a stored scorer definition
|
|
1462
936
|
*/
|
|
1463
|
-
export
|
|
1464
|
-
authorId?: string;
|
|
1465
|
-
metadata?: Record<string, unknown>;
|
|
1466
|
-
name?: string;
|
|
1467
|
-
description?: string;
|
|
1468
|
-
type?: StoredScorerType;
|
|
1469
|
-
model?: {
|
|
1470
|
-
provider: string;
|
|
1471
|
-
name: string;
|
|
1472
|
-
[key: string]: unknown;
|
|
1473
|
-
};
|
|
1474
|
-
instructions?: string;
|
|
1475
|
-
scoreRange?: {
|
|
1476
|
-
min?: number;
|
|
1477
|
-
max?: number;
|
|
1478
|
-
};
|
|
1479
|
-
presetConfig?: Record<string, unknown>;
|
|
1480
|
-
defaultSampling?: ScorerSamplingConfig;
|
|
1481
|
-
}
|
|
937
|
+
export type UpdateStoredScorerParams = GeneratedRequest<Body<'PATCH /stored/scorers/:storedScorerId'>>;
|
|
1482
938
|
/**
|
|
1483
939
|
* Response for deleting a stored scorer definition
|
|
1484
940
|
*/
|
|
1485
|
-
export
|
|
1486
|
-
success: boolean;
|
|
1487
|
-
message: string;
|
|
1488
|
-
}
|
|
941
|
+
export type DeleteStoredScorerResponse = GeneratedResponse<'DELETE /stored/scorers/:storedScorerId'>;
|
|
1489
942
|
/**
|
|
1490
943
|
* MCP server transport configuration
|
|
1491
944
|
*/
|
|
@@ -1500,69 +953,27 @@ export interface StoredMCPServerConfig {
|
|
|
1500
953
|
/**
|
|
1501
954
|
* Stored MCP client data returned from API
|
|
1502
955
|
*/
|
|
1503
|
-
export
|
|
1504
|
-
id: string;
|
|
1505
|
-
status: string;
|
|
1506
|
-
activeVersionId?: string;
|
|
1507
|
-
authorId?: string;
|
|
1508
|
-
metadata?: Record<string, unknown>;
|
|
1509
|
-
createdAt: string;
|
|
1510
|
-
updatedAt: string;
|
|
1511
|
-
name: string;
|
|
1512
|
-
description?: string;
|
|
1513
|
-
servers: Record<string, StoredMCPServerConfig>;
|
|
1514
|
-
}
|
|
956
|
+
export type StoredMCPClientResponse = GeneratedResponse<'GET /stored/mcp-clients/:storedMCPClientId'>;
|
|
1515
957
|
/**
|
|
1516
958
|
* Parameters for listing stored MCP clients
|
|
1517
959
|
*/
|
|
1518
|
-
export
|
|
1519
|
-
page?: number;
|
|
1520
|
-
perPage?: number;
|
|
1521
|
-
orderBy?: {
|
|
1522
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1523
|
-
direction?: 'ASC' | 'DESC';
|
|
1524
|
-
};
|
|
1525
|
-
authorId?: string;
|
|
1526
|
-
metadata?: Record<string, unknown>;
|
|
1527
|
-
}
|
|
960
|
+
export type ListStoredMCPClientsParams = GeneratedRequest<QueryParams<'GET /stored/mcp-clients'>>;
|
|
1528
961
|
/**
|
|
1529
962
|
* Response for listing stored MCP clients
|
|
1530
963
|
*/
|
|
1531
|
-
export
|
|
1532
|
-
mcpClients: StoredMCPClientResponse[];
|
|
1533
|
-
total: number;
|
|
1534
|
-
page: number;
|
|
1535
|
-
perPage: number | false;
|
|
1536
|
-
hasMore: boolean;
|
|
1537
|
-
}
|
|
964
|
+
export type ListStoredMCPClientsResponse = GeneratedResponse<'GET /stored/mcp-clients'>;
|
|
1538
965
|
/**
|
|
1539
966
|
* Parameters for creating a stored MCP client
|
|
1540
967
|
*/
|
|
1541
|
-
export
|
|
1542
|
-
id?: string;
|
|
1543
|
-
authorId?: string;
|
|
1544
|
-
metadata?: Record<string, unknown>;
|
|
1545
|
-
name: string;
|
|
1546
|
-
description?: string;
|
|
1547
|
-
servers: Record<string, StoredMCPServerConfig>;
|
|
1548
|
-
}
|
|
968
|
+
export type CreateStoredMCPClientParams = GeneratedRequest<Body<'POST /stored/mcp-clients'>>;
|
|
1549
969
|
/**
|
|
1550
970
|
* Parameters for updating a stored MCP client
|
|
1551
971
|
*/
|
|
1552
|
-
export
|
|
1553
|
-
authorId?: string;
|
|
1554
|
-
metadata?: Record<string, unknown>;
|
|
1555
|
-
name?: string;
|
|
1556
|
-
description?: string;
|
|
1557
|
-
servers?: Record<string, StoredMCPServerConfig>;
|
|
1558
|
-
}
|
|
972
|
+
export type UpdateStoredMCPClientParams = GeneratedRequest<Body<'PATCH /stored/mcp-clients/:storedMCPClientId'>>;
|
|
1559
973
|
/**
|
|
1560
974
|
* Response for deleting a stored MCP client
|
|
1561
975
|
*/
|
|
1562
|
-
export
|
|
1563
|
-
success: boolean;
|
|
1564
|
-
message: string;
|
|
1565
|
-
}
|
|
976
|
+
export type DeleteStoredMCPClientResponse = GeneratedResponse<'DELETE /stored/mcp-clients/:storedMCPClientId'>;
|
|
1566
977
|
export interface AgentVersionResponse {
|
|
1567
978
|
id: string;
|
|
1568
979
|
agentId: string;
|
|
@@ -1699,14 +1110,8 @@ export interface CompareScorerVersionsResponse {
|
|
|
1699
1110
|
diffs: VersionDiff[];
|
|
1700
1111
|
}
|
|
1701
1112
|
export type ListAgentsModelProvidersResponse = GeneratedResponse<'GET /agents/providers'>;
|
|
1702
|
-
export
|
|
1703
|
-
|
|
1704
|
-
name: string;
|
|
1705
|
-
envVar: string | string[];
|
|
1706
|
-
connected: boolean;
|
|
1707
|
-
docUrl?: string;
|
|
1708
|
-
models: string[];
|
|
1709
|
-
}
|
|
1113
|
+
export type GetAgentBuilderActionsResponse = GeneratedResponse<'GET /agent-builder'>;
|
|
1114
|
+
export type Provider = ListAgentsModelProvidersResponse['providers'][number];
|
|
1710
1115
|
export interface MastraPackage {
|
|
1711
1116
|
name: string;
|
|
1712
1117
|
version: string;
|
|
@@ -1900,92 +1305,27 @@ export interface StoredSkillFileNode {
|
|
|
1900
1305
|
/**
|
|
1901
1306
|
* Stored skill data returned from API
|
|
1902
1307
|
*/
|
|
1903
|
-
export
|
|
1904
|
-
id: string;
|
|
1905
|
-
status: string;
|
|
1906
|
-
authorId?: string;
|
|
1907
|
-
visibility?: 'private' | 'public';
|
|
1908
|
-
metadata?: Record<string, unknown>;
|
|
1909
|
-
createdAt: string;
|
|
1910
|
-
updatedAt: string;
|
|
1911
|
-
name: string;
|
|
1912
|
-
description?: string;
|
|
1913
|
-
instructions: string;
|
|
1914
|
-
license?: string;
|
|
1915
|
-
files?: StoredSkillFileNode[];
|
|
1916
|
-
isFavorited?: boolean;
|
|
1917
|
-
favoriteCount?: number;
|
|
1918
|
-
}
|
|
1308
|
+
export type StoredSkillResponse = GeneratedResponse<'GET /stored/skills/:storedSkillId'>;
|
|
1919
1309
|
/**
|
|
1920
1310
|
* Parameters for listing stored skills
|
|
1921
1311
|
*/
|
|
1922
|
-
export
|
|
1923
|
-
page?: number;
|
|
1924
|
-
perPage?: number;
|
|
1925
|
-
orderBy?: {
|
|
1926
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1927
|
-
direction?: 'ASC' | 'DESC';
|
|
1928
|
-
};
|
|
1929
|
-
authorId?: string;
|
|
1930
|
-
/**
|
|
1931
|
-
* Restrict the list to public records. Only `'public'` is accepted by the
|
|
1932
|
-
* server filter; private records are surfaced via the default scope-aware
|
|
1933
|
-
* filter (caller's own rows + legacy unowned).
|
|
1934
|
-
*/
|
|
1935
|
-
visibility?: 'public';
|
|
1936
|
-
metadata?: Record<string, unknown>;
|
|
1937
|
-
/** When true, only return skills favorited by the caller (or by `pinFavoritedFor`). */
|
|
1938
|
-
favoritedOnly?: boolean;
|
|
1939
|
-
/** When set, sort favorited-first for this user id. Required for `favoritedOnly`. */
|
|
1940
|
-
pinFavoritedFor?: string;
|
|
1941
|
-
}
|
|
1312
|
+
export type ListStoredSkillsParams = GeneratedRequest<QueryParams<'GET /stored/skills'>>;
|
|
1942
1313
|
/**
|
|
1943
1314
|
* Response for listing stored skills
|
|
1944
1315
|
*/
|
|
1945
|
-
export
|
|
1946
|
-
skills: StoredSkillResponse[];
|
|
1947
|
-
total: number;
|
|
1948
|
-
page: number;
|
|
1949
|
-
perPage: number | false;
|
|
1950
|
-
hasMore: boolean;
|
|
1951
|
-
}
|
|
1316
|
+
export type ListStoredSkillsResponse = GeneratedResponse<'GET /stored/skills'>;
|
|
1952
1317
|
/**
|
|
1953
1318
|
* Parameters for creating a stored skill
|
|
1954
1319
|
*/
|
|
1955
|
-
export
|
|
1956
|
-
id?: string;
|
|
1957
|
-
authorId?: string;
|
|
1958
|
-
/** Visibility of the skill. Defaults to 'private'. */
|
|
1959
|
-
visibility?: 'private' | 'public';
|
|
1960
|
-
metadata?: Record<string, unknown>;
|
|
1961
|
-
name: string;
|
|
1962
|
-
/** Required by the server: description of what the skill does and when to use it. */
|
|
1963
|
-
description: string;
|
|
1964
|
-
instructions: string;
|
|
1965
|
-
license?: string;
|
|
1966
|
-
files?: StoredSkillFileNode[];
|
|
1967
|
-
}
|
|
1320
|
+
export type CreateStoredSkillParams = GeneratedRequest<Body<'POST /stored/skills'>>;
|
|
1968
1321
|
/**
|
|
1969
1322
|
* Parameters for updating a stored skill
|
|
1970
1323
|
*/
|
|
1971
|
-
export
|
|
1972
|
-
authorId?: string;
|
|
1973
|
-
/** Visibility of the skill. */
|
|
1974
|
-
visibility?: 'private' | 'public';
|
|
1975
|
-
metadata?: Record<string, unknown>;
|
|
1976
|
-
name?: string;
|
|
1977
|
-
description?: string;
|
|
1978
|
-
instructions?: string;
|
|
1979
|
-
license?: string;
|
|
1980
|
-
files?: StoredSkillFileNode[];
|
|
1981
|
-
}
|
|
1324
|
+
export type UpdateStoredSkillParams = GeneratedRequest<Body<'PATCH /stored/skills/:storedSkillId'>>;
|
|
1982
1325
|
/**
|
|
1983
1326
|
* Response for deleting a stored skill
|
|
1984
1327
|
*/
|
|
1985
|
-
export
|
|
1986
|
-
success: boolean;
|
|
1987
|
-
message: string;
|
|
1988
|
-
}
|
|
1328
|
+
export type DeleteStoredSkillResponse = GeneratedResponse<'DELETE /stored/skills/:storedSkillId'>;
|
|
1989
1329
|
/**
|
|
1990
1330
|
* Filesystem configuration in a stored workspace
|
|
1991
1331
|
*/
|
|
@@ -2004,120 +1344,29 @@ export interface StoredSandboxConfig {
|
|
|
2004
1344
|
/**
|
|
2005
1345
|
* Stored workspace data returned from API
|
|
2006
1346
|
*/
|
|
2007
|
-
export
|
|
2008
|
-
id: string;
|
|
2009
|
-
status: string;
|
|
2010
|
-
activeVersionId?: string;
|
|
2011
|
-
authorId?: string;
|
|
2012
|
-
metadata?: Record<string, unknown>;
|
|
2013
|
-
createdAt: string;
|
|
2014
|
-
updatedAt: string;
|
|
2015
|
-
name: string;
|
|
2016
|
-
description?: string;
|
|
2017
|
-
filesystem?: StoredFilesystemConfig;
|
|
2018
|
-
sandbox?: StoredSandboxConfig;
|
|
2019
|
-
mounts?: Record<string, StoredFilesystemConfig>;
|
|
2020
|
-
skills?: string[];
|
|
2021
|
-
tools?: {
|
|
2022
|
-
enabled?: boolean;
|
|
2023
|
-
requireApproval?: boolean;
|
|
2024
|
-
tools?: Record<string, {
|
|
2025
|
-
enabled?: boolean;
|
|
2026
|
-
requireApproval?: boolean;
|
|
2027
|
-
}>;
|
|
2028
|
-
};
|
|
2029
|
-
autoSync?: boolean;
|
|
2030
|
-
operationTimeout?: number;
|
|
2031
|
-
/** Whether this workspace is registered at runtime (only present in list responses) */
|
|
2032
|
-
runtimeRegistered?: boolean;
|
|
2033
|
-
}
|
|
1347
|
+
export type StoredWorkspaceResponse = GeneratedResponse<'GET /stored/workspaces/:storedWorkspaceId'>;
|
|
2034
1348
|
/**
|
|
2035
1349
|
* Parameters for listing stored workspaces
|
|
2036
1350
|
*/
|
|
2037
|
-
export
|
|
2038
|
-
page?: number;
|
|
2039
|
-
perPage?: number;
|
|
2040
|
-
orderBy?: {
|
|
2041
|
-
field?: 'createdAt' | 'updatedAt';
|
|
2042
|
-
direction?: 'ASC' | 'DESC';
|
|
2043
|
-
};
|
|
2044
|
-
authorId?: string;
|
|
2045
|
-
metadata?: Record<string, unknown>;
|
|
2046
|
-
}
|
|
1351
|
+
export type ListStoredWorkspacesParams = GeneratedRequest<QueryParams<'GET /stored/workspaces'>>;
|
|
2047
1352
|
/**
|
|
2048
1353
|
* Response for listing stored workspaces
|
|
2049
1354
|
*/
|
|
2050
|
-
export
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
/**
|
|
2058
|
-
|
|
2059
|
-
*/
|
|
2060
|
-
export type
|
|
2061
|
-
/**
|
|
2062
|
-
|
|
2063
|
-
*/
|
|
2064
|
-
export
|
|
2065
|
-
agentId: string;
|
|
2066
|
-
agentName: string;
|
|
2067
|
-
type: 'input' | 'output';
|
|
2068
|
-
}
|
|
2069
|
-
/**
|
|
2070
|
-
* Processor in list response
|
|
2071
|
-
*/
|
|
2072
|
-
export interface GetProcessorResponse {
|
|
2073
|
-
id: string;
|
|
2074
|
-
name?: string;
|
|
2075
|
-
description?: string;
|
|
2076
|
-
phases: ProcessorPhase[];
|
|
2077
|
-
agentIds: string[];
|
|
2078
|
-
isWorkflow: boolean;
|
|
2079
|
-
}
|
|
2080
|
-
/**
|
|
2081
|
-
* Detailed processor response
|
|
2082
|
-
*/
|
|
2083
|
-
export interface GetProcessorDetailResponse {
|
|
2084
|
-
id: string;
|
|
2085
|
-
name?: string;
|
|
2086
|
-
description?: string;
|
|
2087
|
-
phases: ProcessorPhase[];
|
|
2088
|
-
configurations: ProcessorConfiguration[];
|
|
2089
|
-
isWorkflow: boolean;
|
|
2090
|
-
}
|
|
2091
|
-
/**
|
|
2092
|
-
* Parameters for executing a processor
|
|
2093
|
-
*/
|
|
2094
|
-
export interface ExecuteProcessorParams {
|
|
2095
|
-
phase: ProcessorPhase;
|
|
2096
|
-
messages: MastraDBMessage[];
|
|
2097
|
-
agentId?: string;
|
|
2098
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
2099
|
-
}
|
|
2100
|
-
/**
|
|
2101
|
-
* Tripwire result from processor execution
|
|
2102
|
-
*/
|
|
2103
|
-
export interface ProcessorTripwireResult {
|
|
2104
|
-
triggered: boolean;
|
|
2105
|
-
reason?: string;
|
|
2106
|
-
metadata?: unknown;
|
|
2107
|
-
}
|
|
2108
|
-
/**
|
|
2109
|
-
* Response from processor execution
|
|
2110
|
-
*/
|
|
2111
|
-
export interface ExecuteProcessorResponse {
|
|
2112
|
-
success: boolean;
|
|
2113
|
-
phase: string;
|
|
2114
|
-
messages?: MastraDBMessage[];
|
|
2115
|
-
messageList?: {
|
|
2116
|
-
messages: MastraDBMessage[];
|
|
2117
|
-
};
|
|
2118
|
-
tripwire?: ProcessorTripwireResult;
|
|
2119
|
-
error?: string;
|
|
2120
|
-
}
|
|
1355
|
+
export type ListStoredWorkspacesResponse = GeneratedResponse<'GET /stored/workspaces'>;
|
|
1356
|
+
/** Processor phases are defined by the processor detail route. */
|
|
1357
|
+
export type ProcessorPhase = GeneratedResponse<'GET /processors/:processorId'>['phases'][number];
|
|
1358
|
+
/** Processor attachment configuration returned by the detail route. */
|
|
1359
|
+
export type ProcessorConfiguration = GeneratedResponse<'GET /processors/:processorId'>['configurations'][number];
|
|
1360
|
+
/** Processor summary returned from the processor collection route. */
|
|
1361
|
+
export type GetProcessorResponse = GeneratedResponse<'GET /processors'>[string];
|
|
1362
|
+
/** Detailed processor response. */
|
|
1363
|
+
export type GetProcessorDetailResponse = GeneratedResponse<'GET /processors/:processorId'>;
|
|
1364
|
+
/** Parameters for executing a processor. */
|
|
1365
|
+
export type ExecuteProcessorParams = GeneratedRequest<Body<'POST /processors/:processorId/execute'>> & RequestContextOptions;
|
|
1366
|
+
/** Tripwire result returned from processor execution. */
|
|
1367
|
+
export type ProcessorTripwireResult = NonNullable<GeneratedResponse<'POST /processors/:processorId/execute'>['tripwire']>;
|
|
1368
|
+
/** Response from processor execution. */
|
|
1369
|
+
export type ExecuteProcessorResponse = GeneratedResponse<'POST /processors/:processorId/execute'>;
|
|
2121
1370
|
/**
|
|
2122
1371
|
* Parameters for getting observational memory
|
|
2123
1372
|
*/
|
|
@@ -2259,59 +1508,10 @@ export interface DatasetItemToolMock {
|
|
|
2259
1508
|
matchArgs?: 'strict' | 'ignore';
|
|
2260
1509
|
}
|
|
2261
1510
|
/** Diagnostic receipt for item-level tool mocks, returned on experiment results. */
|
|
2262
|
-
export
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
args: unknown;
|
|
2267
|
-
}>;
|
|
2268
|
-
unconsumed: Array<{
|
|
2269
|
-
mockIndex: number;
|
|
2270
|
-
toolName: string;
|
|
2271
|
-
args: unknown;
|
|
2272
|
-
}>;
|
|
2273
|
-
liveCalls: Array<{
|
|
2274
|
-
toolName: string;
|
|
2275
|
-
args: unknown;
|
|
2276
|
-
}>;
|
|
2277
|
-
failure?: {
|
|
2278
|
-
code: 'TOOL_MOCK_MISMATCH' | 'TOOL_MOCK_EXHAUSTED';
|
|
2279
|
-
toolName: string;
|
|
2280
|
-
args: unknown;
|
|
2281
|
-
};
|
|
2282
|
-
}
|
|
2283
|
-
export interface DatasetItem {
|
|
2284
|
-
id: string;
|
|
2285
|
-
datasetId: string;
|
|
2286
|
-
datasetVersion: number;
|
|
2287
|
-
externalId?: string | null;
|
|
2288
|
-
input: unknown;
|
|
2289
|
-
groundTruth?: unknown;
|
|
2290
|
-
expectedTrajectory?: unknown;
|
|
2291
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2292
|
-
scorerIds?: string[];
|
|
2293
|
-
requestContext?: Record<string, unknown>;
|
|
2294
|
-
metadata?: unknown;
|
|
2295
|
-
source?: DatasetItemSource;
|
|
2296
|
-
createdAt: string | Date;
|
|
2297
|
-
updatedAt: string | Date;
|
|
2298
|
-
}
|
|
2299
|
-
export interface DatasetRecord {
|
|
2300
|
-
id: string;
|
|
2301
|
-
name: string;
|
|
2302
|
-
description?: string | null;
|
|
2303
|
-
metadata?: Record<string, unknown> | null;
|
|
2304
|
-
inputSchema?: Record<string, unknown>;
|
|
2305
|
-
groundTruthSchema?: Record<string, unknown>;
|
|
2306
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2307
|
-
tags?: string[] | null;
|
|
2308
|
-
targetType?: string | null;
|
|
2309
|
-
targetIds?: string[] | null;
|
|
2310
|
-
scorerIds?: string[] | null;
|
|
2311
|
-
version: number;
|
|
2312
|
-
createdAt: string | Date;
|
|
2313
|
-
updatedAt: string | Date;
|
|
2314
|
-
}
|
|
1511
|
+
export type ToolMockReport = NonNullable<GeneratedResponse<'GET /datasets/:datasetId/experiments/:experimentId/results'>['results'][number]['toolMockReport']>;
|
|
1512
|
+
export type DatasetItem = NonNullable<GeneratedResponse<'GET /datasets/:datasetId/items/:itemId'>>;
|
|
1513
|
+
export type DatasetRecord = NonNullable<GeneratedResponse<'GET /datasets/:datasetId'>>;
|
|
1514
|
+
export type ExperimentTargetType = NonNullable<QueryParams<'GET /experiments'>['targetType']>;
|
|
2315
1515
|
export interface ExperimentProvenance {
|
|
2316
1516
|
source?: string;
|
|
2317
1517
|
sourceId?: string;
|
|
@@ -2329,80 +1529,13 @@ export interface ExperimentGrouping {
|
|
|
2329
1529
|
variantId?: string;
|
|
2330
1530
|
trialIndex?: number;
|
|
2331
1531
|
}
|
|
2332
|
-
export type
|
|
2333
|
-
export
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
/** Only return experiments run against targets of this type */
|
|
2337
|
-
targetType?: ExperimentTargetType;
|
|
2338
|
-
/** Only return experiments run against this target ID */
|
|
2339
|
-
targetId?: string;
|
|
2340
|
-
}
|
|
2341
|
-
export interface ListDatasetsParams {
|
|
2342
|
-
page?: number;
|
|
2343
|
-
perPage?: number;
|
|
2344
|
-
/** Only return datasets attached to targets of this type */
|
|
2345
|
-
targetType?: ExperimentTargetType;
|
|
2346
|
-
/** Only return datasets attached to at least one of these target IDs */
|
|
2347
|
-
targetIds?: string[];
|
|
2348
|
-
}
|
|
2349
|
-
export interface DatasetExperiment {
|
|
2350
|
-
id: string;
|
|
2351
|
-
datasetId: string | null;
|
|
2352
|
-
datasetVersion: number | null;
|
|
2353
|
-
agentVersion: string | null;
|
|
2354
|
-
/** `null` for caller-driven ingestion experiments (the caller executes items itself). */
|
|
2355
|
-
targetType: 'agent' | 'workflow' | 'scorer' | 'processor' | null;
|
|
2356
|
-
targetId: string | null;
|
|
2357
|
-
/** Run-level scorer IDs pinned at create time for caller-driven experiments. */
|
|
2358
|
-
scorerIds?: string[] | null;
|
|
2359
|
-
/** Human-readable name used as the primary label wherever the experiment is displayed. */
|
|
2360
|
-
name?: string;
|
|
2361
|
-
/** Longer description shown as secondary detail (e.g. in a tooltip). */
|
|
2362
|
-
description?: string;
|
|
2363
|
-
provenance: ExperimentProvenance | null;
|
|
2364
|
-
runnerAttestation: ExperimentRunnerAttestation | null;
|
|
2365
|
-
experimentSetId: string | null;
|
|
2366
|
-
comparisonId: string | null;
|
|
2367
|
-
variantId: string | null;
|
|
2368
|
-
trialIndex: number | null;
|
|
2369
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
2370
|
-
totalItems: number;
|
|
2371
|
-
succeededCount: number;
|
|
2372
|
-
failedCount: number;
|
|
2373
|
-
skippedCount: number;
|
|
2374
|
-
startedAt: string | Date | null;
|
|
2375
|
-
completedAt: string | Date | null;
|
|
2376
|
-
createdAt: string | Date;
|
|
2377
|
-
updatedAt: string | Date;
|
|
2378
|
-
}
|
|
2379
|
-
export interface DatasetExperimentResult {
|
|
2380
|
-
id: string;
|
|
2381
|
-
experimentId: string;
|
|
2382
|
-
itemId: string;
|
|
2383
|
-
itemDatasetVersion: number | null;
|
|
2384
|
-
input: unknown;
|
|
2385
|
-
output: unknown | null;
|
|
2386
|
-
groundTruth: unknown | null;
|
|
2387
|
-
metadata?: Record<string, unknown> | null;
|
|
2388
|
-
/** Structured failure info, as persisted by the experiment runner. */
|
|
2389
|
-
error: {
|
|
2390
|
-
message: string;
|
|
2391
|
-
stack?: string;
|
|
2392
|
-
code?: string;
|
|
2393
|
-
} | null;
|
|
2394
|
-
startedAt: string | Date;
|
|
2395
|
-
completedAt: string | Date;
|
|
2396
|
-
retryCount: number;
|
|
2397
|
-
attempt?: number;
|
|
2398
|
-
traceId: string | null;
|
|
2399
|
-
status: 'needs-review' | 'reviewed' | 'complete' | null;
|
|
2400
|
-
tags: string[] | null;
|
|
2401
|
-
comment?: string | null;
|
|
2402
|
-
toolMockReport?: ToolMockReport | null;
|
|
1532
|
+
export type ListExperimentsParams = GeneratedRequest<QueryParams<'GET /experiments'>>;
|
|
1533
|
+
export type ListDatasetsParams = GeneratedRequest<QueryParams<'GET /datasets'>>;
|
|
1534
|
+
export type DatasetExperiment = GeneratedResponse<'GET /experiments'>['experiments'][number];
|
|
1535
|
+
export type DatasetExperimentResult = GeneratedResponse<'GET /datasets/:datasetId/experiments/:experimentId/results'>['results'][number] & {
|
|
2403
1536
|
/**
|
|
2404
|
-
* Aggregated scorer runs
|
|
2405
|
-
*
|
|
1537
|
+
* Aggregated scorer runs are a client convenience: score records are fetched
|
|
1538
|
+
* from the scores store rather than embedded in the route response.
|
|
2406
1539
|
*/
|
|
2407
1540
|
scores?: Array<{
|
|
2408
1541
|
scorerId: string;
|
|
@@ -2411,318 +1544,61 @@ export interface DatasetExperimentResult {
|
|
|
2411
1544
|
reason: string | null;
|
|
2412
1545
|
error: string | null;
|
|
2413
1546
|
}>;
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
export
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
export
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
groundTruthSchema?: Record<string, unknown> | null;
|
|
2430
|
-
requestContextSchema?: Record<string, unknown> | null;
|
|
2431
|
-
targetType?: string;
|
|
2432
|
-
targetIds?: string[];
|
|
2433
|
-
scorerIds?: string[];
|
|
2434
|
-
}
|
|
2435
|
-
export interface UpdateDatasetParams {
|
|
2436
|
-
datasetId: string;
|
|
2437
|
-
name?: string;
|
|
2438
|
-
description?: string;
|
|
2439
|
-
metadata?: Record<string, unknown>;
|
|
2440
|
-
inputSchema?: Record<string, unknown> | null;
|
|
2441
|
-
groundTruthSchema?: Record<string, unknown> | null;
|
|
2442
|
-
requestContextSchema?: Record<string, unknown> | null;
|
|
2443
|
-
tags?: string[];
|
|
2444
|
-
targetType?: string;
|
|
2445
|
-
targetIds?: string[];
|
|
2446
|
-
scorerIds?: string[] | null;
|
|
2447
|
-
/** Restrict the lookup to a specific tenant organization. */
|
|
2448
|
-
organizationId?: string;
|
|
2449
|
-
/** Restrict the lookup to a specific tenant project. */
|
|
2450
|
-
projectId?: string;
|
|
2451
|
-
}
|
|
2452
|
-
export interface AddDatasetItemParams {
|
|
2453
|
-
datasetId: string;
|
|
2454
|
-
externalId?: string;
|
|
2455
|
-
input: unknown;
|
|
2456
|
-
groundTruth?: unknown;
|
|
2457
|
-
expectedTrajectory?: unknown;
|
|
2458
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2459
|
-
scorerIds?: string[];
|
|
2460
|
-
requestContext?: Record<string, unknown>;
|
|
2461
|
-
metadata?: Record<string, unknown>;
|
|
2462
|
-
source?: DatasetItemSource;
|
|
2463
|
-
}
|
|
2464
|
-
export interface UpdateDatasetItemParams {
|
|
2465
|
-
datasetId: string;
|
|
2466
|
-
itemId: string;
|
|
2467
|
-
input?: unknown;
|
|
2468
|
-
groundTruth?: unknown;
|
|
2469
|
-
expectedTrajectory?: unknown;
|
|
2470
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2471
|
-
scorerIds?: string[] | null;
|
|
2472
|
-
requestContext?: Record<string, unknown>;
|
|
2473
|
-
metadata?: Record<string, unknown>;
|
|
2474
|
-
source?: DatasetItemSource;
|
|
2475
|
-
}
|
|
2476
|
-
export interface BatchInsertDatasetItemsParams {
|
|
2477
|
-
datasetId: string;
|
|
2478
|
-
items: Array<{
|
|
2479
|
-
externalId?: string;
|
|
2480
|
-
input: unknown;
|
|
2481
|
-
groundTruth?: unknown;
|
|
2482
|
-
expectedTrajectory?: unknown;
|
|
2483
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2484
|
-
scorerIds?: string[];
|
|
2485
|
-
requestContext?: Record<string, unknown>;
|
|
2486
|
-
metadata?: Record<string, unknown>;
|
|
2487
|
-
source?: DatasetItemSource;
|
|
2488
|
-
}>;
|
|
2489
|
-
}
|
|
2490
|
-
export interface BatchDeleteDatasetItemsParams {
|
|
2491
|
-
datasetId: string;
|
|
2492
|
-
itemIds: string[];
|
|
2493
|
-
}
|
|
2494
|
-
export interface GenerateDatasetItemsParams {
|
|
2495
|
-
datasetId: string;
|
|
2496
|
-
modelId: string;
|
|
2497
|
-
prompt: string;
|
|
2498
|
-
count?: number;
|
|
2499
|
-
agentContext?: {
|
|
2500
|
-
description?: string;
|
|
2501
|
-
instructions?: string;
|
|
2502
|
-
tools?: string[];
|
|
2503
|
-
};
|
|
2504
|
-
}
|
|
2505
|
-
export interface GeneratedItem {
|
|
2506
|
-
input: unknown;
|
|
2507
|
-
groundTruth?: unknown;
|
|
2508
|
-
}
|
|
2509
|
-
export interface UpdateDatasetExperimentParams {
|
|
2510
|
-
datasetId: string;
|
|
2511
|
-
experimentId: string;
|
|
2512
|
-
name?: string;
|
|
2513
|
-
description?: string;
|
|
2514
|
-
metadata?: Record<string, unknown>;
|
|
2515
|
-
}
|
|
2516
|
-
export interface TriggerDatasetExperimentParams {
|
|
2517
|
-
datasetId: string;
|
|
2518
|
-
targetType: 'agent' | 'workflow' | 'scorer';
|
|
2519
|
-
targetId: string;
|
|
2520
|
-
name?: string;
|
|
2521
|
-
description?: string;
|
|
2522
|
-
metadata?: Record<string, unknown>;
|
|
2523
|
-
scorerIds?: string[];
|
|
2524
|
-
version?: number;
|
|
2525
|
-
agentVersion?: string;
|
|
2526
|
-
maxConcurrency?: number;
|
|
2527
|
-
provenance?: ExperimentProvenance;
|
|
2528
|
-
grouping?: ExperimentGrouping;
|
|
2529
|
-
requestContext?: Record<string, unknown>;
|
|
2530
|
-
}
|
|
2531
|
-
export interface CreateDatasetExperimentParams {
|
|
2532
|
-
datasetId: string;
|
|
2533
|
-
/** Caller-supplied experiment id (e.g. a workflow run id) for idempotent creates. */
|
|
2534
|
-
id?: string;
|
|
2535
|
-
/** Target executed per item via `runExperimentItem`. Both or neither of targetType/targetId. Omit for pure ingestion. */
|
|
2536
|
-
targetType?: 'agent' | 'workflow' | 'scorer';
|
|
2537
|
-
targetId?: string;
|
|
2538
|
-
/** Run-level scorer IDs resolved server-side by `runExperimentItem`. Requires a target. */
|
|
2539
|
-
scorerIds?: string[];
|
|
2540
|
-
name?: string;
|
|
2541
|
-
description?: string;
|
|
2542
|
-
metadata?: Record<string, unknown>;
|
|
2543
|
-
/** Pin to a specific dataset version. Defaults to the latest version. */
|
|
2544
|
-
version?: number;
|
|
2545
|
-
provenance?: ExperimentProvenance;
|
|
2546
|
-
grouping?: ExperimentGrouping;
|
|
2547
|
-
}
|
|
2548
|
-
export interface CreateDatasetExperimentResponse {
|
|
2549
|
-
experimentId: string;
|
|
2550
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
2551
|
-
totalItems: number;
|
|
2552
|
-
datasetVersion: number;
|
|
2553
|
-
}
|
|
2554
|
-
export interface RunExperimentItemParams {
|
|
2555
|
-
datasetId: string;
|
|
2556
|
-
experimentId: string;
|
|
2557
|
-
itemId: string;
|
|
2558
|
-
/** Zero-based repetition index. Defaults to 0. Retried calls with the same (experimentId, itemId, attempt) converge on one row. */
|
|
2559
|
-
attempt?: number;
|
|
2560
|
-
/** Request context merged with the item's own request context (item wins). */
|
|
2561
|
-
requestContext?: Record<string, unknown>;
|
|
2562
|
-
}
|
|
1547
|
+
};
|
|
1548
|
+
export type UpdateExperimentResultParams = PathParams<'PATCH /datasets/:datasetId/experiments/:experimentId/results/:resultId'> & WithoutIndexSignatures<GeneratedRequest<Body<'PATCH /datasets/:datasetId/experiments/:experimentId/results/:resultId'>>>;
|
|
1549
|
+
export type CreateDatasetParams = WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets'>>>;
|
|
1550
|
+
export type UpdateDatasetParams = PathParams<'PATCH /datasets/:datasetId'> & WithoutIndexSignatures<GeneratedRequest<Body<'PATCH /datasets/:datasetId'>>> & GeneratedRequest<QueryParams<'PATCH /datasets/:datasetId'>>;
|
|
1551
|
+
export type AddDatasetItemParams = PathParams<'POST /datasets/:datasetId/items'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/items'>>>;
|
|
1552
|
+
export type UpdateDatasetItemParams = PathParams<'PATCH /datasets/:datasetId/items/:itemId'> & WithoutIndexSignatures<GeneratedRequest<Body<'PATCH /datasets/:datasetId/items/:itemId'>>>;
|
|
1553
|
+
export type BatchInsertDatasetItemsParams = PathParams<'POST /datasets/:datasetId/items/batch'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/items/batch'>>>;
|
|
1554
|
+
export type BatchDeleteDatasetItemsParams = PathParams<'DELETE /datasets/:datasetId/items/batch'> & WithoutIndexSignatures<GeneratedRequest<Body<'DELETE /datasets/:datasetId/items/batch'>>>;
|
|
1555
|
+
export type GenerateDatasetItemsParams = PathParams<'POST /datasets/:datasetId/generate-items'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/generate-items'>>>;
|
|
1556
|
+
export type GeneratedItem = GeneratedResponse<'POST /datasets/:datasetId/generate-items'>['items'][number];
|
|
1557
|
+
export type UpdateDatasetExperimentParams = PathParams<'PATCH /datasets/:datasetId/experiments/:experimentId'> & WithoutIndexSignatures<GeneratedRequest<Body<'PATCH /datasets/:datasetId/experiments/:experimentId'>>>;
|
|
1558
|
+
export type TriggerDatasetExperimentParams = PathParams<'POST /datasets/:datasetId/experiments'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/experiments'>>>;
|
|
1559
|
+
export type CreateDatasetExperimentParams = PathParams<'POST /datasets/:datasetId/experiments'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/experiments'>>>;
|
|
1560
|
+
export type CreateDatasetExperimentResponse = GeneratedResponse<'POST /datasets/:datasetId/experiments'>;
|
|
1561
|
+
export type RunExperimentItemParams = PathParams<'POST /datasets/:datasetId/experiments/:experimentId/items/:itemId/run'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/experiments/:experimentId/items/:itemId/run'>>>;
|
|
2563
1562
|
/**
|
|
2564
1563
|
* A single experiment result row as the server returns it: structured
|
|
2565
1564
|
* `error` object and no aggregated `scores` (scores live in the scores
|
|
2566
1565
|
* store, keyed by `runId = experimentId`).
|
|
2567
1566
|
*/
|
|
1567
|
+
export type ListDatasetExperimentResultsResponse = Omit<GeneratedResponse<'GET /datasets/:datasetId/experiments/:experimentId/results'>, 'results'> & {
|
|
1568
|
+
results: DatasetExperimentResult[];
|
|
1569
|
+
};
|
|
2568
1570
|
export type DatasetExperimentResultRow = Omit<DatasetExperimentResult, 'scores'>;
|
|
2569
|
-
export
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
error: string | null;
|
|
2577
|
-
}>;
|
|
2578
|
-
}
|
|
2579
|
-
export interface SubmitExperimentResultParams {
|
|
2580
|
-
datasetId: string;
|
|
2581
|
-
experimentId: string;
|
|
2582
|
-
itemId: string;
|
|
2583
|
-
/** Zero-based repetition index. Defaults to 0. Retried submissions with the same (experimentId, itemId, attempt) converge on one row. */
|
|
2584
|
-
attempt?: number;
|
|
2585
|
-
input?: unknown;
|
|
2586
|
-
output?: unknown;
|
|
2587
|
-
groundTruth?: unknown;
|
|
2588
|
-
error?: {
|
|
2589
|
-
message: string;
|
|
2590
|
-
stack?: string;
|
|
2591
|
-
code?: string;
|
|
2592
|
-
} | null;
|
|
2593
|
-
startedAt?: Date;
|
|
2594
|
-
completedAt?: Date;
|
|
2595
|
-
traceId?: string;
|
|
2596
|
-
/** Externally computed scores, persisted keyed by runId = experimentId. */
|
|
2597
|
-
scores?: Array<{
|
|
2598
|
-
scorerId: string;
|
|
2599
|
-
scorerName?: string;
|
|
2600
|
-
score: number;
|
|
2601
|
-
reason?: string;
|
|
2602
|
-
metadata?: Record<string, unknown>;
|
|
2603
|
-
}>;
|
|
2604
|
-
}
|
|
2605
|
-
export interface FinalizeExperimentParams {
|
|
2606
|
-
datasetId: string;
|
|
2607
|
-
experimentId: string;
|
|
2608
|
-
}
|
|
2609
|
-
export interface CompareExperimentsParams {
|
|
2610
|
-
datasetId: string;
|
|
2611
|
-
experimentIdA: string;
|
|
2612
|
-
experimentIdB: string;
|
|
2613
|
-
thresholds?: Record<string, {
|
|
2614
|
-
value: number;
|
|
2615
|
-
direction?: 'higher-is-better' | 'lower-is-better';
|
|
2616
|
-
}>;
|
|
2617
|
-
}
|
|
2618
|
-
export interface DatasetItemVersionResponse {
|
|
2619
|
-
id: string;
|
|
2620
|
-
datasetId: string;
|
|
2621
|
-
datasetVersion: number;
|
|
2622
|
-
input: unknown;
|
|
2623
|
-
groundTruth?: unknown;
|
|
2624
|
-
expectedTrajectory?: unknown;
|
|
2625
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2626
|
-
scorerIds?: string[];
|
|
2627
|
-
requestContext?: Record<string, unknown>;
|
|
2628
|
-
metadata?: Record<string, unknown>;
|
|
2629
|
-
validTo: number | null;
|
|
2630
|
-
isDeleted: boolean;
|
|
2631
|
-
createdAt: string | Date;
|
|
2632
|
-
updatedAt: string | Date;
|
|
2633
|
-
}
|
|
2634
|
-
export interface DatasetVersionResponse {
|
|
2635
|
-
id: string;
|
|
2636
|
-
datasetId: string;
|
|
2637
|
-
version: number;
|
|
2638
|
-
createdAt: string | Date;
|
|
2639
|
-
}
|
|
2640
|
-
export interface CompareExperimentsResponse {
|
|
2641
|
-
baselineId: string;
|
|
2642
|
-
items: Array<{
|
|
2643
|
-
itemId: string;
|
|
2644
|
-
input: unknown;
|
|
2645
|
-
groundTruth: unknown;
|
|
2646
|
-
results: Record<string, {
|
|
2647
|
-
output: unknown;
|
|
2648
|
-
scores: Record<string, number | null>;
|
|
2649
|
-
} | null>;
|
|
2650
|
-
}>;
|
|
2651
|
-
}
|
|
1571
|
+
export type RunExperimentItemResponse = GeneratedResponse<'POST /datasets/:datasetId/experiments/:experimentId/items/:itemId/run'>;
|
|
1572
|
+
export type SubmitExperimentResultParams = PathParams<'POST /datasets/:datasetId/experiments/:experimentId/results'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/experiments/:experimentId/results'>>>;
|
|
1573
|
+
export type FinalizeExperimentParams = PathParams<'POST /datasets/:datasetId/experiments/:experimentId/finalize'>;
|
|
1574
|
+
export type CompareExperimentsParams = PathParams<'POST /datasets/:datasetId/compare'> & WithoutIndexSignatures<GeneratedRequest<Body<'POST /datasets/:datasetId/compare'>>>;
|
|
1575
|
+
export type DatasetItemVersionResponse = NonNullable<SerializedRouteResponse<'GET /datasets/:datasetId/items/:itemId/versions/:datasetVersion'>>;
|
|
1576
|
+
export type DatasetVersionResponse = SerializedRouteResponse<'GET /datasets/:datasetId/versions'>['versions'][number];
|
|
1577
|
+
export type CompareExperimentsResponse = GeneratedResponse<'POST /datasets/:datasetId/compare'>;
|
|
2652
1578
|
/**
|
|
2653
1579
|
* Stored prompt block data returned from API
|
|
2654
1580
|
*/
|
|
2655
|
-
export
|
|
2656
|
-
id: string;
|
|
2657
|
-
status: string;
|
|
2658
|
-
activeVersionId?: string;
|
|
2659
|
-
hasDraft?: boolean;
|
|
2660
|
-
authorId?: string;
|
|
2661
|
-
metadata?: Record<string, unknown>;
|
|
2662
|
-
createdAt: string;
|
|
2663
|
-
updatedAt: string;
|
|
2664
|
-
name: string;
|
|
2665
|
-
description?: string;
|
|
2666
|
-
content: string;
|
|
2667
|
-
rules?: RuleGroup;
|
|
2668
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2669
|
-
}
|
|
1581
|
+
export type StoredPromptBlockResponse = GeneratedResponse<'GET /stored/prompt-blocks/:storedPromptBlockId'>;
|
|
2670
1582
|
/**
|
|
2671
1583
|
* Parameters for listing stored prompt blocks
|
|
2672
1584
|
*/
|
|
2673
|
-
export
|
|
2674
|
-
page?: number;
|
|
2675
|
-
perPage?: number;
|
|
2676
|
-
orderBy?: {
|
|
2677
|
-
field?: 'createdAt' | 'updatedAt';
|
|
2678
|
-
direction?: 'ASC' | 'DESC';
|
|
2679
|
-
};
|
|
2680
|
-
status?: 'draft' | 'published' | 'archived';
|
|
2681
|
-
authorId?: string;
|
|
2682
|
-
metadata?: Record<string, unknown>;
|
|
2683
|
-
}
|
|
1585
|
+
export type ListStoredPromptBlocksParams = GeneratedRequest<QueryParams<'GET /stored/prompt-blocks'>>;
|
|
2684
1586
|
/**
|
|
2685
1587
|
* Response for listing stored prompt blocks
|
|
2686
1588
|
*/
|
|
2687
|
-
export
|
|
2688
|
-
promptBlocks: StoredPromptBlockResponse[];
|
|
2689
|
-
total: number;
|
|
2690
|
-
page: number;
|
|
2691
|
-
perPage: number | false;
|
|
2692
|
-
hasMore: boolean;
|
|
2693
|
-
}
|
|
1589
|
+
export type ListStoredPromptBlocksResponse = GeneratedResponse<'GET /stored/prompt-blocks'>;
|
|
2694
1590
|
/**
|
|
2695
1591
|
* Parameters for creating a stored prompt block
|
|
2696
1592
|
*/
|
|
2697
|
-
export
|
|
2698
|
-
id?: string;
|
|
2699
|
-
authorId?: string;
|
|
2700
|
-
metadata?: Record<string, unknown>;
|
|
2701
|
-
name: string;
|
|
2702
|
-
description?: string;
|
|
2703
|
-
content: string;
|
|
2704
|
-
rules?: RuleGroup;
|
|
2705
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2706
|
-
}
|
|
1593
|
+
export type CreateStoredPromptBlockParams = GeneratedRequest<Body<'POST /stored/prompt-blocks'>>;
|
|
2707
1594
|
/**
|
|
2708
1595
|
* Parameters for updating a stored prompt block
|
|
2709
1596
|
*/
|
|
2710
|
-
export
|
|
2711
|
-
authorId?: string;
|
|
2712
|
-
metadata?: Record<string, unknown>;
|
|
2713
|
-
name?: string;
|
|
2714
|
-
description?: string;
|
|
2715
|
-
content?: string;
|
|
2716
|
-
rules?: RuleGroup;
|
|
2717
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2718
|
-
}
|
|
1597
|
+
export type UpdateStoredPromptBlockParams = GeneratedRequest<Body<'PATCH /stored/prompt-blocks/:storedPromptBlockId'>>;
|
|
2719
1598
|
/**
|
|
2720
1599
|
* Response for deleting a stored prompt block
|
|
2721
1600
|
*/
|
|
2722
|
-
export
|
|
2723
|
-
success: boolean;
|
|
2724
|
-
message: string;
|
|
2725
|
-
}
|
|
1601
|
+
export type DeleteStoredPromptBlockResponse = GeneratedResponse<'DELETE /stored/prompt-blocks/:storedPromptBlockId'>;
|
|
2726
1602
|
export interface PromptBlockVersionResponse {
|
|
2727
1603
|
id: string;
|
|
2728
1604
|
blockId: string;
|
|
@@ -2801,136 +1677,41 @@ export interface ScheduleIfIdle {
|
|
|
2801
1677
|
* Flat agent-schedule view returned by the unified `/schedules` surface.
|
|
2802
1678
|
* Discriminate from workflow schedules by the presence of `agentId`.
|
|
2803
1679
|
*/
|
|
2804
|
-
export
|
|
2805
|
-
id: string;
|
|
1680
|
+
export type AgentSchedule = Extract<GeneratedResponse<'GET /schedules'>['schedules'][number], {
|
|
2806
1681
|
agentId: string;
|
|
2807
|
-
|
|
2808
|
-
workflowId?: undefined;
|
|
2809
|
-
/** Workflow-run summary — never hydrated for agent schedules. */
|
|
2810
|
-
lastRun?: undefined;
|
|
2811
|
-
name?: string;
|
|
2812
|
-
threadId?: string;
|
|
2813
|
-
resourceId?: string;
|
|
2814
|
-
prompt: string;
|
|
2815
|
-
cron: string;
|
|
2816
|
-
timezone?: string;
|
|
2817
|
-
status: ScheduleStatus;
|
|
2818
|
-
nextFireAt: number;
|
|
2819
|
-
lastFireAt?: number;
|
|
2820
|
-
lastRunId?: string;
|
|
2821
|
-
signalType?: ScheduleSignalType;
|
|
2822
|
-
tagName?: string;
|
|
2823
|
-
attributes?: ScheduleSignalAttributes;
|
|
2824
|
-
ifActive?: ScheduleIfActive;
|
|
2825
|
-
ifIdle?: ScheduleIfIdle;
|
|
2826
|
-
providerOptions?: Record<string, unknown>;
|
|
2827
|
-
metadata?: Record<string, unknown>;
|
|
2828
|
-
createdAt: number;
|
|
2829
|
-
updatedAt: number;
|
|
2830
|
-
}
|
|
1682
|
+
}>;
|
|
2831
1683
|
/**
|
|
2832
1684
|
* Flat workflow-schedule view returned by the unified `/schedules` surface.
|
|
2833
1685
|
* Discriminate from agent schedules by the presence of `workflowId`.
|
|
2834
1686
|
*/
|
|
2835
|
-
export
|
|
2836
|
-
id: string;
|
|
1687
|
+
export type WorkflowSchedule = Extract<GeneratedResponse<'GET /schedules'>['schedules'][number], {
|
|
2837
1688
|
workflowId: string;
|
|
2838
|
-
|
|
2839
|
-
agentId?: undefined;
|
|
2840
|
-
cron: string;
|
|
2841
|
-
timezone?: string;
|
|
2842
|
-
status: ScheduleStatus;
|
|
2843
|
-
nextFireAt: number;
|
|
2844
|
-
lastFireAt?: number;
|
|
2845
|
-
lastRunId?: string;
|
|
2846
|
-
lastRun?: ScheduleRunSummary;
|
|
2847
|
-
inputData?: unknown;
|
|
2848
|
-
initialState?: unknown;
|
|
2849
|
-
requestContext?: Record<string, unknown>;
|
|
2850
|
-
metadata?: Record<string, unknown>;
|
|
2851
|
-
createdAt: number;
|
|
2852
|
-
updatedAt: number;
|
|
2853
|
-
}
|
|
1689
|
+
}>;
|
|
2854
1690
|
/** Union of the flat views returned by the unified `/schedules` surface. */
|
|
2855
1691
|
export type ScheduleResponse = AgentSchedule | WorkflowSchedule;
|
|
2856
1692
|
export type ScheduleTriggerOutcome = 'published' | 'succeeded' | 'delivered' | 'persisted' | 'discarded' | 'skipped' | 'aborted' | 'failed';
|
|
2857
1693
|
export type ScheduleTriggerKind = 'schedule-fire' | 'queue-drain' | 'manual';
|
|
2858
|
-
export
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
actualFireAt: number;
|
|
2864
|
-
outcome: ScheduleTriggerOutcome;
|
|
2865
|
-
error?: string;
|
|
2866
|
-
triggerKind?: ScheduleTriggerKind;
|
|
2867
|
-
parentTriggerId?: string;
|
|
2868
|
-
metadata?: Record<string, unknown>;
|
|
2869
|
-
run?: ScheduleRunSummary;
|
|
2870
|
-
}
|
|
2871
|
-
export interface ListSchedulesParams {
|
|
2872
|
-
/** Scope the list to a single agent's schedules. */
|
|
2873
|
-
agentId?: string;
|
|
2874
|
-
/** Scope the list to a single workflow's schedules. */
|
|
2875
|
-
workflowId?: string;
|
|
2876
|
-
status?: ScheduleStatus;
|
|
2877
|
-
/** Agent-schedule only: match the target threadId. */
|
|
2878
|
-
threadId?: string;
|
|
2879
|
-
/** Agent-schedule only: match the target resourceId. */
|
|
2880
|
-
resourceId?: string;
|
|
2881
|
-
/** Agent-schedule only: match the free-form target name. */
|
|
2882
|
-
name?: string;
|
|
2883
|
-
}
|
|
2884
|
-
export interface ListSchedulesResponse {
|
|
2885
|
-
schedules: ScheduleResponse[];
|
|
2886
|
-
}
|
|
2887
|
-
export interface ListScheduleTriggersParams {
|
|
2888
|
-
limit?: number;
|
|
2889
|
-
fromActualFireAt?: number;
|
|
2890
|
-
toActualFireAt?: number;
|
|
2891
|
-
}
|
|
2892
|
-
export interface ListScheduleTriggersResponse {
|
|
2893
|
-
triggers: ScheduleTriggerResponse[];
|
|
2894
|
-
}
|
|
1694
|
+
export type ScheduleTriggerResponse = GeneratedResponse<'GET /schedules/:scheduleId/triggers'>['triggers'][number];
|
|
1695
|
+
export type ListSchedulesParams = GeneratedRequest<QueryParams<'GET /schedules'>>;
|
|
1696
|
+
export type ListSchedulesResponse = GeneratedResponse<'GET /schedules'>;
|
|
1697
|
+
export type ListScheduleTriggersParams = GeneratedRequest<QueryParams<'GET /schedules/:scheduleId/triggers'>>;
|
|
1698
|
+
export type ListScheduleTriggersResponse = GeneratedResponse<'GET /schedules/:scheduleId/triggers'>;
|
|
2895
1699
|
/**
|
|
2896
1700
|
* Agent variant of the `client.createSchedule(...)` body — targets an agent
|
|
2897
1701
|
* by `agentId`. Mirrors `CreateAgentScheduleInput` on the core Schedules
|
|
2898
1702
|
* service.
|
|
2899
1703
|
*/
|
|
2900
|
-
export
|
|
2901
|
-
/** Optional stable id; normalized to `agent_<slug>`. A random id is generated when omitted. */
|
|
2902
|
-
id?: string;
|
|
1704
|
+
export type CreateAgentScheduleInput = Extract<WithoutIndexSignatures<GeneratedRequest<Body<'POST /schedules'>>>, {
|
|
2903
1705
|
agentId: string;
|
|
2904
|
-
|
|
2905
|
-
prompt: string;
|
|
2906
|
-
name?: string;
|
|
2907
|
-
timezone?: string;
|
|
2908
|
-
threadId?: string;
|
|
2909
|
-
resourceId?: string;
|
|
2910
|
-
signalType?: ScheduleSignalType;
|
|
2911
|
-
tagName?: string;
|
|
2912
|
-
attributes?: ScheduleSignalAttributes;
|
|
2913
|
-
ifActive?: ScheduleIfActive;
|
|
2914
|
-
ifIdle?: ScheduleIfIdle;
|
|
2915
|
-
providerOptions?: Record<string, unknown>;
|
|
2916
|
-
metadata?: Record<string, unknown>;
|
|
2917
|
-
}
|
|
1706
|
+
}>;
|
|
2918
1707
|
/**
|
|
2919
1708
|
* Workflow variant of the `client.createSchedule(...)` body — targets a
|
|
2920
1709
|
* workflow by `workflowId`. Mirrors `CreateWorkflowScheduleInput` on the
|
|
2921
1710
|
* core Schedules service.
|
|
2922
1711
|
*/
|
|
2923
|
-
export
|
|
2924
|
-
/** Optional stable id; normalized to `schedule_<slug>`. A random id is generated when omitted. */
|
|
2925
|
-
id?: string;
|
|
1712
|
+
export type CreateWorkflowScheduleInput = Extract<WithoutIndexSignatures<GeneratedRequest<Body<'POST /schedules'>>>, {
|
|
2926
1713
|
workflowId: string;
|
|
2927
|
-
|
|
2928
|
-
timezone?: string;
|
|
2929
|
-
inputData?: unknown;
|
|
2930
|
-
initialState?: unknown;
|
|
2931
|
-
requestContext?: Record<string, unknown>;
|
|
2932
|
-
metadata?: Record<string, unknown>;
|
|
2933
|
-
}
|
|
1714
|
+
}>;
|
|
2934
1715
|
/**
|
|
2935
1716
|
* Body for `client.createSchedule(...)`. Discriminated by which target id is
|
|
2936
1717
|
* present: `agentId` creates an agent schedule, `workflowId` a workflow
|
|
@@ -2943,23 +1724,7 @@ export type CreateScheduleInput = CreateAgentScheduleInput | CreateWorkflowSched
|
|
|
2943
1724
|
* server. `threadId` / `resourceId` are part of an agent schedule's identity
|
|
2944
1725
|
* and cannot be changed — to retarget, delete and recreate.
|
|
2945
1726
|
*/
|
|
2946
|
-
export
|
|
2947
|
-
cron?: string;
|
|
2948
|
-
timezone?: string;
|
|
2949
|
-
status?: ScheduleStatus;
|
|
2950
|
-
metadata?: Record<string, unknown>;
|
|
2951
|
-
prompt?: string;
|
|
2952
|
-
name?: string;
|
|
2953
|
-
signalType?: ScheduleSignalType;
|
|
2954
|
-
tagName?: string;
|
|
2955
|
-
attributes?: ScheduleSignalAttributes;
|
|
2956
|
-
ifActive?: ScheduleIfActive;
|
|
2957
|
-
ifIdle?: ScheduleIfIdle;
|
|
2958
|
-
providerOptions?: Record<string, unknown>;
|
|
2959
|
-
inputData?: unknown;
|
|
2960
|
-
initialState?: unknown;
|
|
2961
|
-
requestContext?: Record<string, unknown>;
|
|
2962
|
-
}
|
|
1727
|
+
export type UpdateScheduleInput = WithoutIndexSignatures<GeneratedRequest<Body<'PATCH /schedules/:scheduleId'>>>;
|
|
2963
1728
|
/**
|
|
2964
1729
|
* Response for POST /schedules/:scheduleId/run.
|
|
2965
1730
|
*
|
|
@@ -2967,11 +1732,7 @@ export interface UpdateScheduleInput {
|
|
|
2967
1732
|
* fires. `claimId` is the trigger row's `runId` (used to look up the
|
|
2968
1733
|
* resulting trigger row via `listScheduleTriggers`).
|
|
2969
1734
|
*/
|
|
2970
|
-
export
|
|
2971
|
-
scheduleId: string;
|
|
2972
|
-
claimId: string;
|
|
2973
|
-
scheduledFireAt: number;
|
|
2974
|
-
}
|
|
1735
|
+
export type RunScheduleResponse = GeneratedResponse<'POST /schedules/:scheduleId/run'>;
|
|
2975
1736
|
export interface ExperimentReviewCounts {
|
|
2976
1737
|
experimentId: string;
|
|
2977
1738
|
total: number;
|
|
@@ -3014,36 +1775,7 @@ export type { BuilderModelPolicy, DefaultModelEntry, ProviderModelEntry, ModelPr
|
|
|
3014
1775
|
/**
|
|
3015
1776
|
* Response from GET /editor/builder/settings
|
|
3016
1777
|
*/
|
|
3017
|
-
export
|
|
3018
|
-
enabled: boolean;
|
|
3019
|
-
features?: {
|
|
3020
|
-
agent?: BuilderAgentFeatures;
|
|
3021
|
-
};
|
|
3022
|
-
configuration?: {
|
|
3023
|
-
agent?: Record<string, unknown>;
|
|
3024
|
-
};
|
|
3025
|
-
/**
|
|
3026
|
-
* Server-derived model policy. Always present; `{ active: false }` when no
|
|
3027
|
-
* builder is configured. UI consumers should read this directly rather than
|
|
3028
|
-
* re-deriving from `features` / `configuration`.
|
|
3029
|
-
*/
|
|
3030
|
-
modelPolicy?: BuilderModelPolicy;
|
|
3031
|
-
/**
|
|
3032
|
-
* Resolved picker visibility for tools, agents, and workflows. Present when
|
|
3033
|
-
* the builder is enabled. Each `visible*` field is `null` when unrestricted
|
|
3034
|
-
* (show all registered entries) and `string[]` otherwise — making the
|
|
3035
|
-
* empty-vs-unrestricted distinction explicit so the UI never has to
|
|
3036
|
-
* disambiguate.
|
|
3037
|
-
*/
|
|
3038
|
-
picker?: BuilderPickerResponse;
|
|
3039
|
-
/**
|
|
3040
|
-
* Non-fatal warnings produced by builder config validation (e.g. allowlist
|
|
3041
|
-
* entries with unknown providers that aren't tagged `kind: 'custom'`, or
|
|
3042
|
-
* picker allowlist entries that don't match a registered ID).
|
|
3043
|
-
* Only present when there is at least one warning.
|
|
3044
|
-
*/
|
|
3045
|
-
modelPolicyWarnings?: string[];
|
|
3046
|
-
}
|
|
1778
|
+
export type BuilderSettingsResponse = GeneratedResponse<'GET /editor/builder/settings'>;
|
|
3047
1779
|
/**
|
|
3048
1780
|
* Response from GET /editor/builder/models/available.
|
|
3049
1781
|
*
|
|
@@ -3082,113 +1814,18 @@ export interface BuilderPickerResponse {
|
|
|
3082
1814
|
*
|
|
3083
1815
|
* Agent Builder infrastructure configuration plus lightweight runtime resolution state.
|
|
3084
1816
|
*/
|
|
3085
|
-
export
|
|
3086
|
-
channels: {
|
|
3087
|
-
providers: Array<{
|
|
3088
|
-
id: string;
|
|
3089
|
-
name: string;
|
|
3090
|
-
isConfigured: boolean;
|
|
3091
|
-
routeCount: number;
|
|
3092
|
-
}>;
|
|
3093
|
-
};
|
|
3094
|
-
browser: {
|
|
3095
|
-
type: string | null;
|
|
3096
|
-
provider: string | null;
|
|
3097
|
-
env: string | null;
|
|
3098
|
-
registered: boolean;
|
|
3099
|
-
availableProviders: string[];
|
|
3100
|
-
config: Array<{
|
|
3101
|
-
key: string;
|
|
3102
|
-
value: string;
|
|
3103
|
-
}>;
|
|
3104
|
-
};
|
|
3105
|
-
workspace: {
|
|
3106
|
-
type: string | null;
|
|
3107
|
-
workspaceId: string | null;
|
|
3108
|
-
name: string | null;
|
|
3109
|
-
source: string | null;
|
|
3110
|
-
registered: boolean;
|
|
3111
|
-
hasFilesystem: boolean;
|
|
3112
|
-
hasSandbox: boolean;
|
|
3113
|
-
filesystemProvider: string | null;
|
|
3114
|
-
sandboxProvider: string | null;
|
|
3115
|
-
config: Array<{
|
|
3116
|
-
key: string;
|
|
3117
|
-
value: string;
|
|
3118
|
-
}>;
|
|
3119
|
-
};
|
|
3120
|
-
registries: {
|
|
3121
|
-
skillsSh: {
|
|
3122
|
-
enabled: boolean;
|
|
3123
|
-
};
|
|
3124
|
-
};
|
|
3125
|
-
}
|
|
1817
|
+
export type InfrastructureStatusResponse = GeneratedResponse<'GET /editor/builder/infrastructure'>;
|
|
3126
1818
|
/**
|
|
3127
1819
|
* One known skill registry surfaced from the Agent Builder config.
|
|
3128
1820
|
*/
|
|
3129
|
-
export
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
export interface ListBuilderRegistriesResponse {
|
|
3138
|
-
registries: BuilderRegistryDescriptor[];
|
|
3139
|
-
}
|
|
3140
|
-
/**
|
|
3141
|
-
* Single skill summary returned from a registry search/popular endpoint.
|
|
3142
|
-
* Wire shape matches the upstream skills.sh proxy.
|
|
3143
|
-
*/
|
|
3144
|
-
export interface BuilderRegistrySkillSummary {
|
|
3145
|
-
id: string;
|
|
3146
|
-
name: string;
|
|
3147
|
-
installs: number;
|
|
3148
|
-
/** Repository identifier in `owner/repo` or `owner/repo/path` form. */
|
|
3149
|
-
topSource: string;
|
|
3150
|
-
}
|
|
3151
|
-
/**
|
|
3152
|
-
* Response from `GET /editor/builder/registries/:registryId/search`.
|
|
3153
|
-
*/
|
|
3154
|
-
export interface BuilderRegistrySearchResponse {
|
|
3155
|
-
query: string;
|
|
3156
|
-
searchType: string;
|
|
3157
|
-
skills: BuilderRegistrySkillSummary[];
|
|
3158
|
-
count: number;
|
|
3159
|
-
}
|
|
3160
|
-
/**
|
|
3161
|
-
* Response from `GET /editor/builder/registries/:registryId/popular`.
|
|
3162
|
-
*/
|
|
3163
|
-
export interface BuilderRegistryPopularResponse {
|
|
3164
|
-
skills: BuilderRegistrySkillSummary[];
|
|
3165
|
-
count: number;
|
|
3166
|
-
limit: number;
|
|
3167
|
-
offset: number;
|
|
3168
|
-
}
|
|
3169
|
-
/**
|
|
3170
|
-
* Response from `GET /editor/builder/registries/:registryId/preview`.
|
|
3171
|
-
*/
|
|
3172
|
-
export interface BuilderRegistryPreviewResponse {
|
|
3173
|
-
content: string;
|
|
3174
|
-
}
|
|
3175
|
-
/**
|
|
3176
|
-
* Body for `POST /editor/builder/registries/:registryId/install`.
|
|
3177
|
-
*/
|
|
3178
|
-
export interface BuilderRegistryInstallBody {
|
|
3179
|
-
owner: string;
|
|
3180
|
-
repo: string;
|
|
3181
|
-
skillName: string;
|
|
3182
|
-
visibility?: 'private' | 'public';
|
|
3183
|
-
}
|
|
3184
|
-
/**
|
|
3185
|
-
* Response from `POST /editor/builder/registries/:registryId/install`.
|
|
3186
|
-
*/
|
|
3187
|
-
export interface BuilderRegistryInstallResponse {
|
|
3188
|
-
storedSkillId: string;
|
|
3189
|
-
name: string;
|
|
3190
|
-
filesWritten: number;
|
|
3191
|
-
}
|
|
1821
|
+
export type BuilderRegistryDescriptor = GeneratedResponse<'GET /editor/builder/registries'>['registries'][number];
|
|
1822
|
+
export type ListBuilderRegistriesResponse = GeneratedResponse<'GET /editor/builder/registries'>;
|
|
1823
|
+
export type BuilderRegistrySkillSummary = GeneratedResponse<'GET /editor/builder/registries/:registryId/search'>['skills'][number];
|
|
1824
|
+
export type BuilderRegistrySearchResponse = GeneratedResponse<'GET /editor/builder/registries/:registryId/search'>;
|
|
1825
|
+
export type BuilderRegistryPopularResponse = GeneratedResponse<'GET /editor/builder/registries/:registryId/popular'>;
|
|
1826
|
+
export type BuilderRegistryPreviewResponse = GeneratedResponse<'GET /editor/builder/registries/:registryId/preview'>;
|
|
1827
|
+
export type BuilderRegistryInstallBody = GeneratedRequest<Body<'POST /editor/builder/registries/:registryId/install'>>;
|
|
1828
|
+
export type BuilderRegistryInstallResponse = GeneratedResponse<'POST /editor/builder/registries/:registryId/install'>;
|
|
3192
1829
|
export type { PermissionPolicy, ToolCategory } from '@mastra/core/agent-controller';
|
|
3193
1830
|
export type { TaskItemSnapshot as AgentControllerTaskSnapshot } from '@mastra/core/tools';
|
|
3194
1831
|
export type AgentControllerInfo = GeneratedResponse<'GET /agent-controller'>['agentControllers'][number];
|