@mastra/client-js 1.60.0-alpha.0 → 1.60.0-alpha.10
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 +15 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/SKILL.md +5 -5
- package/dist/docs/assets/SOURCE_MAP.json +6 -6
- package/dist/docs/references/docs-harness-schedules.md +3 -1
- package/dist/docs/references/docs-signals-sending-signals.md +3 -1
- package/dist/docs/references/integrations-auth-clerk.md +46 -7
- package/dist/docs/references/integrations-auth-neon.md +217 -0
- package/dist/docs/references/integrations-auth-supabase.md +46 -7
- package/dist/docs/references/integrations-auth-workos.md +54 -15
- package/dist/docs/references/reference-client-js-agents.md +4 -4
- package/dist/docs/references/reference-client-js-observability.md +36 -6
- package/dist/docs/references/reference-observability-tracing-advanced-queries.md +49 -59
- package/dist/index.cjs +87 -39
- 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 +87 -39
- package/dist/index.js.map +1 -1
- package/dist/resources/agent.d.ts +18 -11
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/observability-route-types.d.ts +8 -10
- package/dist/resources/observability-route-types.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +12 -2
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/route-types.generated.d.ts +343 -212
- package/dist/route-types.generated.d.ts.map +1 -1
- package/dist/types.d.ts +5 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/docs/references/reference-migrations-upgrade-to-v1-client.md +0 -341
package/dist/index.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export type { GetMetricTimeSeriesResponse } from './types.js';
|
|
|
16
16
|
export type { AggregateTracesArgs, AggregateTracesResponse, AggregateSpansArgs, AggregateSpansResponse, TraceAggregateDiscovery, GetTraceQueryFieldsArgs, GetTraceQueryFieldsResponse, GetTraceQueryValuesArgs, GetTraceQueryValuesResponse, TraceQueryCanonicalFieldDescriptor, TraceQueryGroupResponse, TraceQueryKeysetTraceResponse, TraceQueryObservedFieldDescriptor, TraceQueryOperator, TraceQueryPredicateScope, TraceQueryResponse, TraceQueryTraceResponse, TraceQueryValueKind, } from './resources/observability-route-types.js';
|
|
17
17
|
export type { Body, Client, ClientMethod, ClientPath, ClientRequest, ClientResponse, ClientResponseKind, ClientRoute, PathParams, QueryParams, RouteKey, RouteRequest, RouteResponse, RouteResponseType, RouteTypes, } from './route-types.generated.js';
|
|
18
18
|
export type { SignalWriteOptions } from './resources/signal-writes.js';
|
|
19
|
-
export type { CreateFeedbackBody, CreateFeedbackResponse, CreateScoreBody, CreateScoreResponse, ReplaceFeedbackBody, } from './resources/observability-route-types.js';
|
|
19
|
+
export type { CreateFeedbackBody, CreateFeedbackResponse, CreateScoreBody, CreateScoreResponse, DeleteFeedbackResponse, DeleteScoresResponse, DeleteTracesResponse, ReplaceFeedbackBody, } from './resources/observability-route-types.js';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,kCAAkC,EAClC,wBAAwB,EACxB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,qBA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Z,UAAU,EACV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,UAAU,GACX,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,kCAAkC,EAClC,wBAAwB,EACxB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACvG,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,sCAAsC,EACtC,2BAA2B,EAC3B,UAAU,EACV,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,YAAY,EAAE,s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/index.js
CHANGED
|
@@ -1315,11 +1315,13 @@ async function executeClientToolWithObservability({ clientTool, args, toolName,
|
|
|
1315
1315
|
}
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
|
-
async function executeToolCallAndRespond({ response, params, agentId, resourceId, threadId, requestContext, respondFn }) {
|
|
1318
|
+
async function executeToolCallAndRespond({ response, params, agentId, resourceId, threadId, requestContext, respondFn, abortSignal }) {
|
|
1319
1319
|
if (response.finishReason === "tool-calls") {
|
|
1320
1320
|
const toolCalls = response.toolCalls;
|
|
1321
1321
|
if (!toolCalls || !Array.isArray(toolCalls)) return response;
|
|
1322
|
+
const toolResults = [];
|
|
1322
1323
|
for (const toolCall of toolCalls) {
|
|
1324
|
+
if (abortSignal?.aborted) throw abortSignal.reason ?? new DOMException("This operation was aborted", "AbortError");
|
|
1323
1325
|
const clientTool = params.clientTools?.[toolCall.payload.toolName];
|
|
1324
1326
|
if (clientTool && clientTool.execute) {
|
|
1325
1327
|
const { result, observability } = await executeClientToolWithObservability({
|
|
@@ -1349,19 +1351,22 @@ async function executeToolCallAndRespond({ response, params, agentId, resourceId
|
|
|
1349
1351
|
...modelOutput != null ? { providerOptions: { mastra: { modelOutput } } } : {}
|
|
1350
1352
|
};
|
|
1351
1353
|
if (observability) toolResultContent.__mastraObservability = observability;
|
|
1352
|
-
|
|
1353
|
-
role: "tool",
|
|
1354
|
-
content: [toolResultContent]
|
|
1355
|
-
}];
|
|
1356
|
-
const updatedMessages = threadId ? newMessages : [...Array.isArray(params.messages) ? params.messages : [], ...newMessages];
|
|
1357
|
-
const respondOptions = {
|
|
1358
|
-
...params,
|
|
1359
|
-
clientTools: params.clientToolsResolver?.() ?? params.clientTools
|
|
1360
|
-
};
|
|
1361
|
-
delete respondOptions.messages;
|
|
1362
|
-
return respondFn(updatedMessages, respondOptions);
|
|
1354
|
+
toolResults.push(toolResultContent);
|
|
1363
1355
|
}
|
|
1364
1356
|
}
|
|
1357
|
+
if (toolResults.length > 0) {
|
|
1358
|
+
const newMessages = [...response.response.messages || [], {
|
|
1359
|
+
role: "tool",
|
|
1360
|
+
content: toolResults
|
|
1361
|
+
}];
|
|
1362
|
+
const updatedMessages = threadId ? newMessages : [...Array.isArray(params.messages) ? params.messages : [], ...newMessages];
|
|
1363
|
+
const respondOptions = {
|
|
1364
|
+
...params,
|
|
1365
|
+
clientTools: params.clientToolsResolver?.() ?? params.clientTools
|
|
1366
|
+
};
|
|
1367
|
+
delete respondOptions.messages;
|
|
1368
|
+
return respondFn(updatedMessages, respondOptions);
|
|
1369
|
+
}
|
|
1365
1370
|
}
|
|
1366
1371
|
return response;
|
|
1367
1372
|
}
|
|
@@ -2058,7 +2063,9 @@ var Agent = class extends BaseResource {
|
|
|
2058
2063
|
if (abortSignal?.aborted) throw abortSignal.reason ?? new DOMException("This operation was aborted", "AbortError");
|
|
2059
2064
|
const toolCalls = response.toolCalls;
|
|
2060
2065
|
if (!toolCalls || !Array.isArray(toolCalls)) return response;
|
|
2066
|
+
const toolResults = [];
|
|
2061
2067
|
for (const toolCall of toolCalls) {
|
|
2068
|
+
if (abortSignal?.aborted) throw abortSignal.reason ?? new DOMException("This operation was aborted", "AbortError");
|
|
2062
2069
|
const clientTool = processedParams.clientTools?.[toolCall.toolName];
|
|
2063
2070
|
if (clientTool && clientTool.execute) {
|
|
2064
2071
|
const { result, observability } = await executeClientToolWithObservability({
|
|
@@ -2079,22 +2086,25 @@ var Agent = class extends BaseResource {
|
|
|
2079
2086
|
}
|
|
2080
2087
|
}
|
|
2081
2088
|
});
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
result,
|
|
2089
|
-
...observability ? { __mastraObservability: observability } : {}
|
|
2090
|
-
}]
|
|
2091
|
-
}];
|
|
2092
|
-
return this.generateLegacy({
|
|
2093
|
-
...params,
|
|
2094
|
-
messages: updatedMessages
|
|
2089
|
+
toolResults.push({
|
|
2090
|
+
type: "tool-result",
|
|
2091
|
+
toolCallId: toolCall.toolCallId,
|
|
2092
|
+
toolName: toolCall.toolName,
|
|
2093
|
+
result,
|
|
2094
|
+
...observability ? { __mastraObservability: observability } : {}
|
|
2095
2095
|
});
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
|
+
if (toolResults.length > 0) {
|
|
2099
|
+
const updatedMessages = [...response.response.messages, {
|
|
2100
|
+
role: "tool",
|
|
2101
|
+
content: toolResults
|
|
2102
|
+
}];
|
|
2103
|
+
return this.generateLegacy({
|
|
2104
|
+
...params,
|
|
2105
|
+
messages: updatedMessages
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2098
2108
|
}
|
|
2099
2109
|
return response;
|
|
2100
2110
|
}
|
|
@@ -2136,7 +2146,8 @@ var Agent = class extends BaseResource {
|
|
|
2136
2146
|
resourceId,
|
|
2137
2147
|
threadId,
|
|
2138
2148
|
requestContext,
|
|
2139
|
-
respondFn: this.generate.bind(this)
|
|
2149
|
+
respondFn: this.generate.bind(this),
|
|
2150
|
+
abortSignal
|
|
2140
2151
|
});
|
|
2141
2152
|
}
|
|
2142
2153
|
return response;
|
|
@@ -3224,20 +3235,27 @@ var Agent = class extends BaseResource {
|
|
|
3224
3235
|
* Use this to resume receiving events after a disconnection.
|
|
3225
3236
|
*
|
|
3226
3237
|
* @param params.runId - The run ID to observe
|
|
3227
|
-
* @param params.offset -
|
|
3238
|
+
* @param params.offset - Run-log position to resume from. Chunks from `observe()`, and from `stream()` on
|
|
3239
|
+
* durable and evented agents, carry an `index`; pass the `index + 1` of the last chunk that has one. Chunks without an `index`
|
|
3240
|
+
* (`abort` and structured-output `object` chunks) are skipped when choosing the offset. If omitted,
|
|
3241
|
+
* replays the chunks still cached for the run, or only live chunks if the server's transport can't replay.
|
|
3228
3242
|
* @returns Promise containing a streaming Response
|
|
3229
3243
|
*
|
|
3230
3244
|
* @example
|
|
3231
3245
|
* ```typescript
|
|
3232
|
-
*
|
|
3233
|
-
*
|
|
3234
|
-
*
|
|
3235
|
-
*
|
|
3236
|
-
*
|
|
3246
|
+
* const agent = client.getAgent('my-agent');
|
|
3247
|
+
* let offset = 0;
|
|
3248
|
+
* const trackOffset = async (chunk: { index?: number }) => {
|
|
3249
|
+
* if (chunk.index === undefined) return;
|
|
3250
|
+
* offset = chunk.index + 1;
|
|
3251
|
+
* };
|
|
3237
3252
|
*
|
|
3238
|
-
* await
|
|
3239
|
-
*
|
|
3240
|
-
*
|
|
3253
|
+
* const stream = await agent.stream(messages, { runId: 'run-123' });
|
|
3254
|
+
* await stream.processDataStream({ onChunk: trackOffset });
|
|
3255
|
+
*
|
|
3256
|
+
* // After a dropped connection, resume where the last indexed chunk left off
|
|
3257
|
+
* const response = await agent.observe({ runId: 'run-123', offset });
|
|
3258
|
+
* await response.processDataStream({ onChunk: trackOffset });
|
|
3241
3259
|
* ```
|
|
3242
3260
|
*/
|
|
3243
3261
|
async observe(params) {
|
|
@@ -5622,7 +5640,9 @@ var Observability = class extends BaseResource {
|
|
|
5622
5640
|
* On ClickHouse-backed stores, reads may briefly return deleted rows until
|
|
5623
5641
|
* the lightweight delete is fully applied.
|
|
5624
5642
|
* @param params - IDs of the traces to delete
|
|
5625
|
-
* @returns
|
|
5643
|
+
* @returns `{ success: true }` after OSS deletion, or `{ accepted: true }`
|
|
5644
|
+
* when a supporting Platform backend queues cleanup. Acceptance does not
|
|
5645
|
+
* mean records have disappeared from reads.
|
|
5626
5646
|
*/
|
|
5627
5647
|
deleteTraces(params) {
|
|
5628
5648
|
return this.request(`/observability/traces/delete`, {
|
|
@@ -5641,6 +5661,10 @@ var Observability = class extends BaseResource {
|
|
|
5641
5661
|
]);
|
|
5642
5662
|
return this.request(`/observability/logs${queryString ? `?${queryString}` : ""}`);
|
|
5643
5663
|
}
|
|
5664
|
+
/** Retrieves one score by ID; the response contains null when it is missing. */
|
|
5665
|
+
getScore(id) {
|
|
5666
|
+
return this.request(`/observability/scores/${encodeURIComponent(id)}`);
|
|
5667
|
+
}
|
|
5644
5668
|
/**
|
|
5645
5669
|
* Retrieves a paginated list of scores with optional filtering and sorting.
|
|
5646
5670
|
*/
|
|
@@ -5671,6 +5695,8 @@ var Observability = class extends BaseResource {
|
|
|
5671
5695
|
* Deletes score records by scoreId, optionally scoped to a tenant.
|
|
5672
5696
|
* Idempotent: deleting missing ids succeeds. Depending on the storage
|
|
5673
5697
|
* backend (e.g. ClickHouse), deletion may be eventually consistent.
|
|
5698
|
+
* A supporting Platform backend returns `{ accepted: true }` after queueing
|
|
5699
|
+
* cleanup; OSS returns `{ success: boolean }` after deletion.
|
|
5674
5700
|
*/
|
|
5675
5701
|
deleteScores(params) {
|
|
5676
5702
|
return this.request(`/observability/scores`, {
|
|
@@ -5714,6 +5740,10 @@ var Observability = class extends BaseResource {
|
|
|
5714
5740
|
body: params
|
|
5715
5741
|
});
|
|
5716
5742
|
}
|
|
5743
|
+
/** Retrieves one feedback by ID; the response contains null when it is missing. */
|
|
5744
|
+
getFeedback(id) {
|
|
5745
|
+
return this.request(`/observability/feedback/${encodeURIComponent(id)}`);
|
|
5746
|
+
}
|
|
5717
5747
|
/**
|
|
5718
5748
|
* Retrieves a paginated list of feedback with optional filtering and sorting.
|
|
5719
5749
|
*/
|
|
@@ -5755,6 +5785,8 @@ var Observability = class extends BaseResource {
|
|
|
5755
5785
|
* Deletes feedback records by feedbackId, optionally scoped to a tenant.
|
|
5756
5786
|
* Idempotent: deleting missing ids succeeds. Depending on the storage
|
|
5757
5787
|
* backend (e.g. ClickHouse), deletion may be eventually consistent.
|
|
5788
|
+
* A supporting Platform backend returns `{ accepted: true }` after queueing
|
|
5789
|
+
* cleanup; OSS returns `{ success: boolean }` after deletion.
|
|
5758
5790
|
*/
|
|
5759
5791
|
deleteFeedback(params) {
|
|
5760
5792
|
return this.request(`/observability/feedback`, {
|
|
@@ -8488,7 +8520,8 @@ var MastraClient = class extends BaseResource {
|
|
|
8488
8520
|
* Deletes traces by ID, cascading to all associated spans and trace-linked
|
|
8489
8521
|
* signal events (scores, feedback, metrics, logs). Signals without a trace ID
|
|
8490
8522
|
* are untouched. On ClickHouse-backed stores, reads may briefly return
|
|
8491
|
-
* deleted rows until the delete is fully applied.
|
|
8523
|
+
* deleted rows until the delete is fully applied. A supporting Platform backend
|
|
8524
|
+
* returns `{ accepted: true }` after queueing cleanup, before records disappear.
|
|
8492
8525
|
*/
|
|
8493
8526
|
deleteTraces(params) {
|
|
8494
8527
|
return this.observability.deleteTraces(params);
|
|
@@ -8501,6 +8534,10 @@ var MastraClient = class extends BaseResource {
|
|
|
8501
8534
|
listLogsVNext(params = {}) {
|
|
8502
8535
|
return this.observability.listLogs(params);
|
|
8503
8536
|
}
|
|
8537
|
+
/** Retrieves one score by ID; the response contains null when it is missing. */
|
|
8538
|
+
getScore(id) {
|
|
8539
|
+
return this.observability.getScore(id);
|
|
8540
|
+
}
|
|
8504
8541
|
/** Retrieves a paginated list of observability scores. */
|
|
8505
8542
|
listScores(params = {}) {
|
|
8506
8543
|
return this.observability.listScores(params);
|
|
@@ -8509,7 +8546,10 @@ var MastraClient = class extends BaseResource {
|
|
|
8509
8546
|
createScore(params, options) {
|
|
8510
8547
|
return this.observability.createScore(params, options);
|
|
8511
8548
|
}
|
|
8512
|
-
/**
|
|
8549
|
+
/**
|
|
8550
|
+
* Deletes score records by scoreId, optionally scoped to a tenant.
|
|
8551
|
+
* Returns OSS success or Platform acceptance; accepted cleanup is asynchronous.
|
|
8552
|
+
*/
|
|
8513
8553
|
deleteScores(params) {
|
|
8514
8554
|
return this.observability.deleteScores(params);
|
|
8515
8555
|
}
|
|
@@ -8529,6 +8569,10 @@ var MastraClient = class extends BaseResource {
|
|
|
8529
8569
|
getScorePercentiles(params) {
|
|
8530
8570
|
return this.observability.getScorePercentiles(params);
|
|
8531
8571
|
}
|
|
8572
|
+
/** Retrieves one feedback by ID; the response contains null when it is missing. */
|
|
8573
|
+
getFeedback(id) {
|
|
8574
|
+
return this.observability.getFeedback(id);
|
|
8575
|
+
}
|
|
8532
8576
|
/** Retrieves a paginated list of feedback records. */
|
|
8533
8577
|
listFeedback(params = {}) {
|
|
8534
8578
|
return this.observability.listFeedback(params);
|
|
@@ -8541,7 +8585,10 @@ var MastraClient = class extends BaseResource {
|
|
|
8541
8585
|
replaceFeedback(params, options) {
|
|
8542
8586
|
return this.observability.replaceFeedback(params, options);
|
|
8543
8587
|
}
|
|
8544
|
-
/**
|
|
8588
|
+
/**
|
|
8589
|
+
* Deletes feedback records by feedbackId, optionally scoped to a tenant.
|
|
8590
|
+
* Returns OSS success or Platform acceptance; accepted cleanup is asynchronous.
|
|
8591
|
+
*/
|
|
8545
8592
|
deleteFeedback(params) {
|
|
8546
8593
|
return this.observability.deleteFeedback(params);
|
|
8547
8594
|
}
|
|
@@ -9316,6 +9363,7 @@ var MastraClient = class extends BaseResource {
|
|
|
9316
9363
|
if (options?.page !== void 0) searchParams.set("page", String(options.page));
|
|
9317
9364
|
if (options?.perPage !== void 0) searchParams.set("perPage", String(options.perPage));
|
|
9318
9365
|
for (const tag of options?.tags ?? []) searchParams.append("tags", tag);
|
|
9366
|
+
if (options?.status) searchParams.set("status", options.status);
|
|
9319
9367
|
if (options?.orderBy) {
|
|
9320
9368
|
searchParams.set("orderBy[field]", options.orderBy.field);
|
|
9321
9369
|
searchParams.set("orderBy[direction]", options.orderBy.direction);
|