@mastra/client-js 1.47.0-alpha.2 → 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/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/reference-client-js-mastra-client.md +1 -1
- package/dist/index.cjs +36 -29
- 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 +36 -29
- 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 +32 -70
- 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 +3 -5
- 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 +2702 -2163
- package/dist/route-types.generated.d.ts.map +1 -1
- package/dist/types.d.ts +230 -1598
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/types.d.ts
CHANGED
|
@@ -2,22 +2,20 @@ import type { JSONValue, ToolInvocationUIPart } from './_types/@ai-sdk_ui-utils/
|
|
|
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,22 +477,9 @@ export interface LoopVNextNetworkResponse {
|
|
|
745
477
|
};
|
|
746
478
|
steps: WorkflowResult<any, any, any, any>['steps'];
|
|
747
479
|
}
|
|
748
|
-
export
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
total_count: number;
|
|
752
|
-
}
|
|
753
|
-
export interface McpToolInfo {
|
|
754
|
-
id: string;
|
|
755
|
-
name: string;
|
|
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'>;
|
|
764
483
|
/**
|
|
765
484
|
* `{ result }` for a completed tool, or the suspended shape a 2026-07-28 server reports
|
|
766
485
|
* when the tool asked for input (answer with `resumeData` and the echoed `suspendPayload`).
|
|
@@ -771,7 +490,7 @@ export type McpToolExecuteResponse = RouteResponse<'POST /mcp/:serverId/tools/:t
|
|
|
771
490
|
*/
|
|
772
491
|
export type ClientScoreRowData = Omit<ScoreRowData, 'createdAt' | 'updatedAt'> & {
|
|
773
492
|
createdAt: string;
|
|
774
|
-
updatedAt: string;
|
|
493
|
+
updatedAt: string | null;
|
|
775
494
|
};
|
|
776
495
|
/**
|
|
777
496
|
* Response for listing scores (client version with serialized dates)
|
|
@@ -780,40 +499,19 @@ export type ListScoresResponse = {
|
|
|
780
499
|
pagination: PaginationInfo;
|
|
781
500
|
scores: ClientScoreRowData[];
|
|
782
501
|
};
|
|
783
|
-
export
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
export interface ListScoresByScorerIdParams {
|
|
789
|
-
scorerId: string;
|
|
790
|
-
entityId?: string;
|
|
791
|
-
entityType?: string;
|
|
792
|
-
page?: number;
|
|
793
|
-
perPage?: number;
|
|
794
|
-
}
|
|
795
|
-
export interface ListScoresByEntityIdParams {
|
|
796
|
-
entityId: string;
|
|
797
|
-
entityType: string;
|
|
798
|
-
page?: number;
|
|
799
|
-
perPage?: number;
|
|
800
|
-
}
|
|
801
|
-
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'>> & {
|
|
802
507
|
score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>;
|
|
803
|
-
}
|
|
804
|
-
|
|
508
|
+
};
|
|
509
|
+
/** Score records remain opaque in the route schema because their shape is scorer-specific. */
|
|
510
|
+
export type SaveScoreResponse = GeneratedResponse<'POST /scores'> & {
|
|
805
511
|
score: ClientScoreRowData;
|
|
806
|
-
}
|
|
807
|
-
export type GetScorerResponse = MastraScorerEntry & {
|
|
808
|
-
agentIds: string[];
|
|
809
|
-
agentNames: string[];
|
|
810
|
-
workflowIds: string[];
|
|
811
|
-
isRegistered: boolean;
|
|
812
|
-
source: 'code' | 'stored';
|
|
813
512
|
};
|
|
814
|
-
export
|
|
815
|
-
|
|
816
|
-
}
|
|
513
|
+
export type GetScorerResponse = GeneratedResponse<'GET /scores/scorers/:scorerId'>;
|
|
514
|
+
export type GetScorersResponse = GeneratedResponse<'GET /scores/scorers'>;
|
|
817
515
|
export interface TemplateInstallationRequest {
|
|
818
516
|
/** Template repository URL or slug */
|
|
819
517
|
repo: string;
|
|
@@ -861,17 +559,9 @@ export interface MemorySearchResult {
|
|
|
861
559
|
}>;
|
|
862
560
|
};
|
|
863
561
|
}
|
|
864
|
-
export
|
|
865
|
-
step: string | string[];
|
|
866
|
-
inputData?: Record<string, any>;
|
|
867
|
-
resumeData?: Record<string, any>;
|
|
868
|
-
initialState?: Record<string, any>;
|
|
869
|
-
context?: TimeTravelContext<any, any, any, any>;
|
|
870
|
-
nestedStepsContext?: Record<string, TimeTravelContext<any, any, any, any>>;
|
|
562
|
+
export type TimeTravelParams = Omit<Body<'POST /workflows/:workflowId/time-travel'>, 'requestContext'> & {
|
|
871
563
|
requestContext?: RequestContext | Record<string, any>;
|
|
872
|
-
|
|
873
|
-
perStep?: boolean;
|
|
874
|
-
}
|
|
564
|
+
};
|
|
875
565
|
/**
|
|
876
566
|
* Semantic recall configuration for vector-based memory retrieval
|
|
877
567
|
*/
|
|
@@ -1090,17 +780,9 @@ export interface StoredAgentSkillConfig {
|
|
|
1090
780
|
/** Resolution strategy: 'latest' = latest published version, 'live' = read from filesystem */
|
|
1091
781
|
strategy?: 'latest' | 'live';
|
|
1092
782
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
*/
|
|
1097
|
-
export type StoredWorkspaceRef = {
|
|
1098
|
-
type: 'id';
|
|
1099
|
-
workspaceId: string;
|
|
1100
|
-
} | {
|
|
1101
|
-
type: 'inline';
|
|
1102
|
-
config: Record<string, unknown>;
|
|
1103
|
-
};
|
|
783
|
+
export type StoredWorkspaceRef = Extract<NonNullable<GeneratedRequest<Body<'POST /stored/agents'>>['workspace']>, {
|
|
784
|
+
type: 'id' | 'inline' | 'provider';
|
|
785
|
+
}>;
|
|
1104
786
|
export interface StoredBrowserConfig {
|
|
1105
787
|
provider: string;
|
|
1106
788
|
headless?: boolean;
|
|
@@ -1151,67 +833,11 @@ export type StoredAgentDurableConfig = boolean | {
|
|
|
1151
833
|
/**
|
|
1152
834
|
* Stored agent data returned from API
|
|
1153
835
|
*/
|
|
1154
|
-
export
|
|
1155
|
-
id: string;
|
|
1156
|
-
status: string;
|
|
1157
|
-
activeVersionId?: string;
|
|
1158
|
-
authorId?: string;
|
|
1159
|
-
author?: ResolvedAuthor;
|
|
1160
|
-
visibility?: 'private' | 'public';
|
|
1161
|
-
metadata?: Record<string, unknown>;
|
|
1162
|
-
createdAt: string;
|
|
1163
|
-
updatedAt: string;
|
|
1164
|
-
name: string;
|
|
1165
|
-
description?: string;
|
|
1166
|
-
instructions: string | AgentInstructionBlock[];
|
|
1167
|
-
model: ConditionalField<{
|
|
1168
|
-
provider: string;
|
|
1169
|
-
name: string;
|
|
1170
|
-
[key: string]: unknown;
|
|
1171
|
-
}>;
|
|
1172
|
-
tools?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1173
|
-
defaultOptions?: ConditionalField<DefaultOptions>;
|
|
1174
|
-
workflows?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1175
|
-
agents?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1176
|
-
integrationTools?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1177
|
-
toolProviders?: ConditionalField<Record<string, StoredToolProviderConfig>>;
|
|
1178
|
-
mcpClients?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1179
|
-
inputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1180
|
-
outputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1181
|
-
memory?: ConditionalField<SerializedMemoryConfig>;
|
|
1182
|
-
scorers?: ConditionalField<Record<string, StoredAgentScorerConfig>>;
|
|
1183
|
-
skills?: ConditionalField<Record<string, StoredAgentSkillConfig>>;
|
|
1184
|
-
workspace?: ConditionalField<StoredWorkspaceRef>;
|
|
1185
|
-
browser?: ConditionalField<StoredBrowserRef> | boolean | null;
|
|
1186
|
-
requestContextSchema?: Record<string, unknown>;
|
|
1187
|
-
durable?: StoredAgentDurableConfig;
|
|
1188
|
-
isFavorited?: boolean;
|
|
1189
|
-
favoriteCount?: number;
|
|
1190
|
-
}
|
|
836
|
+
export type StoredAgentResponse = GeneratedResponse<'GET /stored/agents/:storedAgentId'>;
|
|
1191
837
|
/**
|
|
1192
838
|
* Parameters for listing stored agents
|
|
1193
839
|
*/
|
|
1194
|
-
export
|
|
1195
|
-
page?: number;
|
|
1196
|
-
perPage?: number;
|
|
1197
|
-
orderBy?: {
|
|
1198
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1199
|
-
direction?: 'ASC' | 'DESC';
|
|
1200
|
-
};
|
|
1201
|
-
status?: 'draft' | 'published' | 'archived';
|
|
1202
|
-
authorId?: string;
|
|
1203
|
-
/**
|
|
1204
|
-
* Restrict the list to public records. Only `'public'` is accepted by the
|
|
1205
|
-
* server filter; private records are surfaced via the default scope-aware
|
|
1206
|
-
* filter (caller's own rows + legacy unowned).
|
|
1207
|
-
*/
|
|
1208
|
-
visibility?: 'public';
|
|
1209
|
-
metadata?: Record<string, unknown>;
|
|
1210
|
-
/** When true, only return agents favorited by the caller (or by `pinFavoritedFor`). */
|
|
1211
|
-
favoritedOnly?: boolean;
|
|
1212
|
-
/** When set, sort favorited-first for this user id. Required for `favoritedOnly`. */
|
|
1213
|
-
pinFavoritedFor?: string;
|
|
1214
|
-
}
|
|
840
|
+
export type ListStoredAgentsParams = GeneratedRequest<QueryParams<'GET /stored/agents'>>;
|
|
1215
841
|
/**
|
|
1216
842
|
* Response from favorite / unfavorite mutations.
|
|
1217
843
|
*/
|
|
@@ -1222,13 +848,7 @@ export interface FavoriteToggleResponse {
|
|
|
1222
848
|
/**
|
|
1223
849
|
* Response for listing stored agents
|
|
1224
850
|
*/
|
|
1225
|
-
export
|
|
1226
|
-
agents: StoredAgentResponse[];
|
|
1227
|
-
total: number;
|
|
1228
|
-
page: number;
|
|
1229
|
-
perPage: number | false;
|
|
1230
|
-
hasMore: boolean;
|
|
1231
|
-
}
|
|
851
|
+
export type ListStoredAgentsResponse = GeneratedResponse<'GET /stored/agents'>;
|
|
1232
852
|
/**
|
|
1233
853
|
* Parameters for cloning an agent to a stored agent
|
|
1234
854
|
*/
|
|
@@ -1250,51 +870,7 @@ export interface CloneAgentParams {
|
|
|
1250
870
|
* Parameters for creating a stored agent.
|
|
1251
871
|
* Flat union of agent-record fields and config fields.
|
|
1252
872
|
*/
|
|
1253
|
-
export
|
|
1254
|
-
/** Unique identifier for the agent. If not provided, derived from name via slugify. */
|
|
1255
|
-
id?: string;
|
|
1256
|
-
authorId?: string;
|
|
1257
|
-
/** Visibility of the agent. Defaults to 'private'. */
|
|
1258
|
-
visibility?: 'private' | 'public';
|
|
1259
|
-
metadata?: Record<string, unknown>;
|
|
1260
|
-
name: string;
|
|
1261
|
-
description?: string;
|
|
1262
|
-
instructions: string | AgentInstructionBlock[];
|
|
1263
|
-
model: ConditionalField<{
|
|
1264
|
-
provider: string;
|
|
1265
|
-
name: string;
|
|
1266
|
-
[key: string]: unknown;
|
|
1267
|
-
}>;
|
|
1268
|
-
tools?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1269
|
-
defaultOptions?: ConditionalField<DefaultOptions>;
|
|
1270
|
-
workflows?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1271
|
-
agents?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1272
|
-
integrationTools?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1273
|
-
toolProviders?: ConditionalField<Record<string, StoredToolProviderConfig>>;
|
|
1274
|
-
mcpClients?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1275
|
-
inputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1276
|
-
outputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1277
|
-
memory?: ConditionalField<SerializedMemoryConfig>;
|
|
1278
|
-
scorers?: ConditionalField<Record<string, StoredAgentScorerConfig>>;
|
|
1279
|
-
skills?: ConditionalField<Record<string, StoredAgentSkillConfig>>;
|
|
1280
|
-
workspace?: ConditionalField<StoredWorkspaceRef>;
|
|
1281
|
-
/** Browser config. `true` = use admin default, `false` = no browser. */
|
|
1282
|
-
browser?: ConditionalField<StoredBrowserRef> | boolean | null;
|
|
1283
|
-
requestContextSchema?: Record<string, unknown>;
|
|
1284
|
-
/**
|
|
1285
|
-
* Run this agent with durable execution once it is hydrated by the server.
|
|
1286
|
-
* Cache and pubsub are inherited from the server's Mastra instance — without
|
|
1287
|
-
* distributed backends durability is process-local.
|
|
1288
|
-
*/
|
|
1289
|
-
durable?: StoredAgentDurableConfig;
|
|
1290
|
-
/**
|
|
1291
|
-
* Publish the initial version so the agent resolves at `status: 'published'`.
|
|
1292
|
-
* Defaults to true when omitted. Pass false to stage the agent as an unpublished
|
|
1293
|
-
* draft — useful when overriding a code-defined agent, whose code definition keeps
|
|
1294
|
-
* serving traffic until the override is published.
|
|
1295
|
-
*/
|
|
1296
|
-
autoPublish?: boolean;
|
|
1297
|
-
}
|
|
873
|
+
export type CreateStoredAgentParams = GeneratedRequest<Body<'POST /stored/agents'>>;
|
|
1298
874
|
/**
|
|
1299
875
|
* Parameters for updating a stored agent
|
|
1300
876
|
*/
|
|
@@ -1304,67 +880,20 @@ export type OpenStoredAgentChangeRequestParams = ExportStoredAgentParams & {
|
|
|
1304
880
|
userName?: string;
|
|
1305
881
|
inspectOnly?: boolean;
|
|
1306
882
|
};
|
|
1307
|
-
export
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
export
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
export interface
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
visibility?: 'private' | 'public';
|
|
1322
|
-
metadata?: Record<string, unknown>;
|
|
1323
|
-
name?: string;
|
|
1324
|
-
description?: string;
|
|
1325
|
-
instructions?: string | AgentInstructionBlock[];
|
|
1326
|
-
model?: ConditionalField<{
|
|
1327
|
-
provider: string;
|
|
1328
|
-
name: string;
|
|
1329
|
-
[key: string]: unknown;
|
|
1330
|
-
}>;
|
|
1331
|
-
tools?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1332
|
-
defaultOptions?: ConditionalField<DefaultOptions>;
|
|
1333
|
-
workflows?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1334
|
-
agents?: ConditionalField<Record<string, StoredAgentToolConfig>>;
|
|
1335
|
-
integrationTools?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1336
|
-
toolProviders?: ConditionalField<Record<string, StoredToolProviderConfig>>;
|
|
1337
|
-
mcpClients?: ConditionalField<Record<string, StoredMCPClientToolsConfig>>;
|
|
1338
|
-
inputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1339
|
-
outputProcessors?: ConditionalField<StoredProcessorGraph>;
|
|
1340
|
-
memory?: ConditionalField<SerializedMemoryConfig>;
|
|
1341
|
-
scorers?: ConditionalField<Record<string, StoredAgentScorerConfig>>;
|
|
1342
|
-
skills?: ConditionalField<Record<string, StoredAgentSkillConfig>>;
|
|
1343
|
-
workspace?: ConditionalField<StoredWorkspaceRef>;
|
|
1344
|
-
/** Browser config. `true` = use admin default, `false` = no browser. */
|
|
1345
|
-
browser?: ConditionalField<StoredBrowserRef> | boolean | null;
|
|
1346
|
-
requestContextSchema?: Record<string, unknown>;
|
|
1347
|
-
/** Run this agent with durable execution once it is hydrated by the server. */
|
|
1348
|
-
durable?: StoredAgentDurableConfig;
|
|
1349
|
-
/** Optional message describing the changes for the auto-created version */
|
|
1350
|
-
changeMessage?: string;
|
|
1351
|
-
/** Immediately activate the auto-created version. Defaults to false when omitted. */
|
|
1352
|
-
autoPublish?: boolean;
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
* Response for deleting a stored agent
|
|
1356
|
-
*/
|
|
1357
|
-
export interface DeleteStoredAgentResponse {
|
|
1358
|
-
success: boolean;
|
|
1359
|
-
message: string;
|
|
1360
|
-
}
|
|
1361
|
-
/**
|
|
1362
|
-
* A single agent that references another agent as a sub-agent. Includes both
|
|
1363
|
-
* public and the caller's own private agents — anything the caller can read.
|
|
1364
|
-
*/
|
|
1365
|
-
export interface StoredAgentDependent {
|
|
1366
|
-
id: string;
|
|
1367
|
-
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;
|
|
1368
897
|
}
|
|
1369
898
|
/**
|
|
1370
899
|
* Response for listing dependents of a stored agent.
|
|
@@ -1372,10 +901,7 @@ export interface StoredAgentDependent {
|
|
|
1372
901
|
* `hiddenCount` aggregates dependents the caller cannot read; it is only
|
|
1373
902
|
* non-zero when the target agent is public.
|
|
1374
903
|
*/
|
|
1375
|
-
export
|
|
1376
|
-
dependents: StoredAgentDependent[];
|
|
1377
|
-
hiddenCount: number;
|
|
1378
|
-
}
|
|
904
|
+
export type StoredAgentDependentsResponse = GeneratedResponse<'GET /stored/agents/:storedAgentId/dependents'>;
|
|
1379
905
|
/**
|
|
1380
906
|
* Sampling configuration for scorers
|
|
1381
907
|
*/
|
|
@@ -1392,105 +918,27 @@ export type StoredScorerType = 'llm-judge' | 'answer-relevancy' | 'answer-simila
|
|
|
1392
918
|
/**
|
|
1393
919
|
* Stored scorer definition data returned from API
|
|
1394
920
|
*/
|
|
1395
|
-
export
|
|
1396
|
-
id: string;
|
|
1397
|
-
status: string;
|
|
1398
|
-
activeVersionId?: string;
|
|
1399
|
-
authorId?: string;
|
|
1400
|
-
metadata?: Record<string, unknown>;
|
|
1401
|
-
createdAt: string;
|
|
1402
|
-
updatedAt: string;
|
|
1403
|
-
name: string;
|
|
1404
|
-
description?: string;
|
|
1405
|
-
type: StoredScorerType;
|
|
1406
|
-
model?: {
|
|
1407
|
-
provider: string;
|
|
1408
|
-
name: string;
|
|
1409
|
-
[key: string]: unknown;
|
|
1410
|
-
};
|
|
1411
|
-
instructions?: string;
|
|
1412
|
-
scoreRange?: {
|
|
1413
|
-
min?: number;
|
|
1414
|
-
max?: number;
|
|
1415
|
-
};
|
|
1416
|
-
presetConfig?: Record<string, unknown>;
|
|
1417
|
-
defaultSampling?: ScorerSamplingConfig;
|
|
1418
|
-
}
|
|
921
|
+
export type StoredScorerResponse = GeneratedResponse<'GET /stored/scorers/:storedScorerId'>;
|
|
1419
922
|
/**
|
|
1420
923
|
* Parameters for listing stored scorer definitions
|
|
1421
924
|
*/
|
|
1422
|
-
export
|
|
1423
|
-
page?: number;
|
|
1424
|
-
perPage?: number;
|
|
1425
|
-
orderBy?: {
|
|
1426
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1427
|
-
direction?: 'ASC' | 'DESC';
|
|
1428
|
-
};
|
|
1429
|
-
authorId?: string;
|
|
1430
|
-
metadata?: Record<string, unknown>;
|
|
1431
|
-
}
|
|
925
|
+
export type ListStoredScorersParams = GeneratedRequest<QueryParams<'GET /stored/scorers'>>;
|
|
1432
926
|
/**
|
|
1433
927
|
* Response for listing stored scorer definitions
|
|
1434
928
|
*/
|
|
1435
|
-
export
|
|
1436
|
-
scorerDefinitions: StoredScorerResponse[];
|
|
1437
|
-
total: number;
|
|
1438
|
-
page: number;
|
|
1439
|
-
perPage: number | false;
|
|
1440
|
-
hasMore: boolean;
|
|
1441
|
-
}
|
|
929
|
+
export type ListStoredScorersResponse = GeneratedResponse<'GET /stored/scorers'>;
|
|
1442
930
|
/**
|
|
1443
931
|
* Parameters for creating a stored scorer definition
|
|
1444
932
|
*/
|
|
1445
|
-
export
|
|
1446
|
-
id?: string;
|
|
1447
|
-
authorId?: string;
|
|
1448
|
-
metadata?: Record<string, unknown>;
|
|
1449
|
-
name: string;
|
|
1450
|
-
description?: string;
|
|
1451
|
-
type: StoredScorerType;
|
|
1452
|
-
model?: {
|
|
1453
|
-
provider: string;
|
|
1454
|
-
name: string;
|
|
1455
|
-
[key: string]: unknown;
|
|
1456
|
-
};
|
|
1457
|
-
instructions?: string;
|
|
1458
|
-
scoreRange?: {
|
|
1459
|
-
min?: number;
|
|
1460
|
-
max?: number;
|
|
1461
|
-
};
|
|
1462
|
-
presetConfig?: Record<string, unknown>;
|
|
1463
|
-
defaultSampling?: ScorerSamplingConfig;
|
|
1464
|
-
}
|
|
933
|
+
export type CreateStoredScorerParams = GeneratedRequest<Body<'POST /stored/scorers'>>;
|
|
1465
934
|
/**
|
|
1466
935
|
* Parameters for updating a stored scorer definition
|
|
1467
936
|
*/
|
|
1468
|
-
export
|
|
1469
|
-
authorId?: string;
|
|
1470
|
-
metadata?: Record<string, unknown>;
|
|
1471
|
-
name?: string;
|
|
1472
|
-
description?: string;
|
|
1473
|
-
type?: StoredScorerType;
|
|
1474
|
-
model?: {
|
|
1475
|
-
provider: string;
|
|
1476
|
-
name: string;
|
|
1477
|
-
[key: string]: unknown;
|
|
1478
|
-
};
|
|
1479
|
-
instructions?: string;
|
|
1480
|
-
scoreRange?: {
|
|
1481
|
-
min?: number;
|
|
1482
|
-
max?: number;
|
|
1483
|
-
};
|
|
1484
|
-
presetConfig?: Record<string, unknown>;
|
|
1485
|
-
defaultSampling?: ScorerSamplingConfig;
|
|
1486
|
-
}
|
|
937
|
+
export type UpdateStoredScorerParams = GeneratedRequest<Body<'PATCH /stored/scorers/:storedScorerId'>>;
|
|
1487
938
|
/**
|
|
1488
939
|
* Response for deleting a stored scorer definition
|
|
1489
940
|
*/
|
|
1490
|
-
export
|
|
1491
|
-
success: boolean;
|
|
1492
|
-
message: string;
|
|
1493
|
-
}
|
|
941
|
+
export type DeleteStoredScorerResponse = GeneratedResponse<'DELETE /stored/scorers/:storedScorerId'>;
|
|
1494
942
|
/**
|
|
1495
943
|
* MCP server transport configuration
|
|
1496
944
|
*/
|
|
@@ -1505,69 +953,27 @@ export interface StoredMCPServerConfig {
|
|
|
1505
953
|
/**
|
|
1506
954
|
* Stored MCP client data returned from API
|
|
1507
955
|
*/
|
|
1508
|
-
export
|
|
1509
|
-
id: string;
|
|
1510
|
-
status: string;
|
|
1511
|
-
activeVersionId?: string;
|
|
1512
|
-
authorId?: string;
|
|
1513
|
-
metadata?: Record<string, unknown>;
|
|
1514
|
-
createdAt: string;
|
|
1515
|
-
updatedAt: string;
|
|
1516
|
-
name: string;
|
|
1517
|
-
description?: string;
|
|
1518
|
-
servers: Record<string, StoredMCPServerConfig>;
|
|
1519
|
-
}
|
|
956
|
+
export type StoredMCPClientResponse = GeneratedResponse<'GET /stored/mcp-clients/:storedMCPClientId'>;
|
|
1520
957
|
/**
|
|
1521
958
|
* Parameters for listing stored MCP clients
|
|
1522
959
|
*/
|
|
1523
|
-
export
|
|
1524
|
-
page?: number;
|
|
1525
|
-
perPage?: number;
|
|
1526
|
-
orderBy?: {
|
|
1527
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1528
|
-
direction?: 'ASC' | 'DESC';
|
|
1529
|
-
};
|
|
1530
|
-
authorId?: string;
|
|
1531
|
-
metadata?: Record<string, unknown>;
|
|
1532
|
-
}
|
|
960
|
+
export type ListStoredMCPClientsParams = GeneratedRequest<QueryParams<'GET /stored/mcp-clients'>>;
|
|
1533
961
|
/**
|
|
1534
962
|
* Response for listing stored MCP clients
|
|
1535
963
|
*/
|
|
1536
|
-
export
|
|
1537
|
-
mcpClients: StoredMCPClientResponse[];
|
|
1538
|
-
total: number;
|
|
1539
|
-
page: number;
|
|
1540
|
-
perPage: number | false;
|
|
1541
|
-
hasMore: boolean;
|
|
1542
|
-
}
|
|
964
|
+
export type ListStoredMCPClientsResponse = GeneratedResponse<'GET /stored/mcp-clients'>;
|
|
1543
965
|
/**
|
|
1544
966
|
* Parameters for creating a stored MCP client
|
|
1545
967
|
*/
|
|
1546
|
-
export
|
|
1547
|
-
id?: string;
|
|
1548
|
-
authorId?: string;
|
|
1549
|
-
metadata?: Record<string, unknown>;
|
|
1550
|
-
name: string;
|
|
1551
|
-
description?: string;
|
|
1552
|
-
servers: Record<string, StoredMCPServerConfig>;
|
|
1553
|
-
}
|
|
968
|
+
export type CreateStoredMCPClientParams = GeneratedRequest<Body<'POST /stored/mcp-clients'>>;
|
|
1554
969
|
/**
|
|
1555
970
|
* Parameters for updating a stored MCP client
|
|
1556
971
|
*/
|
|
1557
|
-
export
|
|
1558
|
-
authorId?: string;
|
|
1559
|
-
metadata?: Record<string, unknown>;
|
|
1560
|
-
name?: string;
|
|
1561
|
-
description?: string;
|
|
1562
|
-
servers?: Record<string, StoredMCPServerConfig>;
|
|
1563
|
-
}
|
|
972
|
+
export type UpdateStoredMCPClientParams = GeneratedRequest<Body<'PATCH /stored/mcp-clients/:storedMCPClientId'>>;
|
|
1564
973
|
/**
|
|
1565
974
|
* Response for deleting a stored MCP client
|
|
1566
975
|
*/
|
|
1567
|
-
export
|
|
1568
|
-
success: boolean;
|
|
1569
|
-
message: string;
|
|
1570
|
-
}
|
|
976
|
+
export type DeleteStoredMCPClientResponse = GeneratedResponse<'DELETE /stored/mcp-clients/:storedMCPClientId'>;
|
|
1571
977
|
export interface AgentVersionResponse {
|
|
1572
978
|
id: string;
|
|
1573
979
|
agentId: string;
|
|
@@ -1704,14 +1110,8 @@ export interface CompareScorerVersionsResponse {
|
|
|
1704
1110
|
diffs: VersionDiff[];
|
|
1705
1111
|
}
|
|
1706
1112
|
export type ListAgentsModelProvidersResponse = GeneratedResponse<'GET /agents/providers'>;
|
|
1707
|
-
export
|
|
1708
|
-
|
|
1709
|
-
name: string;
|
|
1710
|
-
envVar: string | string[];
|
|
1711
|
-
connected: boolean;
|
|
1712
|
-
docUrl?: string;
|
|
1713
|
-
models: string[];
|
|
1714
|
-
}
|
|
1113
|
+
export type GetAgentBuilderActionsResponse = GeneratedResponse<'GET /agent-builder'>;
|
|
1114
|
+
export type Provider = ListAgentsModelProvidersResponse['providers'][number];
|
|
1715
1115
|
export interface MastraPackage {
|
|
1716
1116
|
name: string;
|
|
1717
1117
|
version: string;
|
|
@@ -1905,92 +1305,27 @@ export interface StoredSkillFileNode {
|
|
|
1905
1305
|
/**
|
|
1906
1306
|
* Stored skill data returned from API
|
|
1907
1307
|
*/
|
|
1908
|
-
export
|
|
1909
|
-
id: string;
|
|
1910
|
-
status: string;
|
|
1911
|
-
authorId?: string;
|
|
1912
|
-
visibility?: 'private' | 'public';
|
|
1913
|
-
metadata?: Record<string, unknown>;
|
|
1914
|
-
createdAt: string;
|
|
1915
|
-
updatedAt: string;
|
|
1916
|
-
name: string;
|
|
1917
|
-
description?: string;
|
|
1918
|
-
instructions: string;
|
|
1919
|
-
license?: string;
|
|
1920
|
-
files?: StoredSkillFileNode[];
|
|
1921
|
-
isFavorited?: boolean;
|
|
1922
|
-
favoriteCount?: number;
|
|
1923
|
-
}
|
|
1308
|
+
export type StoredSkillResponse = GeneratedResponse<'GET /stored/skills/:storedSkillId'>;
|
|
1924
1309
|
/**
|
|
1925
1310
|
* Parameters for listing stored skills
|
|
1926
1311
|
*/
|
|
1927
|
-
export
|
|
1928
|
-
page?: number;
|
|
1929
|
-
perPage?: number;
|
|
1930
|
-
orderBy?: {
|
|
1931
|
-
field?: 'createdAt' | 'updatedAt';
|
|
1932
|
-
direction?: 'ASC' | 'DESC';
|
|
1933
|
-
};
|
|
1934
|
-
authorId?: string;
|
|
1935
|
-
/**
|
|
1936
|
-
* Restrict the list to public records. Only `'public'` is accepted by the
|
|
1937
|
-
* server filter; private records are surfaced via the default scope-aware
|
|
1938
|
-
* filter (caller's own rows + legacy unowned).
|
|
1939
|
-
*/
|
|
1940
|
-
visibility?: 'public';
|
|
1941
|
-
metadata?: Record<string, unknown>;
|
|
1942
|
-
/** When true, only return skills favorited by the caller (or by `pinFavoritedFor`). */
|
|
1943
|
-
favoritedOnly?: boolean;
|
|
1944
|
-
/** When set, sort favorited-first for this user id. Required for `favoritedOnly`. */
|
|
1945
|
-
pinFavoritedFor?: string;
|
|
1946
|
-
}
|
|
1312
|
+
export type ListStoredSkillsParams = GeneratedRequest<QueryParams<'GET /stored/skills'>>;
|
|
1947
1313
|
/**
|
|
1948
1314
|
* Response for listing stored skills
|
|
1949
1315
|
*/
|
|
1950
|
-
export
|
|
1951
|
-
skills: StoredSkillResponse[];
|
|
1952
|
-
total: number;
|
|
1953
|
-
page: number;
|
|
1954
|
-
perPage: number | false;
|
|
1955
|
-
hasMore: boolean;
|
|
1956
|
-
}
|
|
1316
|
+
export type ListStoredSkillsResponse = GeneratedResponse<'GET /stored/skills'>;
|
|
1957
1317
|
/**
|
|
1958
1318
|
* Parameters for creating a stored skill
|
|
1959
1319
|
*/
|
|
1960
|
-
export
|
|
1961
|
-
id?: string;
|
|
1962
|
-
authorId?: string;
|
|
1963
|
-
/** Visibility of the skill. Defaults to 'private'. */
|
|
1964
|
-
visibility?: 'private' | 'public';
|
|
1965
|
-
metadata?: Record<string, unknown>;
|
|
1966
|
-
name: string;
|
|
1967
|
-
/** Required by the server: description of what the skill does and when to use it. */
|
|
1968
|
-
description: string;
|
|
1969
|
-
instructions: string;
|
|
1970
|
-
license?: string;
|
|
1971
|
-
files?: StoredSkillFileNode[];
|
|
1972
|
-
}
|
|
1320
|
+
export type CreateStoredSkillParams = GeneratedRequest<Body<'POST /stored/skills'>>;
|
|
1973
1321
|
/**
|
|
1974
1322
|
* Parameters for updating a stored skill
|
|
1975
1323
|
*/
|
|
1976
|
-
export
|
|
1977
|
-
authorId?: string;
|
|
1978
|
-
/** Visibility of the skill. */
|
|
1979
|
-
visibility?: 'private' | 'public';
|
|
1980
|
-
metadata?: Record<string, unknown>;
|
|
1981
|
-
name?: string;
|
|
1982
|
-
description?: string;
|
|
1983
|
-
instructions?: string;
|
|
1984
|
-
license?: string;
|
|
1985
|
-
files?: StoredSkillFileNode[];
|
|
1986
|
-
}
|
|
1324
|
+
export type UpdateStoredSkillParams = GeneratedRequest<Body<'PATCH /stored/skills/:storedSkillId'>>;
|
|
1987
1325
|
/**
|
|
1988
1326
|
* Response for deleting a stored skill
|
|
1989
1327
|
*/
|
|
1990
|
-
export
|
|
1991
|
-
success: boolean;
|
|
1992
|
-
message: string;
|
|
1993
|
-
}
|
|
1328
|
+
export type DeleteStoredSkillResponse = GeneratedResponse<'DELETE /stored/skills/:storedSkillId'>;
|
|
1994
1329
|
/**
|
|
1995
1330
|
* Filesystem configuration in a stored workspace
|
|
1996
1331
|
*/
|
|
@@ -2009,120 +1344,29 @@ export interface StoredSandboxConfig {
|
|
|
2009
1344
|
/**
|
|
2010
1345
|
* Stored workspace data returned from API
|
|
2011
1346
|
*/
|
|
2012
|
-
export
|
|
2013
|
-
id: string;
|
|
2014
|
-
status: string;
|
|
2015
|
-
activeVersionId?: string;
|
|
2016
|
-
authorId?: string;
|
|
2017
|
-
metadata?: Record<string, unknown>;
|
|
2018
|
-
createdAt: string;
|
|
2019
|
-
updatedAt: string;
|
|
2020
|
-
name: string;
|
|
2021
|
-
description?: string;
|
|
2022
|
-
filesystem?: StoredFilesystemConfig;
|
|
2023
|
-
sandbox?: StoredSandboxConfig;
|
|
2024
|
-
mounts?: Record<string, StoredFilesystemConfig>;
|
|
2025
|
-
skills?: string[];
|
|
2026
|
-
tools?: {
|
|
2027
|
-
enabled?: boolean;
|
|
2028
|
-
requireApproval?: boolean;
|
|
2029
|
-
tools?: Record<string, {
|
|
2030
|
-
enabled?: boolean;
|
|
2031
|
-
requireApproval?: boolean;
|
|
2032
|
-
}>;
|
|
2033
|
-
};
|
|
2034
|
-
autoSync?: boolean;
|
|
2035
|
-
operationTimeout?: number;
|
|
2036
|
-
/** Whether this workspace is registered at runtime (only present in list responses) */
|
|
2037
|
-
runtimeRegistered?: boolean;
|
|
2038
|
-
}
|
|
1347
|
+
export type StoredWorkspaceResponse = GeneratedResponse<'GET /stored/workspaces/:storedWorkspaceId'>;
|
|
2039
1348
|
/**
|
|
2040
1349
|
* Parameters for listing stored workspaces
|
|
2041
1350
|
*/
|
|
2042
|
-
export
|
|
2043
|
-
page?: number;
|
|
2044
|
-
perPage?: number;
|
|
2045
|
-
orderBy?: {
|
|
2046
|
-
field?: 'createdAt' | 'updatedAt';
|
|
2047
|
-
direction?: 'ASC' | 'DESC';
|
|
2048
|
-
};
|
|
2049
|
-
authorId?: string;
|
|
2050
|
-
metadata?: Record<string, unknown>;
|
|
2051
|
-
}
|
|
1351
|
+
export type ListStoredWorkspacesParams = GeneratedRequest<QueryParams<'GET /stored/workspaces'>>;
|
|
2052
1352
|
/**
|
|
2053
1353
|
* Response for listing stored workspaces
|
|
2054
1354
|
*/
|
|
2055
|
-
export
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
/**
|
|
2063
|
-
|
|
2064
|
-
*/
|
|
2065
|
-
export type
|
|
2066
|
-
/**
|
|
2067
|
-
|
|
2068
|
-
*/
|
|
2069
|
-
export
|
|
2070
|
-
agentId: string;
|
|
2071
|
-
agentName: string;
|
|
2072
|
-
type: 'input' | 'output';
|
|
2073
|
-
}
|
|
2074
|
-
/**
|
|
2075
|
-
* Processor in list response
|
|
2076
|
-
*/
|
|
2077
|
-
export interface GetProcessorResponse {
|
|
2078
|
-
id: string;
|
|
2079
|
-
name?: string;
|
|
2080
|
-
description?: string;
|
|
2081
|
-
phases: ProcessorPhase[];
|
|
2082
|
-
agentIds: string[];
|
|
2083
|
-
isWorkflow: boolean;
|
|
2084
|
-
}
|
|
2085
|
-
/**
|
|
2086
|
-
* Detailed processor response
|
|
2087
|
-
*/
|
|
2088
|
-
export interface GetProcessorDetailResponse {
|
|
2089
|
-
id: string;
|
|
2090
|
-
name?: string;
|
|
2091
|
-
description?: string;
|
|
2092
|
-
phases: ProcessorPhase[];
|
|
2093
|
-
configurations: ProcessorConfiguration[];
|
|
2094
|
-
isWorkflow: boolean;
|
|
2095
|
-
}
|
|
2096
|
-
/**
|
|
2097
|
-
* Parameters for executing a processor
|
|
2098
|
-
*/
|
|
2099
|
-
export interface ExecuteProcessorParams {
|
|
2100
|
-
phase: ProcessorPhase;
|
|
2101
|
-
messages: MastraDBMessage[];
|
|
2102
|
-
agentId?: string;
|
|
2103
|
-
requestContext?: RequestContext | Record<string, any>;
|
|
2104
|
-
}
|
|
2105
|
-
/**
|
|
2106
|
-
* Tripwire result from processor execution
|
|
2107
|
-
*/
|
|
2108
|
-
export interface ProcessorTripwireResult {
|
|
2109
|
-
triggered: boolean;
|
|
2110
|
-
reason?: string;
|
|
2111
|
-
metadata?: unknown;
|
|
2112
|
-
}
|
|
2113
|
-
/**
|
|
2114
|
-
* Response from processor execution
|
|
2115
|
-
*/
|
|
2116
|
-
export interface ExecuteProcessorResponse {
|
|
2117
|
-
success: boolean;
|
|
2118
|
-
phase: string;
|
|
2119
|
-
messages?: MastraDBMessage[];
|
|
2120
|
-
messageList?: {
|
|
2121
|
-
messages: MastraDBMessage[];
|
|
2122
|
-
};
|
|
2123
|
-
tripwire?: ProcessorTripwireResult;
|
|
2124
|
-
error?: string;
|
|
2125
|
-
}
|
|
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'>;
|
|
2126
1370
|
/**
|
|
2127
1371
|
* Parameters for getting observational memory
|
|
2128
1372
|
*/
|
|
@@ -2264,59 +1508,10 @@ export interface DatasetItemToolMock {
|
|
|
2264
1508
|
matchArgs?: 'strict' | 'ignore';
|
|
2265
1509
|
}
|
|
2266
1510
|
/** Diagnostic receipt for item-level tool mocks, returned on experiment results. */
|
|
2267
|
-
export
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
args: unknown;
|
|
2272
|
-
}>;
|
|
2273
|
-
unconsumed: Array<{
|
|
2274
|
-
mockIndex: number;
|
|
2275
|
-
toolName: string;
|
|
2276
|
-
args: unknown;
|
|
2277
|
-
}>;
|
|
2278
|
-
liveCalls: Array<{
|
|
2279
|
-
toolName: string;
|
|
2280
|
-
args: unknown;
|
|
2281
|
-
}>;
|
|
2282
|
-
failure?: {
|
|
2283
|
-
code: 'TOOL_MOCK_MISMATCH' | 'TOOL_MOCK_EXHAUSTED';
|
|
2284
|
-
toolName: string;
|
|
2285
|
-
args: unknown;
|
|
2286
|
-
};
|
|
2287
|
-
}
|
|
2288
|
-
export interface DatasetItem {
|
|
2289
|
-
id: string;
|
|
2290
|
-
datasetId: string;
|
|
2291
|
-
datasetVersion: number;
|
|
2292
|
-
externalId?: string | null;
|
|
2293
|
-
input: unknown;
|
|
2294
|
-
groundTruth?: unknown;
|
|
2295
|
-
expectedTrajectory?: unknown;
|
|
2296
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2297
|
-
scorerIds?: string[];
|
|
2298
|
-
requestContext?: Record<string, unknown>;
|
|
2299
|
-
metadata?: unknown;
|
|
2300
|
-
source?: DatasetItemSource;
|
|
2301
|
-
createdAt: string | Date;
|
|
2302
|
-
updatedAt: string | Date;
|
|
2303
|
-
}
|
|
2304
|
-
export interface DatasetRecord {
|
|
2305
|
-
id: string;
|
|
2306
|
-
name: string;
|
|
2307
|
-
description?: string | null;
|
|
2308
|
-
metadata?: Record<string, unknown> | null;
|
|
2309
|
-
inputSchema?: Record<string, unknown>;
|
|
2310
|
-
groundTruthSchema?: Record<string, unknown>;
|
|
2311
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2312
|
-
tags?: string[] | null;
|
|
2313
|
-
targetType?: string | null;
|
|
2314
|
-
targetIds?: string[] | null;
|
|
2315
|
-
scorerIds?: string[] | null;
|
|
2316
|
-
version: number;
|
|
2317
|
-
createdAt: string | Date;
|
|
2318
|
-
updatedAt: string | Date;
|
|
2319
|
-
}
|
|
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']>;
|
|
2320
1515
|
export interface ExperimentProvenance {
|
|
2321
1516
|
source?: string;
|
|
2322
1517
|
sourceId?: string;
|
|
@@ -2334,80 +1529,13 @@ export interface ExperimentGrouping {
|
|
|
2334
1529
|
variantId?: string;
|
|
2335
1530
|
trialIndex?: number;
|
|
2336
1531
|
}
|
|
2337
|
-
export type
|
|
2338
|
-
export
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
/** Only return experiments run against targets of this type */
|
|
2342
|
-
targetType?: ExperimentTargetType;
|
|
2343
|
-
/** Only return experiments run against this target ID */
|
|
2344
|
-
targetId?: string;
|
|
2345
|
-
}
|
|
2346
|
-
export interface ListDatasetsParams {
|
|
2347
|
-
page?: number;
|
|
2348
|
-
perPage?: number;
|
|
2349
|
-
/** Only return datasets attached to targets of this type */
|
|
2350
|
-
targetType?: ExperimentTargetType;
|
|
2351
|
-
/** Only return datasets attached to at least one of these target IDs */
|
|
2352
|
-
targetIds?: string[];
|
|
2353
|
-
}
|
|
2354
|
-
export interface DatasetExperiment {
|
|
2355
|
-
id: string;
|
|
2356
|
-
datasetId: string | null;
|
|
2357
|
-
datasetVersion: number | null;
|
|
2358
|
-
agentVersion: string | null;
|
|
2359
|
-
/** `null` for caller-driven ingestion experiments (the caller executes items itself). */
|
|
2360
|
-
targetType: 'agent' | 'workflow' | 'scorer' | 'processor' | null;
|
|
2361
|
-
targetId: string | null;
|
|
2362
|
-
/** Run-level scorer IDs pinned at create time for caller-driven experiments. */
|
|
2363
|
-
scorerIds?: string[] | null;
|
|
2364
|
-
/** Human-readable name used as the primary label wherever the experiment is displayed. */
|
|
2365
|
-
name?: string;
|
|
2366
|
-
/** Longer description shown as secondary detail (e.g. in a tooltip). */
|
|
2367
|
-
description?: string;
|
|
2368
|
-
provenance: ExperimentProvenance | null;
|
|
2369
|
-
runnerAttestation: ExperimentRunnerAttestation | null;
|
|
2370
|
-
experimentSetId: string | null;
|
|
2371
|
-
comparisonId: string | null;
|
|
2372
|
-
variantId: string | null;
|
|
2373
|
-
trialIndex: number | null;
|
|
2374
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
2375
|
-
totalItems: number;
|
|
2376
|
-
succeededCount: number;
|
|
2377
|
-
failedCount: number;
|
|
2378
|
-
skippedCount: number;
|
|
2379
|
-
startedAt: string | Date | null;
|
|
2380
|
-
completedAt: string | Date | null;
|
|
2381
|
-
createdAt: string | Date;
|
|
2382
|
-
updatedAt: string | Date;
|
|
2383
|
-
}
|
|
2384
|
-
export interface DatasetExperimentResult {
|
|
2385
|
-
id: string;
|
|
2386
|
-
experimentId: string;
|
|
2387
|
-
itemId: string;
|
|
2388
|
-
itemDatasetVersion: number | null;
|
|
2389
|
-
input: unknown;
|
|
2390
|
-
output: unknown | null;
|
|
2391
|
-
groundTruth: unknown | null;
|
|
2392
|
-
metadata?: Record<string, unknown> | null;
|
|
2393
|
-
/** Structured failure info, as persisted by the experiment runner. */
|
|
2394
|
-
error: {
|
|
2395
|
-
message: string;
|
|
2396
|
-
stack?: string;
|
|
2397
|
-
code?: string;
|
|
2398
|
-
} | null;
|
|
2399
|
-
startedAt: string | Date;
|
|
2400
|
-
completedAt: string | Date;
|
|
2401
|
-
retryCount: number;
|
|
2402
|
-
attempt?: number;
|
|
2403
|
-
traceId: string | null;
|
|
2404
|
-
status: 'needs-review' | 'reviewed' | 'complete' | null;
|
|
2405
|
-
tags: string[] | null;
|
|
2406
|
-
comment?: string | null;
|
|
2407
|
-
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] & {
|
|
2408
1536
|
/**
|
|
2409
|
-
* Aggregated scorer runs
|
|
2410
|
-
*
|
|
1537
|
+
* Aggregated scorer runs are a client convenience: score records are fetched
|
|
1538
|
+
* from the scores store rather than embedded in the route response.
|
|
2411
1539
|
*/
|
|
2412
1540
|
scores?: Array<{
|
|
2413
1541
|
scorerId: string;
|
|
@@ -2416,318 +1544,61 @@ export interface DatasetExperimentResult {
|
|
|
2416
1544
|
reason: string | null;
|
|
2417
1545
|
error: string | null;
|
|
2418
1546
|
}>;
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
export
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
export
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
groundTruthSchema?: Record<string, unknown> | null;
|
|
2435
|
-
requestContextSchema?: Record<string, unknown> | null;
|
|
2436
|
-
targetType?: string;
|
|
2437
|
-
targetIds?: string[];
|
|
2438
|
-
scorerIds?: string[];
|
|
2439
|
-
}
|
|
2440
|
-
export interface UpdateDatasetParams {
|
|
2441
|
-
datasetId: string;
|
|
2442
|
-
name?: string;
|
|
2443
|
-
description?: string;
|
|
2444
|
-
metadata?: Record<string, unknown>;
|
|
2445
|
-
inputSchema?: Record<string, unknown> | null;
|
|
2446
|
-
groundTruthSchema?: Record<string, unknown> | null;
|
|
2447
|
-
requestContextSchema?: Record<string, unknown> | null;
|
|
2448
|
-
tags?: string[];
|
|
2449
|
-
targetType?: string;
|
|
2450
|
-
targetIds?: string[];
|
|
2451
|
-
scorerIds?: string[] | null;
|
|
2452
|
-
/** Restrict the lookup to a specific tenant organization. */
|
|
2453
|
-
organizationId?: string;
|
|
2454
|
-
/** Restrict the lookup to a specific tenant project. */
|
|
2455
|
-
projectId?: string;
|
|
2456
|
-
}
|
|
2457
|
-
export interface AddDatasetItemParams {
|
|
2458
|
-
datasetId: string;
|
|
2459
|
-
externalId?: string;
|
|
2460
|
-
input: unknown;
|
|
2461
|
-
groundTruth?: unknown;
|
|
2462
|
-
expectedTrajectory?: unknown;
|
|
2463
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2464
|
-
scorerIds?: string[];
|
|
2465
|
-
requestContext?: Record<string, unknown>;
|
|
2466
|
-
metadata?: Record<string, unknown>;
|
|
2467
|
-
source?: DatasetItemSource;
|
|
2468
|
-
}
|
|
2469
|
-
export interface UpdateDatasetItemParams {
|
|
2470
|
-
datasetId: string;
|
|
2471
|
-
itemId: string;
|
|
2472
|
-
input?: unknown;
|
|
2473
|
-
groundTruth?: unknown;
|
|
2474
|
-
expectedTrajectory?: unknown;
|
|
2475
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2476
|
-
scorerIds?: string[] | null;
|
|
2477
|
-
requestContext?: Record<string, unknown>;
|
|
2478
|
-
metadata?: Record<string, unknown>;
|
|
2479
|
-
source?: DatasetItemSource;
|
|
2480
|
-
}
|
|
2481
|
-
export interface BatchInsertDatasetItemsParams {
|
|
2482
|
-
datasetId: string;
|
|
2483
|
-
items: Array<{
|
|
2484
|
-
externalId?: string;
|
|
2485
|
-
input: unknown;
|
|
2486
|
-
groundTruth?: unknown;
|
|
2487
|
-
expectedTrajectory?: unknown;
|
|
2488
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2489
|
-
scorerIds?: string[];
|
|
2490
|
-
requestContext?: Record<string, unknown>;
|
|
2491
|
-
metadata?: Record<string, unknown>;
|
|
2492
|
-
source?: DatasetItemSource;
|
|
2493
|
-
}>;
|
|
2494
|
-
}
|
|
2495
|
-
export interface BatchDeleteDatasetItemsParams {
|
|
2496
|
-
datasetId: string;
|
|
2497
|
-
itemIds: string[];
|
|
2498
|
-
}
|
|
2499
|
-
export interface GenerateDatasetItemsParams {
|
|
2500
|
-
datasetId: string;
|
|
2501
|
-
modelId: string;
|
|
2502
|
-
prompt: string;
|
|
2503
|
-
count?: number;
|
|
2504
|
-
agentContext?: {
|
|
2505
|
-
description?: string;
|
|
2506
|
-
instructions?: string;
|
|
2507
|
-
tools?: string[];
|
|
2508
|
-
};
|
|
2509
|
-
}
|
|
2510
|
-
export interface GeneratedItem {
|
|
2511
|
-
input: unknown;
|
|
2512
|
-
groundTruth?: unknown;
|
|
2513
|
-
}
|
|
2514
|
-
export interface UpdateDatasetExperimentParams {
|
|
2515
|
-
datasetId: string;
|
|
2516
|
-
experimentId: string;
|
|
2517
|
-
name?: string;
|
|
2518
|
-
description?: string;
|
|
2519
|
-
metadata?: Record<string, unknown>;
|
|
2520
|
-
}
|
|
2521
|
-
export interface TriggerDatasetExperimentParams {
|
|
2522
|
-
datasetId: string;
|
|
2523
|
-
targetType: 'agent' | 'workflow' | 'scorer';
|
|
2524
|
-
targetId: string;
|
|
2525
|
-
name?: string;
|
|
2526
|
-
description?: string;
|
|
2527
|
-
metadata?: Record<string, unknown>;
|
|
2528
|
-
scorerIds?: string[];
|
|
2529
|
-
version?: number;
|
|
2530
|
-
agentVersion?: string;
|
|
2531
|
-
maxConcurrency?: number;
|
|
2532
|
-
provenance?: ExperimentProvenance;
|
|
2533
|
-
grouping?: ExperimentGrouping;
|
|
2534
|
-
requestContext?: Record<string, unknown>;
|
|
2535
|
-
}
|
|
2536
|
-
export interface CreateDatasetExperimentParams {
|
|
2537
|
-
datasetId: string;
|
|
2538
|
-
/** Caller-supplied experiment id (e.g. a workflow run id) for idempotent creates. */
|
|
2539
|
-
id?: string;
|
|
2540
|
-
/** Target executed per item via `runExperimentItem`. Both or neither of targetType/targetId. Omit for pure ingestion. */
|
|
2541
|
-
targetType?: 'agent' | 'workflow' | 'scorer';
|
|
2542
|
-
targetId?: string;
|
|
2543
|
-
/** Run-level scorer IDs resolved server-side by `runExperimentItem`. Requires a target. */
|
|
2544
|
-
scorerIds?: string[];
|
|
2545
|
-
name?: string;
|
|
2546
|
-
description?: string;
|
|
2547
|
-
metadata?: Record<string, unknown>;
|
|
2548
|
-
/** Pin to a specific dataset version. Defaults to the latest version. */
|
|
2549
|
-
version?: number;
|
|
2550
|
-
provenance?: ExperimentProvenance;
|
|
2551
|
-
grouping?: ExperimentGrouping;
|
|
2552
|
-
}
|
|
2553
|
-
export interface CreateDatasetExperimentResponse {
|
|
2554
|
-
experimentId: string;
|
|
2555
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
2556
|
-
totalItems: number;
|
|
2557
|
-
datasetVersion: number;
|
|
2558
|
-
}
|
|
2559
|
-
export interface RunExperimentItemParams {
|
|
2560
|
-
datasetId: string;
|
|
2561
|
-
experimentId: string;
|
|
2562
|
-
itemId: string;
|
|
2563
|
-
/** Zero-based repetition index. Defaults to 0. Retried calls with the same (experimentId, itemId, attempt) converge on one row. */
|
|
2564
|
-
attempt?: number;
|
|
2565
|
-
/** Request context merged with the item's own request context (item wins). */
|
|
2566
|
-
requestContext?: Record<string, unknown>;
|
|
2567
|
-
}
|
|
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'>>>;
|
|
2568
1562
|
/**
|
|
2569
1563
|
* A single experiment result row as the server returns it: structured
|
|
2570
1564
|
* `error` object and no aggregated `scores` (scores live in the scores
|
|
2571
1565
|
* store, keyed by `runId = experimentId`).
|
|
2572
1566
|
*/
|
|
1567
|
+
export type ListDatasetExperimentResultsResponse = Omit<GeneratedResponse<'GET /datasets/:datasetId/experiments/:experimentId/results'>, 'results'> & {
|
|
1568
|
+
results: DatasetExperimentResult[];
|
|
1569
|
+
};
|
|
2573
1570
|
export type DatasetExperimentResultRow = Omit<DatasetExperimentResult, 'scores'>;
|
|
2574
|
-
export
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
error: string | null;
|
|
2582
|
-
}>;
|
|
2583
|
-
}
|
|
2584
|
-
export interface SubmitExperimentResultParams {
|
|
2585
|
-
datasetId: string;
|
|
2586
|
-
experimentId: string;
|
|
2587
|
-
itemId: string;
|
|
2588
|
-
/** Zero-based repetition index. Defaults to 0. Retried submissions with the same (experimentId, itemId, attempt) converge on one row. */
|
|
2589
|
-
attempt?: number;
|
|
2590
|
-
input?: unknown;
|
|
2591
|
-
output?: unknown;
|
|
2592
|
-
groundTruth?: unknown;
|
|
2593
|
-
error?: {
|
|
2594
|
-
message: string;
|
|
2595
|
-
stack?: string;
|
|
2596
|
-
code?: string;
|
|
2597
|
-
} | null;
|
|
2598
|
-
startedAt?: Date;
|
|
2599
|
-
completedAt?: Date;
|
|
2600
|
-
traceId?: string;
|
|
2601
|
-
/** Externally computed scores, persisted keyed by runId = experimentId. */
|
|
2602
|
-
scores?: Array<{
|
|
2603
|
-
scorerId: string;
|
|
2604
|
-
scorerName?: string;
|
|
2605
|
-
score: number;
|
|
2606
|
-
reason?: string;
|
|
2607
|
-
metadata?: Record<string, unknown>;
|
|
2608
|
-
}>;
|
|
2609
|
-
}
|
|
2610
|
-
export interface FinalizeExperimentParams {
|
|
2611
|
-
datasetId: string;
|
|
2612
|
-
experimentId: string;
|
|
2613
|
-
}
|
|
2614
|
-
export interface CompareExperimentsParams {
|
|
2615
|
-
datasetId: string;
|
|
2616
|
-
experimentIdA: string;
|
|
2617
|
-
experimentIdB: string;
|
|
2618
|
-
thresholds?: Record<string, {
|
|
2619
|
-
value: number;
|
|
2620
|
-
direction?: 'higher-is-better' | 'lower-is-better';
|
|
2621
|
-
}>;
|
|
2622
|
-
}
|
|
2623
|
-
export interface DatasetItemVersionResponse {
|
|
2624
|
-
id: string;
|
|
2625
|
-
datasetId: string;
|
|
2626
|
-
datasetVersion: number;
|
|
2627
|
-
input: unknown;
|
|
2628
|
-
groundTruth?: unknown;
|
|
2629
|
-
expectedTrajectory?: unknown;
|
|
2630
|
-
toolMocks?: DatasetItemToolMock[];
|
|
2631
|
-
scorerIds?: string[];
|
|
2632
|
-
requestContext?: Record<string, unknown>;
|
|
2633
|
-
metadata?: Record<string, unknown>;
|
|
2634
|
-
validTo: number | null;
|
|
2635
|
-
isDeleted: boolean;
|
|
2636
|
-
createdAt: string | Date;
|
|
2637
|
-
updatedAt: string | Date;
|
|
2638
|
-
}
|
|
2639
|
-
export interface DatasetVersionResponse {
|
|
2640
|
-
id: string;
|
|
2641
|
-
datasetId: string;
|
|
2642
|
-
version: number;
|
|
2643
|
-
createdAt: string | Date;
|
|
2644
|
-
}
|
|
2645
|
-
export interface CompareExperimentsResponse {
|
|
2646
|
-
baselineId: string;
|
|
2647
|
-
items: Array<{
|
|
2648
|
-
itemId: string;
|
|
2649
|
-
input: unknown;
|
|
2650
|
-
groundTruth: unknown;
|
|
2651
|
-
results: Record<string, {
|
|
2652
|
-
output: unknown;
|
|
2653
|
-
scores: Record<string, number | null>;
|
|
2654
|
-
} | null>;
|
|
2655
|
-
}>;
|
|
2656
|
-
}
|
|
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'>;
|
|
2657
1578
|
/**
|
|
2658
1579
|
* Stored prompt block data returned from API
|
|
2659
1580
|
*/
|
|
2660
|
-
export
|
|
2661
|
-
id: string;
|
|
2662
|
-
status: string;
|
|
2663
|
-
activeVersionId?: string;
|
|
2664
|
-
hasDraft?: boolean;
|
|
2665
|
-
authorId?: string;
|
|
2666
|
-
metadata?: Record<string, unknown>;
|
|
2667
|
-
createdAt: string;
|
|
2668
|
-
updatedAt: string;
|
|
2669
|
-
name: string;
|
|
2670
|
-
description?: string;
|
|
2671
|
-
content: string;
|
|
2672
|
-
rules?: RuleGroup;
|
|
2673
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2674
|
-
}
|
|
1581
|
+
export type StoredPromptBlockResponse = GeneratedResponse<'GET /stored/prompt-blocks/:storedPromptBlockId'>;
|
|
2675
1582
|
/**
|
|
2676
1583
|
* Parameters for listing stored prompt blocks
|
|
2677
1584
|
*/
|
|
2678
|
-
export
|
|
2679
|
-
page?: number;
|
|
2680
|
-
perPage?: number;
|
|
2681
|
-
orderBy?: {
|
|
2682
|
-
field?: 'createdAt' | 'updatedAt';
|
|
2683
|
-
direction?: 'ASC' | 'DESC';
|
|
2684
|
-
};
|
|
2685
|
-
status?: 'draft' | 'published' | 'archived';
|
|
2686
|
-
authorId?: string;
|
|
2687
|
-
metadata?: Record<string, unknown>;
|
|
2688
|
-
}
|
|
1585
|
+
export type ListStoredPromptBlocksParams = GeneratedRequest<QueryParams<'GET /stored/prompt-blocks'>>;
|
|
2689
1586
|
/**
|
|
2690
1587
|
* Response for listing stored prompt blocks
|
|
2691
1588
|
*/
|
|
2692
|
-
export
|
|
2693
|
-
promptBlocks: StoredPromptBlockResponse[];
|
|
2694
|
-
total: number;
|
|
2695
|
-
page: number;
|
|
2696
|
-
perPage: number | false;
|
|
2697
|
-
hasMore: boolean;
|
|
2698
|
-
}
|
|
1589
|
+
export type ListStoredPromptBlocksResponse = GeneratedResponse<'GET /stored/prompt-blocks'>;
|
|
2699
1590
|
/**
|
|
2700
1591
|
* Parameters for creating a stored prompt block
|
|
2701
1592
|
*/
|
|
2702
|
-
export
|
|
2703
|
-
id?: string;
|
|
2704
|
-
authorId?: string;
|
|
2705
|
-
metadata?: Record<string, unknown>;
|
|
2706
|
-
name: string;
|
|
2707
|
-
description?: string;
|
|
2708
|
-
content: string;
|
|
2709
|
-
rules?: RuleGroup;
|
|
2710
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2711
|
-
}
|
|
1593
|
+
export type CreateStoredPromptBlockParams = GeneratedRequest<Body<'POST /stored/prompt-blocks'>>;
|
|
2712
1594
|
/**
|
|
2713
1595
|
* Parameters for updating a stored prompt block
|
|
2714
1596
|
*/
|
|
2715
|
-
export
|
|
2716
|
-
authorId?: string;
|
|
2717
|
-
metadata?: Record<string, unknown>;
|
|
2718
|
-
name?: string;
|
|
2719
|
-
description?: string;
|
|
2720
|
-
content?: string;
|
|
2721
|
-
rules?: RuleGroup;
|
|
2722
|
-
requestContextSchema?: Record<string, unknown>;
|
|
2723
|
-
}
|
|
1597
|
+
export type UpdateStoredPromptBlockParams = GeneratedRequest<Body<'PATCH /stored/prompt-blocks/:storedPromptBlockId'>>;
|
|
2724
1598
|
/**
|
|
2725
1599
|
* Response for deleting a stored prompt block
|
|
2726
1600
|
*/
|
|
2727
|
-
export
|
|
2728
|
-
success: boolean;
|
|
2729
|
-
message: string;
|
|
2730
|
-
}
|
|
1601
|
+
export type DeleteStoredPromptBlockResponse = GeneratedResponse<'DELETE /stored/prompt-blocks/:storedPromptBlockId'>;
|
|
2731
1602
|
export interface PromptBlockVersionResponse {
|
|
2732
1603
|
id: string;
|
|
2733
1604
|
blockId: string;
|
|
@@ -2806,136 +1677,41 @@ export interface ScheduleIfIdle {
|
|
|
2806
1677
|
* Flat agent-schedule view returned by the unified `/schedules` surface.
|
|
2807
1678
|
* Discriminate from workflow schedules by the presence of `agentId`.
|
|
2808
1679
|
*/
|
|
2809
|
-
export
|
|
2810
|
-
id: string;
|
|
1680
|
+
export type AgentSchedule = Extract<GeneratedResponse<'GET /schedules'>['schedules'][number], {
|
|
2811
1681
|
agentId: string;
|
|
2812
|
-
|
|
2813
|
-
workflowId?: undefined;
|
|
2814
|
-
/** Workflow-run summary — never hydrated for agent schedules. */
|
|
2815
|
-
lastRun?: undefined;
|
|
2816
|
-
name?: string;
|
|
2817
|
-
threadId?: string;
|
|
2818
|
-
resourceId?: string;
|
|
2819
|
-
prompt: string;
|
|
2820
|
-
cron: string;
|
|
2821
|
-
timezone?: string;
|
|
2822
|
-
status: ScheduleStatus;
|
|
2823
|
-
nextFireAt: number;
|
|
2824
|
-
lastFireAt?: number;
|
|
2825
|
-
lastRunId?: string;
|
|
2826
|
-
signalType?: ScheduleSignalType;
|
|
2827
|
-
tagName?: string;
|
|
2828
|
-
attributes?: ScheduleSignalAttributes;
|
|
2829
|
-
ifActive?: ScheduleIfActive;
|
|
2830
|
-
ifIdle?: ScheduleIfIdle;
|
|
2831
|
-
providerOptions?: Record<string, unknown>;
|
|
2832
|
-
metadata?: Record<string, unknown>;
|
|
2833
|
-
createdAt: number;
|
|
2834
|
-
updatedAt: number;
|
|
2835
|
-
}
|
|
1682
|
+
}>;
|
|
2836
1683
|
/**
|
|
2837
1684
|
* Flat workflow-schedule view returned by the unified `/schedules` surface.
|
|
2838
1685
|
* Discriminate from agent schedules by the presence of `workflowId`.
|
|
2839
1686
|
*/
|
|
2840
|
-
export
|
|
2841
|
-
id: string;
|
|
1687
|
+
export type WorkflowSchedule = Extract<GeneratedResponse<'GET /schedules'>['schedules'][number], {
|
|
2842
1688
|
workflowId: string;
|
|
2843
|
-
|
|
2844
|
-
agentId?: undefined;
|
|
2845
|
-
cron: string;
|
|
2846
|
-
timezone?: string;
|
|
2847
|
-
status: ScheduleStatus;
|
|
2848
|
-
nextFireAt: number;
|
|
2849
|
-
lastFireAt?: number;
|
|
2850
|
-
lastRunId?: string;
|
|
2851
|
-
lastRun?: ScheduleRunSummary;
|
|
2852
|
-
inputData?: unknown;
|
|
2853
|
-
initialState?: unknown;
|
|
2854
|
-
requestContext?: Record<string, unknown>;
|
|
2855
|
-
metadata?: Record<string, unknown>;
|
|
2856
|
-
createdAt: number;
|
|
2857
|
-
updatedAt: number;
|
|
2858
|
-
}
|
|
1689
|
+
}>;
|
|
2859
1690
|
/** Union of the flat views returned by the unified `/schedules` surface. */
|
|
2860
1691
|
export type ScheduleResponse = AgentSchedule | WorkflowSchedule;
|
|
2861
1692
|
export type ScheduleTriggerOutcome = 'published' | 'succeeded' | 'delivered' | 'persisted' | 'discarded' | 'skipped' | 'aborted' | 'failed';
|
|
2862
1693
|
export type ScheduleTriggerKind = 'schedule-fire' | 'queue-drain' | 'manual';
|
|
2863
|
-
export
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
actualFireAt: number;
|
|
2869
|
-
outcome: ScheduleTriggerOutcome;
|
|
2870
|
-
error?: string;
|
|
2871
|
-
triggerKind?: ScheduleTriggerKind;
|
|
2872
|
-
parentTriggerId?: string;
|
|
2873
|
-
metadata?: Record<string, unknown>;
|
|
2874
|
-
run?: ScheduleRunSummary;
|
|
2875
|
-
}
|
|
2876
|
-
export interface ListSchedulesParams {
|
|
2877
|
-
/** Scope the list to a single agent's schedules. */
|
|
2878
|
-
agentId?: string;
|
|
2879
|
-
/** Scope the list to a single workflow's schedules. */
|
|
2880
|
-
workflowId?: string;
|
|
2881
|
-
status?: ScheduleStatus;
|
|
2882
|
-
/** Agent-schedule only: match the target threadId. */
|
|
2883
|
-
threadId?: string;
|
|
2884
|
-
/** Agent-schedule only: match the target resourceId. */
|
|
2885
|
-
resourceId?: string;
|
|
2886
|
-
/** Agent-schedule only: match the free-form target name. */
|
|
2887
|
-
name?: string;
|
|
2888
|
-
}
|
|
2889
|
-
export interface ListSchedulesResponse {
|
|
2890
|
-
schedules: ScheduleResponse[];
|
|
2891
|
-
}
|
|
2892
|
-
export interface ListScheduleTriggersParams {
|
|
2893
|
-
limit?: number;
|
|
2894
|
-
fromActualFireAt?: number;
|
|
2895
|
-
toActualFireAt?: number;
|
|
2896
|
-
}
|
|
2897
|
-
export interface ListScheduleTriggersResponse {
|
|
2898
|
-
triggers: ScheduleTriggerResponse[];
|
|
2899
|
-
}
|
|
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'>;
|
|
2900
1699
|
/**
|
|
2901
1700
|
* Agent variant of the `client.createSchedule(...)` body — targets an agent
|
|
2902
1701
|
* by `agentId`. Mirrors `CreateAgentScheduleInput` on the core Schedules
|
|
2903
1702
|
* service.
|
|
2904
1703
|
*/
|
|
2905
|
-
export
|
|
2906
|
-
/** Optional stable id; normalized to `agent_<slug>`. A random id is generated when omitted. */
|
|
2907
|
-
id?: string;
|
|
1704
|
+
export type CreateAgentScheduleInput = Extract<WithoutIndexSignatures<GeneratedRequest<Body<'POST /schedules'>>>, {
|
|
2908
1705
|
agentId: string;
|
|
2909
|
-
|
|
2910
|
-
prompt: string;
|
|
2911
|
-
name?: string;
|
|
2912
|
-
timezone?: string;
|
|
2913
|
-
threadId?: string;
|
|
2914
|
-
resourceId?: string;
|
|
2915
|
-
signalType?: ScheduleSignalType;
|
|
2916
|
-
tagName?: string;
|
|
2917
|
-
attributes?: ScheduleSignalAttributes;
|
|
2918
|
-
ifActive?: ScheduleIfActive;
|
|
2919
|
-
ifIdle?: ScheduleIfIdle;
|
|
2920
|
-
providerOptions?: Record<string, unknown>;
|
|
2921
|
-
metadata?: Record<string, unknown>;
|
|
2922
|
-
}
|
|
1706
|
+
}>;
|
|
2923
1707
|
/**
|
|
2924
1708
|
* Workflow variant of the `client.createSchedule(...)` body — targets a
|
|
2925
1709
|
* workflow by `workflowId`. Mirrors `CreateWorkflowScheduleInput` on the
|
|
2926
1710
|
* core Schedules service.
|
|
2927
1711
|
*/
|
|
2928
|
-
export
|
|
2929
|
-
/** Optional stable id; normalized to `schedule_<slug>`. A random id is generated when omitted. */
|
|
2930
|
-
id?: string;
|
|
1712
|
+
export type CreateWorkflowScheduleInput = Extract<WithoutIndexSignatures<GeneratedRequest<Body<'POST /schedules'>>>, {
|
|
2931
1713
|
workflowId: string;
|
|
2932
|
-
|
|
2933
|
-
timezone?: string;
|
|
2934
|
-
inputData?: unknown;
|
|
2935
|
-
initialState?: unknown;
|
|
2936
|
-
requestContext?: Record<string, unknown>;
|
|
2937
|
-
metadata?: Record<string, unknown>;
|
|
2938
|
-
}
|
|
1714
|
+
}>;
|
|
2939
1715
|
/**
|
|
2940
1716
|
* Body for `client.createSchedule(...)`. Discriminated by which target id is
|
|
2941
1717
|
* present: `agentId` creates an agent schedule, `workflowId` a workflow
|
|
@@ -2948,23 +1724,7 @@ export type CreateScheduleInput = CreateAgentScheduleInput | CreateWorkflowSched
|
|
|
2948
1724
|
* server. `threadId` / `resourceId` are part of an agent schedule's identity
|
|
2949
1725
|
* and cannot be changed — to retarget, delete and recreate.
|
|
2950
1726
|
*/
|
|
2951
|
-
export
|
|
2952
|
-
cron?: string;
|
|
2953
|
-
timezone?: string;
|
|
2954
|
-
status?: ScheduleStatus;
|
|
2955
|
-
metadata?: Record<string, unknown>;
|
|
2956
|
-
prompt?: string;
|
|
2957
|
-
name?: string;
|
|
2958
|
-
signalType?: ScheduleSignalType;
|
|
2959
|
-
tagName?: string;
|
|
2960
|
-
attributes?: ScheduleSignalAttributes;
|
|
2961
|
-
ifActive?: ScheduleIfActive;
|
|
2962
|
-
ifIdle?: ScheduleIfIdle;
|
|
2963
|
-
providerOptions?: Record<string, unknown>;
|
|
2964
|
-
inputData?: unknown;
|
|
2965
|
-
initialState?: unknown;
|
|
2966
|
-
requestContext?: Record<string, unknown>;
|
|
2967
|
-
}
|
|
1727
|
+
export type UpdateScheduleInput = WithoutIndexSignatures<GeneratedRequest<Body<'PATCH /schedules/:scheduleId'>>>;
|
|
2968
1728
|
/**
|
|
2969
1729
|
* Response for POST /schedules/:scheduleId/run.
|
|
2970
1730
|
*
|
|
@@ -2972,11 +1732,7 @@ export interface UpdateScheduleInput {
|
|
|
2972
1732
|
* fires. `claimId` is the trigger row's `runId` (used to look up the
|
|
2973
1733
|
* resulting trigger row via `listScheduleTriggers`).
|
|
2974
1734
|
*/
|
|
2975
|
-
export
|
|
2976
|
-
scheduleId: string;
|
|
2977
|
-
claimId: string;
|
|
2978
|
-
scheduledFireAt: number;
|
|
2979
|
-
}
|
|
1735
|
+
export type RunScheduleResponse = GeneratedResponse<'POST /schedules/:scheduleId/run'>;
|
|
2980
1736
|
export interface ExperimentReviewCounts {
|
|
2981
1737
|
experimentId: string;
|
|
2982
1738
|
total: number;
|
|
@@ -3019,36 +1775,7 @@ export type { BuilderModelPolicy, DefaultModelEntry, ProviderModelEntry, ModelPr
|
|
|
3019
1775
|
/**
|
|
3020
1776
|
* Response from GET /editor/builder/settings
|
|
3021
1777
|
*/
|
|
3022
|
-
export
|
|
3023
|
-
enabled: boolean;
|
|
3024
|
-
features?: {
|
|
3025
|
-
agent?: BuilderAgentFeatures;
|
|
3026
|
-
};
|
|
3027
|
-
configuration?: {
|
|
3028
|
-
agent?: Record<string, unknown>;
|
|
3029
|
-
};
|
|
3030
|
-
/**
|
|
3031
|
-
* Server-derived model policy. Always present; `{ active: false }` when no
|
|
3032
|
-
* builder is configured. UI consumers should read this directly rather than
|
|
3033
|
-
* re-deriving from `features` / `configuration`.
|
|
3034
|
-
*/
|
|
3035
|
-
modelPolicy?: BuilderModelPolicy;
|
|
3036
|
-
/**
|
|
3037
|
-
* Resolved picker visibility for tools, agents, and workflows. Present when
|
|
3038
|
-
* the builder is enabled. Each `visible*` field is `null` when unrestricted
|
|
3039
|
-
* (show all registered entries) and `string[]` otherwise — making the
|
|
3040
|
-
* empty-vs-unrestricted distinction explicit so the UI never has to
|
|
3041
|
-
* disambiguate.
|
|
3042
|
-
*/
|
|
3043
|
-
picker?: BuilderPickerResponse;
|
|
3044
|
-
/**
|
|
3045
|
-
* Non-fatal warnings produced by builder config validation (e.g. allowlist
|
|
3046
|
-
* entries with unknown providers that aren't tagged `kind: 'custom'`, or
|
|
3047
|
-
* picker allowlist entries that don't match a registered ID).
|
|
3048
|
-
* Only present when there is at least one warning.
|
|
3049
|
-
*/
|
|
3050
|
-
modelPolicyWarnings?: string[];
|
|
3051
|
-
}
|
|
1778
|
+
export type BuilderSettingsResponse = GeneratedResponse<'GET /editor/builder/settings'>;
|
|
3052
1779
|
/**
|
|
3053
1780
|
* Response from GET /editor/builder/models/available.
|
|
3054
1781
|
*
|
|
@@ -3087,113 +1814,18 @@ export interface BuilderPickerResponse {
|
|
|
3087
1814
|
*
|
|
3088
1815
|
* Agent Builder infrastructure configuration plus lightweight runtime resolution state.
|
|
3089
1816
|
*/
|
|
3090
|
-
export
|
|
3091
|
-
channels: {
|
|
3092
|
-
providers: Array<{
|
|
3093
|
-
id: string;
|
|
3094
|
-
name: string;
|
|
3095
|
-
isConfigured: boolean;
|
|
3096
|
-
routeCount: number;
|
|
3097
|
-
}>;
|
|
3098
|
-
};
|
|
3099
|
-
browser: {
|
|
3100
|
-
type: string | null;
|
|
3101
|
-
provider: string | null;
|
|
3102
|
-
env: string | null;
|
|
3103
|
-
registered: boolean;
|
|
3104
|
-
availableProviders: string[];
|
|
3105
|
-
config: Array<{
|
|
3106
|
-
key: string;
|
|
3107
|
-
value: string;
|
|
3108
|
-
}>;
|
|
3109
|
-
};
|
|
3110
|
-
workspace: {
|
|
3111
|
-
type: string | null;
|
|
3112
|
-
workspaceId: string | null;
|
|
3113
|
-
name: string | null;
|
|
3114
|
-
source: string | null;
|
|
3115
|
-
registered: boolean;
|
|
3116
|
-
hasFilesystem: boolean;
|
|
3117
|
-
hasSandbox: boolean;
|
|
3118
|
-
filesystemProvider: string | null;
|
|
3119
|
-
sandboxProvider: string | null;
|
|
3120
|
-
config: Array<{
|
|
3121
|
-
key: string;
|
|
3122
|
-
value: string;
|
|
3123
|
-
}>;
|
|
3124
|
-
};
|
|
3125
|
-
registries: {
|
|
3126
|
-
skillsSh: {
|
|
3127
|
-
enabled: boolean;
|
|
3128
|
-
};
|
|
3129
|
-
};
|
|
3130
|
-
}
|
|
1817
|
+
export type InfrastructureStatusResponse = GeneratedResponse<'GET /editor/builder/infrastructure'>;
|
|
3131
1818
|
/**
|
|
3132
1819
|
* One known skill registry surfaced from the Agent Builder config.
|
|
3133
1820
|
*/
|
|
3134
|
-
export
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
export interface ListBuilderRegistriesResponse {
|
|
3143
|
-
registries: BuilderRegistryDescriptor[];
|
|
3144
|
-
}
|
|
3145
|
-
/**
|
|
3146
|
-
* Single skill summary returned from a registry search/popular endpoint.
|
|
3147
|
-
* Wire shape matches the upstream skills.sh proxy.
|
|
3148
|
-
*/
|
|
3149
|
-
export interface BuilderRegistrySkillSummary {
|
|
3150
|
-
id: string;
|
|
3151
|
-
name: string;
|
|
3152
|
-
installs: number;
|
|
3153
|
-
/** Repository identifier in `owner/repo` or `owner/repo/path` form. */
|
|
3154
|
-
topSource: string;
|
|
3155
|
-
}
|
|
3156
|
-
/**
|
|
3157
|
-
* Response from `GET /editor/builder/registries/:registryId/search`.
|
|
3158
|
-
*/
|
|
3159
|
-
export interface BuilderRegistrySearchResponse {
|
|
3160
|
-
query: string;
|
|
3161
|
-
searchType: string;
|
|
3162
|
-
skills: BuilderRegistrySkillSummary[];
|
|
3163
|
-
count: number;
|
|
3164
|
-
}
|
|
3165
|
-
/**
|
|
3166
|
-
* Response from `GET /editor/builder/registries/:registryId/popular`.
|
|
3167
|
-
*/
|
|
3168
|
-
export interface BuilderRegistryPopularResponse {
|
|
3169
|
-
skills: BuilderRegistrySkillSummary[];
|
|
3170
|
-
count: number;
|
|
3171
|
-
limit: number;
|
|
3172
|
-
offset: number;
|
|
3173
|
-
}
|
|
3174
|
-
/**
|
|
3175
|
-
* Response from `GET /editor/builder/registries/:registryId/preview`.
|
|
3176
|
-
*/
|
|
3177
|
-
export interface BuilderRegistryPreviewResponse {
|
|
3178
|
-
content: string;
|
|
3179
|
-
}
|
|
3180
|
-
/**
|
|
3181
|
-
* Body for `POST /editor/builder/registries/:registryId/install`.
|
|
3182
|
-
*/
|
|
3183
|
-
export interface BuilderRegistryInstallBody {
|
|
3184
|
-
owner: string;
|
|
3185
|
-
repo: string;
|
|
3186
|
-
skillName: string;
|
|
3187
|
-
visibility?: 'private' | 'public';
|
|
3188
|
-
}
|
|
3189
|
-
/**
|
|
3190
|
-
* Response from `POST /editor/builder/registries/:registryId/install`.
|
|
3191
|
-
*/
|
|
3192
|
-
export interface BuilderRegistryInstallResponse {
|
|
3193
|
-
storedSkillId: string;
|
|
3194
|
-
name: string;
|
|
3195
|
-
filesWritten: number;
|
|
3196
|
-
}
|
|
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'>;
|
|
3197
1829
|
export type { PermissionPolicy, ToolCategory } from '@mastra/core/agent-controller';
|
|
3198
1830
|
export type { TaskItemSnapshot as AgentControllerTaskSnapshot } from '@mastra/core/tools';
|
|
3199
1831
|
export type AgentControllerInfo = GeneratedResponse<'GET /agent-controller'>['agentControllers'][number];
|