@mastra/client-js 1.60.0-alpha.8 → 1.60.0

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.
@@ -175,12 +175,12 @@ type InputShared_Auxiliary_809 = {
175
175
  content?: string | undefined;
176
176
  children?: InputShared_Auxiliary_809[] | undefined;
177
177
  };
178
- type Shared_Auxiliary_795 = {
178
+ type Shared_Auxiliary_799 = {
179
179
  id?: string | undefined;
180
180
  name: string;
181
181
  type: 'file' | 'folder';
182
182
  content?: string | undefined;
183
- children?: Shared_Auxiliary_795[] | undefined;
183
+ children?: Shared_Auxiliary_799[] | undefined;
184
184
  };
185
185
  type InputShared_Type_0 = {
186
186
  thread: string | {
@@ -2593,7 +2593,7 @@ type Shared_Type_62 = {
2593
2593
  } | null) | undefined;
2594
2594
  /** Milliseconds from the model call to the first token received; null when unknown */
2595
2595
  timeToFirstTokenMs?: (number | null) | undefined;
2596
- /** Errors in this span and all nested spans; null when unknown */
2596
+ /** Failures originating directly on this span; null when unknown */
2597
2597
  errorCount?: (number | null) | undefined;
2598
2598
  /** Database record creation time */
2599
2599
  createdAt: Date;
@@ -2718,7 +2718,7 @@ type Shared_Type_64 = {
2718
2718
  } | null) | undefined;
2719
2719
  /** Milliseconds from the model call to the first token received; null when unknown */
2720
2720
  timeToFirstTokenMs?: (number | null) | undefined;
2721
- /** Errors in this span and all nested spans; null when unknown */
2721
+ /** Failures originating directly on this span; null when unknown */
2722
2722
  errorCount?: (number | null) | undefined;
2723
2723
  /** Database record creation time */
2724
2724
  createdAt: Date;
@@ -2931,6 +2931,10 @@ type Shared_Type_69 = {
2931
2931
  threadQueryRows: boolean;
2932
2932
  /** Span queries (POST /observability/spans/query) */
2933
2933
  spanQuery: boolean;
2934
+ /** Whether completed spans can be sorted by duration */
2935
+ spanQueryDurationSort: boolean;
2936
+ /** Whether spans can be sorted by model and provider */
2937
+ spanQueryModelProviderSort: boolean;
2934
2938
  /** Additional identity, context and parent/root entity predicates in span queries. Treat a missing value as unavailable. */
2935
2939
  spanQueryContextFields: boolean;
2936
2940
  /** `model` and `provider` predicates in span queries and span aggregates. Treat a missing value as unavailable. */
@@ -3382,7 +3386,7 @@ type Shared_Type_88 = {
3382
3386
  /** List of asset file paths */
3383
3387
  assets?: string[] | undefined;
3384
3388
  /** Full file tree structure for the skill */
3385
- files?: Shared_Auxiliary_795[] | undefined;
3389
+ files?: Shared_Auxiliary_799[] | undefined;
3386
3390
  /** Additional metadata for the skill */
3387
3391
  metadata?: {
3388
3392
  [key: string]: unknown;
@@ -3707,7 +3711,9 @@ type Shared_Type_105 = {
3707
3711
  threadId?: string | undefined;
3708
3712
  resourceId?: string | undefined;
3709
3713
  prompt: string;
3710
- cron: string;
3714
+ cron?: string | undefined;
3715
+ runAt?: number | undefined;
3716
+ endAt?: number | undefined;
3711
3717
  timezone?: string | undefined;
3712
3718
  status: 'active' | 'paused' | 'completed';
3713
3719
  nextFireAt: number;
@@ -3740,7 +3746,9 @@ type Shared_Type_107 = {
3740
3746
  id: string;
3741
3747
  workflowId: string;
3742
3748
  agentId?: undefined | undefined;
3743
- cron: string;
3749
+ cron?: string | undefined;
3750
+ runAt?: number | undefined;
3751
+ endAt?: number | undefined;
3744
3752
  timezone?: string | undefined;
3745
3753
  status: 'active' | 'paused' | 'completed';
3746
3754
  nextFireAt: number;
@@ -8227,7 +8235,7 @@ export type GetObservabilityTracesTraceIdSpanIdScores_Response = {
8227
8235
  entity: {
8228
8236
  [key: string]: unknown;
8229
8237
  };
8230
- entityType?: ('AGENT' | 'WORKFLOW' | 'TRAJECTORY' | 'STEP' | 'EXTERNAL' | 'agent_run' | 'scorer_run' | 'classifier_evaluation' | 'scorer_step' | 'generic' | 'model_generation' | 'model_step' | 'model_inference' | 'model_chunk' | 'mcp_tool_call' | 'mcp_server_request' | 'processor_run' | 'tool_call' | 'client_tool_call' | 'provider_tool_call' | 'workflow_run' | 'workflow_step' | 'workflow_conditional' | 'workflow_conditional_eval' | 'workflow_parallel' | 'workflow_loop' | 'workflow_sleep' | 'workflow_wait_event' | 'memory_operation' | 'workspace_action' | 'rag_ingestion' | 'rag_embedding' | 'rag_vector_operation' | 'rag_action' | 'graph_action' | 'mapping' | 'skill_resolution' | 'skill_action' | 'agent_signal') | undefined;
8238
+ entityType?: ('AGENT' | 'WORKFLOW' | 'TRAJECTORY' | 'STEP' | 'SCORER' | 'PROCESSOR' | 'EXTERNAL' | 'agent_run' | 'scorer_run' | 'classifier_evaluation' | 'scorer_step' | 'generic' | 'model_generation' | 'model_step' | 'model_inference' | 'model_chunk' | 'mcp_tool_call' | 'mcp_server_request' | 'processor_run' | 'tool_call' | 'client_tool_call' | 'provider_tool_call' | 'workflow_run' | 'workflow_step' | 'workflow_conditional' | 'workflow_conditional_eval' | 'workflow_parallel' | 'workflow_loop' | 'workflow_sleep' | 'workflow_wait_event' | 'memory_operation' | 'workspace_action' | 'rag_ingestion' | 'rag_embedding' | 'rag_vector_operation' | 'rag_action' | 'graph_action' | 'mapping' | 'skill_resolution' | 'skill_action' | 'agent_signal') | undefined;
8231
8239
  structuredOutput?: boolean | undefined;
8232
8240
  traceId?: string | undefined;
8233
8241
  spanId?: string | undefined;
@@ -8534,7 +8542,7 @@ export type PostObservabilitySpansQuery_Body = {
8534
8542
  where?: InputShared_Auxiliary_231 | undefined;
8535
8543
  textSearch?: string | undefined;
8536
8544
  orderBy?: {
8537
- field: 'startedAt' | 'endedAt' | 'timeToFirstChunkMs' | 'timeToFirstTokenMs';
8545
+ field: 'startedAt' | 'endedAt' | 'timeToFirstChunkMs' | 'timeToFirstTokenMs' | 'durationMs' | 'model' | 'provider';
8538
8546
  direction: 'asc' | 'desc';
8539
8547
  }[];
8540
8548
  page?: {
@@ -12019,6 +12027,66 @@ export interface PostWorkflowsWorkflowIdObserveStreamLegacy_RouteContract {
12019
12027
  response: PostWorkflowsWorkflowIdObserveStreamLegacy_Response;
12020
12028
  responseType: 'stream';
12021
12029
  }
12030
+ export type AllMcp_Request = Simplify<(never extends never ? {} : {
12031
+ params: never;
12032
+ }) & (never extends never ? {} : {} extends never ? {
12033
+ query?: never;
12034
+ } : {
12035
+ query: never;
12036
+ }) & (never extends never ? {} : {} extends never ? {
12037
+ body?: never;
12038
+ } : {
12039
+ body: never;
12040
+ })>;
12041
+ export interface AllMcp_RouteContract {
12042
+ pathParams: never;
12043
+ queryParams: never;
12044
+ body: never;
12045
+ request: AllMcp_Request;
12046
+ response: unknown;
12047
+ responseType: 'mcp-http';
12048
+ }
12049
+ export type GetMcpBuiltin_Response = {
12050
+ enabled: false;
12051
+ /** 'config': server.mcp.enabled is false. 'production-without-auth': not under mastra dev and no server.auth */
12052
+ disabledReason: 'config' | 'production-without-auth';
12053
+ } | {
12054
+ enabled: true;
12055
+ /** Endpoint path including the API prefix, e.g. /api/mcp */
12056
+ path: string;
12057
+ /** Whether @mastra/mcp is installed; the endpoint answers 501 without it */
12058
+ mcpPackageInstalled: boolean;
12059
+ /** Configured toolsets this server can serve */
12060
+ toolsets: ('agents' | 'workflows' | 'tools' | 'memory' | 'observability' | 'observability_analytics' | 'stored_agents')[];
12061
+ readOnly: boolean;
12062
+ auth: {
12063
+ type: 'open';
12064
+ /** Open because of the mastra dev default, not server.mcp.enabled: true */
12065
+ devOnly: boolean;
12066
+ } | {
12067
+ type: 'protected';
12068
+ provider: string | null;
12069
+ };
12070
+ };
12071
+ export type GetMcpBuiltin_Request = Simplify<(never extends never ? {} : {
12072
+ params: never;
12073
+ }) & (never extends never ? {} : {} extends never ? {
12074
+ query?: never;
12075
+ } : {
12076
+ query: never;
12077
+ }) & (never extends never ? {} : {} extends never ? {
12078
+ body?: never;
12079
+ } : {
12080
+ body: never;
12081
+ })>;
12082
+ export interface GetMcpBuiltin_RouteContract {
12083
+ pathParams: never;
12084
+ queryParams: never;
12085
+ body: never;
12086
+ request: GetMcpBuiltin_Request;
12087
+ response: GetMcpBuiltin_Response;
12088
+ responseType: 'json';
12089
+ }
12022
12090
  export type GetMcpV0Servers_QueryParams = {
12023
12091
  page?: number | undefined;
12024
12092
  perPage?: number | undefined;
@@ -17336,6 +17404,8 @@ export type GetDatasetsDatasetIdExperimentsExperimentIdResults_QueryParams = {
17336
17404
  perPage?: number | undefined;
17337
17405
  /** Only return results that have all of these tags */
17338
17406
  tags?: string[] | undefined;
17407
+ /** Only return results with this review status */
17408
+ status?: ('needs-review' | 'reviewed' | 'complete') | undefined;
17339
17409
  orderBy?: ({
17340
17410
  field: 'startedAt' | 'createdAt';
17341
17411
  direction: 'ASC' | 'DESC';
@@ -18430,7 +18500,9 @@ export interface GetSchedulesScheduleId_RouteContract {
18430
18500
  export type PostSchedules_Body = {
18431
18501
  id?: string | undefined;
18432
18502
  agentId: string;
18433
- cron: string;
18503
+ cron?: string | undefined;
18504
+ runAt?: number | undefined;
18505
+ endAt?: number | undefined;
18434
18506
  timezone?: string | undefined;
18435
18507
  prompt: string;
18436
18508
  name?: string | undefined;
@@ -18452,7 +18524,9 @@ export type PostSchedules_Body = {
18452
18524
  } | {
18453
18525
  id?: string | undefined;
18454
18526
  workflowId: string;
18455
- cron: string;
18527
+ cron?: string | undefined;
18528
+ runAt?: number | undefined;
18529
+ endAt?: number | undefined;
18456
18530
  timezone?: string | undefined;
18457
18531
  inputData?: unknown | undefined;
18458
18532
  initialState?: unknown | undefined;
@@ -18487,6 +18561,8 @@ export interface PostSchedules_RouteContract {
18487
18561
  export type PatchSchedulesScheduleId_PathParams = GetSchedulesScheduleId_PathParams;
18488
18562
  export type PatchSchedulesScheduleId_Body = {
18489
18563
  cron?: string | undefined;
18564
+ runAt?: number | undefined;
18565
+ endAt?: (number | null) | undefined;
18490
18566
  timezone?: string | undefined;
18491
18567
  status?: ('active' | 'paused') | undefined;
18492
18568
  metadata?: {
@@ -20110,6 +20186,8 @@ export interface RouteTypes {
20110
20186
  'POST /agents/:agentId/stream-legacy': PostAgentsAgentIdStreamLegacy_RouteContract;
20111
20187
  'POST /workflows/:workflowId/stream-legacy': PostWorkflowsWorkflowIdStreamLegacy_RouteContract;
20112
20188
  'POST /workflows/:workflowId/observe-stream-legacy': PostWorkflowsWorkflowIdObserveStreamLegacy_RouteContract;
20189
+ 'ALL /mcp': AllMcp_RouteContract;
20190
+ 'GET /mcp/builtin': GetMcpBuiltin_RouteContract;
20113
20191
  'GET /mcp/v0/servers': GetMcpV0Servers_RouteContract;
20114
20192
  'GET /mcp/v0/servers/:id': GetMcpV0ServersId_RouteContract;
20115
20193
  'GET /mcp/:serverId/tools': GetMcpServerIdTools_RouteContract;
@@ -20844,6 +20922,9 @@ export interface Client {
20844
20922
  '/logs/transports': {
20845
20923
  GET: GetLogsTransports_RouteContract;
20846
20924
  };
20925
+ '/mcp': {
20926
+ ALL: AllMcp_RouteContract;
20927
+ };
20847
20928
  '/mcp/:serverId/events': {
20848
20929
  GET: GetMcpServerIdEvents_RouteContract;
20849
20930
  };
@@ -20892,6 +20973,9 @@ export interface Client {
20892
20973
  '/mcp/:serverId/tools/:toolId/execute': {
20893
20974
  POST: PostMcpServerIdToolsToolIdExecute_RouteContract;
20894
20975
  };
20976
+ '/mcp/builtin': {
20977
+ GET: GetMcpBuiltin_RouteContract;
20978
+ };
20895
20979
  '/mcp/v0/servers': {
20896
20980
  GET: GetMcpV0Servers_RouteContract;
20897
20981
  };