@mastra/client-js 0.0.0-error-handler-fix-20251020202607 → 0.0.0-esbuild-bundle-worker-20260807182016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9405 -3
- package/LICENSE.md +15 -0
- package/README.md +11 -13
- package/dist/_types/@ai-sdk_provider/dist/index.d.ts +1587 -0
- package/dist/_types/@ai-sdk_provider-utils/dist/index.d.ts +379 -0
- package/dist/_types/@ai-sdk_ui-utils/dist/index.d.ts +820 -0
- package/dist/agent-learning.d.ts +182 -0
- package/dist/agent-learning.d.ts.map +1 -0
- package/dist/client.d.ts +767 -80
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/SKILL.md +52 -0
- package/dist/docs/assets/SOURCE_MAP.json +6 -0
- package/dist/docs/references/docs-agents-a2a.md +340 -0
- package/dist/docs/references/docs-editor-overview.md +349 -0
- package/dist/docs/references/docs-long-running-agents-schedules.md +201 -0
- package/dist/docs/references/docs-long-running-agents-signals.md +426 -0
- package/dist/docs/references/docs-server-auth-auth0.md +262 -0
- package/dist/docs/references/docs-server-auth-clerk.md +154 -0
- package/dist/docs/references/docs-server-auth-firebase.md +294 -0
- package/dist/docs/references/docs-server-auth-jwt.md +116 -0
- package/dist/docs/references/docs-server-auth-supabase.md +139 -0
- package/dist/docs/references/docs-server-auth-workos.md +271 -0
- package/dist/docs/references/docs-server-mastra-client.md +323 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-messages.md +97 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +282 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v4-messages.md +81 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v5-messages.md +78 -0
- package/dist/docs/references/reference-client-js-agents.md +959 -0
- package/dist/docs/references/reference-client-js-conversations.md +137 -0
- package/dist/docs/references/reference-client-js-error-handling.md +18 -0
- package/dist/docs/references/reference-client-js-logs.md +26 -0
- package/dist/docs/references/reference-client-js-mastra-client.md +96 -0
- package/dist/docs/references/reference-client-js-memory.md +237 -0
- package/dist/docs/references/reference-client-js-observability.md +183 -0
- package/dist/docs/references/reference-client-js-responses.md +219 -0
- package/dist/docs/references/reference-client-js-telemetry.md +22 -0
- package/dist/docs/references/reference-client-js-tools.md +46 -0
- package/dist/docs/references/reference-client-js-vectors.md +81 -0
- package/dist/docs/references/reference-client-js-workflows.md +393 -0
- package/dist/docs/references/reference-editor-versioning.md +130 -0
- package/dist/index.cjs +7638 -3257
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7606 -3252
- package/dist/index.js.map +1 -1
- package/dist/observability/collector.d.ts +45 -0
- package/dist/observability/collector.d.ts.map +1 -0
- package/dist/observability/index.d.ts +14 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/types.d.ts +27 -0
- package/dist/observability/types.d.ts.map +1 -0
- package/dist/resources/a2a.d.ts +80 -11
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/resources/agent-builder.d.ts +57 -72
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent-controller.d.ts +589 -0
- package/dist/resources/agent-controller.d.ts.map +1 -0
- package/dist/resources/agent.d.ts +368 -59
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/base.d.ts +2 -1
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/channels.d.ts +63 -0
- package/dist/resources/channels.d.ts.map +1 -0
- package/dist/resources/conversations.d.ts +15 -0
- package/dist/resources/conversations.d.ts.map +1 -0
- package/dist/resources/index.d.ts +14 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/mcp-tool.d.ts +5 -5
- package/dist/resources/mcp-tool.d.ts.map +1 -1
- package/dist/resources/memory-thread.d.ts +51 -16
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +222 -19
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/processor-provider.d.ts +15 -0
- package/dist/resources/processor-provider.d.ts.map +1 -0
- package/dist/resources/processor.d.ts +20 -0
- package/dist/resources/processor.d.ts.map +1 -0
- package/dist/resources/responses.d.ts +22 -0
- package/dist/resources/responses.d.ts.map +1 -0
- package/dist/resources/run.d.ts +256 -0
- package/dist/resources/run.d.ts.map +1 -0
- package/dist/resources/stored-agent.d.ts +112 -0
- package/dist/resources/stored-agent.d.ts.map +1 -0
- package/dist/resources/stored-mcp-client.d.ts +30 -0
- package/dist/resources/stored-mcp-client.d.ts.map +1 -0
- package/dist/resources/stored-prompt-block.d.ts +83 -0
- package/dist/resources/stored-prompt-block.d.ts.map +1 -0
- package/dist/resources/stored-scorer.d.ts +83 -0
- package/dist/resources/stored-scorer.d.ts.map +1 -0
- package/dist/resources/stored-skill.d.ts +40 -0
- package/dist/resources/stored-skill.d.ts.map +1 -0
- package/dist/resources/stored-workflow.d.ts +18 -0
- package/dist/resources/stored-workflow.d.ts.map +1 -0
- package/dist/resources/tool-provider.d.ts +80 -0
- package/dist/resources/tool-provider.d.ts.map +1 -0
- package/dist/resources/tool.d.ts +4 -4
- package/dist/resources/vector.d.ts +9 -9
- package/dist/resources/vector.d.ts.map +1 -1
- package/dist/resources/workflow.d.ts +32 -231
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/resources/workspace.d.ts +129 -0
- package/dist/resources/workspace.d.ts.map +1 -0
- package/dist/route-types.generated.d.ts +18087 -0
- package/dist/route-types.generated.d.ts.map +1 -0
- package/dist/tools.d.ts +3 -6
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +2740 -197
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/client-tool-model-output.d.ts +16 -0
- package/dist/utils/client-tool-model-output.d.ts.map +1 -0
- package/dist/utils/index.d.ts +65 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/process-a2a-stream.d.ts +4 -0
- package/dist/utils/process-a2a-stream.d.ts.map +1 -0
- package/dist/utils/process-client-tools.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts +8 -7
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/dist/utils/stream-transforms.d.ts +9 -0
- package/dist/utils/stream-transforms.d.ts.map +1 -0
- package/dist/utils/verify-agent-card-signature.d.ts +21 -0
- package/dist/utils/verify-agent-card-signature.d.ts.map +1 -0
- package/dist/utils/zod-to-json-schema.d.ts +11 -2
- package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
- package/package.json +26 -19
- package/dist/resources/network-memory-thread.d.ts +0 -47
- package/dist/resources/network-memory-thread.d.ts.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
|
+
import type { ClientOptions, Conversation, ConversationDeleted, ConversationItemsPage, CreateConversationParams } from '../types.js';
|
|
3
|
+
import { BaseResource } from './base.js';
|
|
4
|
+
export declare class ConversationItems extends BaseResource {
|
|
5
|
+
constructor(options: ClientOptions);
|
|
6
|
+
list(conversationId: string, requestContext?: RequestContext | Record<string, any>): Promise<ConversationItemsPage>;
|
|
7
|
+
}
|
|
8
|
+
export declare class Conversations extends BaseResource {
|
|
9
|
+
readonly items: ConversationItems;
|
|
10
|
+
constructor(options: ClientOptions);
|
|
11
|
+
create(params: CreateConversationParams): Promise<Conversation>;
|
|
12
|
+
retrieve(conversationId: string, requestContext?: RequestContext | Record<string, any>): Promise<Conversation>;
|
|
13
|
+
delete(conversationId: string, requestContext?: RequestContext | Record<string, any>): Promise<ConversationDeleted>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/resources/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,iBAAkB,SAAQ,YAAY;gBACrC,OAAO,EAAE,aAAa;IAIlC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAKpH;AAED,qBAAa,aAAc,SAAQ,YAAY;IAC7C,SAAgB,KAAK,EAAE,iBAAiB,CAAC;gBAE7B,OAAO,EAAE,aAAa;IAKlC,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC;IAQ/D,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAM9G,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAQpH"}
|
|
@@ -2,10 +2,24 @@ export * from './agent.js';
|
|
|
2
2
|
export * from './memory-thread.js';
|
|
3
3
|
export * from './vector.js';
|
|
4
4
|
export * from './tool.js';
|
|
5
|
+
export * from './processor.js';
|
|
5
6
|
export * from './base.js';
|
|
7
|
+
export * from './conversations.js';
|
|
6
8
|
export * from './workflow.js';
|
|
7
9
|
export * from './a2a.js';
|
|
8
10
|
export * from './mcp-tool.js';
|
|
9
11
|
export * from './agent-builder.js';
|
|
10
12
|
export * from './observability.js';
|
|
13
|
+
export * from './stored-agent.js';
|
|
14
|
+
export * from './stored-workflow.js';
|
|
15
|
+
export * from './stored-prompt-block.js';
|
|
16
|
+
export * from './stored-mcp-client.js';
|
|
17
|
+
export * from './stored-scorer.js';
|
|
18
|
+
export * from './tool-provider.js';
|
|
19
|
+
export * from './processor-provider.js';
|
|
20
|
+
export * from './workspace.js';
|
|
21
|
+
export * from './stored-skill.js';
|
|
22
|
+
export * from './responses.js';
|
|
23
|
+
export * from './channels.js';
|
|
24
|
+
export * from './agent-controller.js';
|
|
11
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
2
|
import type { ClientOptions, McpToolInfo } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
/**
|
|
@@ -11,18 +11,18 @@ export declare class MCPTool extends BaseResource {
|
|
|
11
11
|
constructor(options: ClientOptions, serverId: string, toolId: string);
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves details about this specific tool from the MCP server.
|
|
14
|
-
* @param
|
|
14
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
15
15
|
* @returns Promise containing the tool's information (name, description, schema).
|
|
16
16
|
*/
|
|
17
|
-
details(
|
|
17
|
+
details(requestContext?: RequestContext | Record<string, any>): Promise<McpToolInfo>;
|
|
18
18
|
/**
|
|
19
19
|
* Executes this specific tool on the MCP server.
|
|
20
|
-
* @param params - Parameters for tool execution, including data/args and optional
|
|
20
|
+
* @param params - Parameters for tool execution, including data/args and optional requestContext.
|
|
21
21
|
* @returns Promise containing the result of the tool execution.
|
|
22
22
|
*/
|
|
23
23
|
execute(params: {
|
|
24
24
|
data?: any;
|
|
25
|
-
|
|
25
|
+
requestContext?: RequestContext;
|
|
26
26
|
}): Promise<any>;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=mcp-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-tool.d.ts","sourceRoot":"","sources":["../../src/resources/mcp-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMpE;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-tool.d.ts","sourceRoot":"","sources":["../../src/resources/mcp-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMpE;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAMpF;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAU/E"}
|
|
@@ -1,53 +1,88 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
1
2
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
2
|
-
import type {
|
|
3
|
+
import type { ClientOptions, UpdateMemoryThreadParams, ListMemoryThreadMessagesParams, ListMemoryThreadMessagesResponse, CloneMemoryThreadParams, CloneMemoryThreadResponse } from '../types.js';
|
|
3
4
|
import { BaseResource } from './base.js';
|
|
5
|
+
/**
|
|
6
|
+
* MemoryThread resource for interacting with memory threads.
|
|
7
|
+
*
|
|
8
|
+
* `agentId` is optional for read operations (`get`, `listMessages`) — when omitted the server
|
|
9
|
+
* falls back to the global storage. It is required by the server for write operations
|
|
10
|
+
* (`update`, `delete`, `deleteMessages`, `clone`) because the server needs to resolve which
|
|
11
|
+
* agent's memory pipeline to invoke. Pass `agentId` either on the constructor (via
|
|
12
|
+
* `MastraClient.getMemoryThread({ threadId, agentId })`) or on the per-method params.
|
|
13
|
+
*/
|
|
4
14
|
export declare class MemoryThread extends BaseResource {
|
|
5
15
|
private threadId;
|
|
6
|
-
private agentId
|
|
7
|
-
constructor(options: ClientOptions, threadId: string, agentId
|
|
16
|
+
private agentId?;
|
|
17
|
+
constructor(options: ClientOptions, threadId: string, agentId?: string | undefined);
|
|
18
|
+
/**
|
|
19
|
+
* Builds the query string for agentId (if provided)
|
|
20
|
+
*/
|
|
21
|
+
private getAgentIdQueryParam;
|
|
22
|
+
/**
|
|
23
|
+
* Resolves the agentId to use for a write request. Prefers the per-call value, falls back
|
|
24
|
+
* to the constructor value, and throws if neither is set.
|
|
25
|
+
*/
|
|
26
|
+
private requireAgentId;
|
|
8
27
|
/**
|
|
9
28
|
* Retrieves the memory thread details
|
|
29
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
10
30
|
* @returns Promise containing thread details including title and metadata
|
|
11
31
|
*/
|
|
12
|
-
get(): Promise<StorageThreadType>;
|
|
32
|
+
get(requestContext?: RequestContext | Record<string, any>): Promise<StorageThreadType>;
|
|
13
33
|
/**
|
|
14
34
|
* Updates the memory thread properties
|
|
15
|
-
* @param params - Update parameters including title and
|
|
35
|
+
* @param params - Update parameters including title, metadata, and optional request context.
|
|
36
|
+
* `agentId` is required by the server; pass it here if not supplied on the constructor.
|
|
16
37
|
* @returns Promise containing updated thread details
|
|
17
38
|
*/
|
|
18
39
|
update(params: UpdateMemoryThreadParams): Promise<StorageThreadType>;
|
|
19
40
|
/**
|
|
20
41
|
* Deletes the memory thread
|
|
42
|
+
* @param opts - Optional `agentId` (required by the server when not supplied on the constructor)
|
|
43
|
+
* and request context.
|
|
21
44
|
* @returns Promise containing deletion result
|
|
22
45
|
*/
|
|
23
|
-
delete(
|
|
46
|
+
delete(opts?: {
|
|
47
|
+
agentId?: string;
|
|
48
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
49
|
+
}): Promise<{
|
|
24
50
|
result: string;
|
|
25
51
|
}>;
|
|
26
52
|
/**
|
|
27
|
-
* Retrieves messages associated with the thread
|
|
28
|
-
* @param params -
|
|
29
|
-
* @returns Promise containing thread messages and UI messages
|
|
30
|
-
*/
|
|
31
|
-
getMessages(params?: GetMemoryThreadMessagesParams): Promise<GetMemoryThreadMessagesResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Retrieves paginated messages associated with the thread with advanced filtering and selection options
|
|
34
|
-
* @param params - Pagination parameters including selectBy criteria, page, perPage, date ranges, and message inclusion options
|
|
53
|
+
* Retrieves paginated messages associated with the thread with filtering and ordering options
|
|
54
|
+
* @param params - Pagination parameters including page, perPage, orderBy, filter, include options, and request context
|
|
35
55
|
* @returns Promise containing paginated thread messages with pagination metadata (total, page, perPage, hasMore)
|
|
36
56
|
*/
|
|
37
|
-
|
|
57
|
+
listMessages(params?: ListMemoryThreadMessagesParams & {
|
|
58
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
59
|
+
}): Promise<ListMemoryThreadMessagesResponse>;
|
|
38
60
|
/**
|
|
39
61
|
* Deletes one or more messages from the thread
|
|
40
62
|
* @param messageIds - Can be a single message ID (string), array of message IDs,
|
|
41
63
|
* message object with id property, or array of message objects
|
|
64
|
+
* @param opts - Optional `agentId` (required by the server when not supplied on the constructor)
|
|
65
|
+
* and request context. For backwards compatibility a `RequestContext` may also be
|
|
66
|
+
* passed directly as the second argument.
|
|
42
67
|
* @returns Promise containing deletion result
|
|
43
68
|
*/
|
|
44
69
|
deleteMessages(messageIds: string | string[] | {
|
|
45
70
|
id: string;
|
|
46
71
|
} | {
|
|
47
72
|
id: string;
|
|
48
|
-
}[]
|
|
73
|
+
}[], opts?: {
|
|
74
|
+
agentId?: string;
|
|
75
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
76
|
+
} | RequestContext | Record<string, any>): Promise<{
|
|
49
77
|
success: boolean;
|
|
50
78
|
message: string;
|
|
51
79
|
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Clones the thread with all its messages to a new thread
|
|
82
|
+
* @param params - Clone parameters including optional new thread ID, title, metadata, and message filters.
|
|
83
|
+
* `agentId` is required by the server; pass it here if not supplied on the constructor.
|
|
84
|
+
* @returns Promise containing the cloned thread and copied messages
|
|
85
|
+
*/
|
|
86
|
+
clone(params?: CloneMemoryThreadParams): Promise<CloneMemoryThreadResponse>;
|
|
52
87
|
}
|
|
53
88
|
//# sourceMappingURL=memory-thread.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/memory-thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EACV
|
|
1
|
+
{"version":3,"file":"memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/memory-thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,8BAA8B,EAC9B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;;;;;GAQG;AACH,qBAAa,YAAa,SAAQ,YAAY;I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AAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAUjD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,GAAE,uBAA4B,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAUhF"}
|
|
@@ -1,35 +1,238 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ListScoresResponse, Trajectory } from '@mastra/core/evals';
|
|
2
|
+
import type { SpanType } from '@mastra/core/observability';
|
|
3
|
+
import type { TraceRecord, GetTraceLightResponse, GetSpanResponse, ListTracesArgs, ListTracesResponse, ListTracesLightResponse, ListBranchesArgs, ListBranchesResponse, GetBranchArgs, GetBranchResponse, SpanIds, PaginationArgs, SpanRecord, PaginationInfo, ScoreTracesRequest, ScoreTracesResponse, ListLogsArgs, ListLogsResponse, ListScoresArgs, ListScoresResponse as ListScoresResponseNew, CreateScoreBody, CreateScoreResponse, GetScoreAggregateArgs, GetScoreAggregateResponse, GetScoreBreakdownArgs, GetScoreBreakdownResponse, GetScoreTimeSeriesArgs, GetScoreTimeSeriesResponse, GetScorePercentilesArgs, GetScorePercentilesResponse, ListFeedbackArgs, ListFeedbackResponse, CreateFeedbackBody, CreateFeedbackResponse, GetFeedbackAggregateArgs, GetFeedbackAggregateResponse, GetFeedbackBreakdownArgs, GetFeedbackBreakdownResponse, GetFeedbackTimeSeriesArgs, GetFeedbackTimeSeriesResponse, GetFeedbackPercentilesArgs, GetFeedbackPercentilesResponse, GetMetricAggregateArgs, GetMetricAggregateResponse, GetMetricBreakdownArgs, GetMetricBreakdownResponse, GetMetricTimeSeriesArgs, GetMetricTimeSeriesResponse, GetMetricPercentilesArgs, GetMetricPercentilesResponse, GetMetricNamesArgs, GetMetricNamesResponse, GetMetricLabelKeysArgs, GetMetricLabelKeysResponse, GetMetricLabelValuesArgs, GetMetricLabelValuesResponse, GetEntityTypesResponse, GetEntityNamesArgs, GetEntityNamesResponse, GetServiceNamesResponse, GetEnvironmentsResponse, GetTagsArgs, GetTagsResponse } from '@mastra/core/storage';
|
|
4
|
+
import type { ClientOptions } from '../types.js';
|
|
3
5
|
import { BaseResource } from './base.js';
|
|
6
|
+
/**
|
|
7
|
+
* Legacy pagination arguments from main branch.
|
|
8
|
+
* @deprecated Use ListTracesArgs instead with the new listTraces() method.
|
|
9
|
+
*/
|
|
10
|
+
export interface LegacyPaginationArgs {
|
|
11
|
+
dateRange?: {
|
|
12
|
+
start?: Date;
|
|
13
|
+
end?: Date;
|
|
14
|
+
};
|
|
15
|
+
page?: number;
|
|
16
|
+
perPage?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Legacy traces query parameters from main branch.
|
|
20
|
+
* @deprecated Use ListTracesArgs instead with the new listTraces() method.
|
|
21
|
+
*/
|
|
22
|
+
export interface LegacyTracesPaginatedArg {
|
|
23
|
+
filters?: {
|
|
24
|
+
name?: string;
|
|
25
|
+
spanType?: SpanType;
|
|
26
|
+
entityId?: string;
|
|
27
|
+
entityType?: 'agent' | 'workflow';
|
|
28
|
+
};
|
|
29
|
+
pagination?: LegacyPaginationArgs;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Legacy response type from main branch.
|
|
33
|
+
* @deprecated Use ListTracesResponse instead.
|
|
34
|
+
*/
|
|
35
|
+
export interface LegacyGetTracesResponse {
|
|
36
|
+
spans: SpanRecord[];
|
|
37
|
+
pagination: PaginationInfo;
|
|
38
|
+
}
|
|
39
|
+
export type ListScoresBySpanParams = SpanIds & PaginationArgs;
|
|
40
|
+
/** Client resource for interacting with the Mastra observability API (traces, logs, scores, feedback, and metrics). */
|
|
4
41
|
export declare class Observability extends BaseResource {
|
|
5
42
|
constructor(options: ClientOptions);
|
|
6
43
|
/**
|
|
7
|
-
* Retrieves a specific
|
|
44
|
+
* Retrieves a specific trace by ID
|
|
8
45
|
* @param traceId - ID of the trace to retrieve
|
|
9
|
-
* @returns Promise containing the
|
|
46
|
+
* @returns Promise containing the trace with all its spans
|
|
47
|
+
*/
|
|
48
|
+
getTrace(traceId: string): Promise<TraceRecord>;
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves a lightweight trace by ID (timeline fields only).
|
|
51
|
+
* Excludes heavy fields (input, output, attributes, metadata, tags, links)
|
|
52
|
+
* for ~97% payload reduction compared to getTrace.
|
|
53
|
+
*
|
|
54
|
+
* @param traceId - ID of the trace to retrieve
|
|
55
|
+
* @returns Promise containing the trace with lightweight spans
|
|
56
|
+
*/
|
|
57
|
+
getTraceLight(traceId: string): Promise<GetTraceLightResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves a single span with full details by trace ID and span ID.
|
|
60
|
+
*
|
|
61
|
+
* @param traceId - ID of the trace containing the span
|
|
62
|
+
* @param spanId - ID of the span to retrieve
|
|
63
|
+
* @returns Promise containing the full span record
|
|
64
|
+
*/
|
|
65
|
+
getSpan(traceId: string, spanId: string): Promise<GetSpanResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Extracts a structured trajectory from a trace's spans.
|
|
68
|
+
*
|
|
69
|
+
* @param traceId - ID of the trace to extract trajectory from
|
|
70
|
+
* @returns Promise containing the trajectory with ordered steps
|
|
10
71
|
*/
|
|
11
|
-
|
|
72
|
+
getTraceTrajectory(traceId: string): Promise<Trajectory>;
|
|
12
73
|
/**
|
|
13
|
-
* Retrieves paginated list of
|
|
14
|
-
*
|
|
74
|
+
* Retrieves paginated list of traces with optional filtering.
|
|
75
|
+
* This is the legacy API preserved for backward compatibility.
|
|
76
|
+
*
|
|
77
|
+
* @param params - Parameters for pagination and filtering (legacy format)
|
|
15
78
|
* @returns Promise containing paginated traces and pagination info
|
|
79
|
+
* @deprecated Use {@link listTraces} instead for new features like ordering and more filters.
|
|
80
|
+
*/
|
|
81
|
+
getTraces(params: LegacyTracesPaginatedArg): Promise<LegacyGetTracesResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves paginated list of traces with optional filtering and sorting.
|
|
84
|
+
* This is the new API with improved filtering options.
|
|
85
|
+
*
|
|
86
|
+
* @param params - Parameters for pagination, filtering, and ordering
|
|
87
|
+
* @returns Promise containing paginated traces and pagination info
|
|
88
|
+
*/
|
|
89
|
+
listTraces(params?: ListTracesArgs): Promise<ListTracesResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Retrieves paginated list of traces carrying only the fields a trace list renders.
|
|
92
|
+
*
|
|
93
|
+
* Same filtering, ordering and delta-polling contract as {@link listTraces}, but rows
|
|
94
|
+
* omit the `attributes`/`input`/`output` blobs and carry a short `inputPreview`
|
|
95
|
+
* instead. Prefer this for list views and fetch the full record on selection.
|
|
96
|
+
*
|
|
97
|
+
* @param params - Parameters for pagination, filtering, and ordering
|
|
98
|
+
* @returns Promise containing paginated lightweight traces and pagination info
|
|
99
|
+
*/
|
|
100
|
+
listTracesLight(params?: ListTracesArgs): Promise<ListTracesLightResponse>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves a paginated list of trace branches with optional filtering and sorting.
|
|
103
|
+
*
|
|
104
|
+
* Each row is a single branch-anchor span (e.g., AGENT_RUN, WORKFLOW_RUN, TOOL_CALL),
|
|
105
|
+
* including ones nested under a different root entity. Use this to list every run of
|
|
106
|
+
* a given agent/workflow/tool regardless of how it was triggered. Pairs with
|
|
107
|
+
* {@link getBranch} to expand a single branch into its subtree.
|
|
108
|
+
*
|
|
109
|
+
* @param params - Parameters for pagination, filtering, and ordering
|
|
110
|
+
* @returns Promise containing paginated branch-anchor spans and pagination info
|
|
111
|
+
*/
|
|
112
|
+
listBranches(params?: ListBranchesArgs): Promise<ListBranchesResponse>;
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves the subtree of spans rooted at a given span.
|
|
115
|
+
*
|
|
116
|
+
* @param params - Parameters containing trace ID, span ID, and optional depth.
|
|
117
|
+
* When `depth` is omitted the full descendant subtree is returned; with a finite
|
|
118
|
+
* `depth` only that many levels below the anchor are returned (depth: 0 → only the
|
|
119
|
+
* anchor span; depth: 1 → anchor plus immediate children; etc).
|
|
120
|
+
* @returns Promise containing the branch (anchor span plus descendants)
|
|
16
121
|
*/
|
|
17
|
-
|
|
122
|
+
getBranch(params: GetBranchArgs): Promise<GetBranchResponse>;
|
|
18
123
|
/**
|
|
19
124
|
* Retrieves scores by trace ID and span ID
|
|
20
125
|
* @param params - Parameters containing trace ID, span ID, and pagination options
|
|
21
126
|
* @returns Promise containing scores and pagination info
|
|
22
127
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
128
|
+
listScoresBySpan(params: ListScoresBySpanParams): Promise<ListScoresResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* Scores one or more traces using a specified scorer.
|
|
131
|
+
* @param params - Scorer name and targets to score
|
|
132
|
+
* @returns Promise containing the scoring status
|
|
133
|
+
*/
|
|
134
|
+
score(params: ScoreTracesRequest): Promise<ScoreTracesResponse>;
|
|
135
|
+
/**
|
|
136
|
+
* Retrieves a paginated list of logs with optional filtering and sorting.
|
|
137
|
+
*/
|
|
138
|
+
listLogs(params?: ListLogsArgs): Promise<ListLogsResponse>;
|
|
139
|
+
/**
|
|
140
|
+
* Retrieves a paginated list of scores with optional filtering and sorting.
|
|
141
|
+
*/
|
|
142
|
+
listScores(params?: ListScoresArgs): Promise<ListScoresResponseNew>;
|
|
143
|
+
/**
|
|
144
|
+
* Creates a single score record in the observability store.
|
|
145
|
+
* Timestamp is set server-side.
|
|
146
|
+
*/
|
|
147
|
+
createScore(params: CreateScoreBody): Promise<CreateScoreResponse>;
|
|
148
|
+
/**
|
|
149
|
+
* Returns an aggregated score value with optional period-over-period comparison.
|
|
150
|
+
*/
|
|
151
|
+
getScoreAggregate(params: GetScoreAggregateArgs): Promise<GetScoreAggregateResponse>;
|
|
152
|
+
/**
|
|
153
|
+
* Returns score values grouped by specified dimensions.
|
|
154
|
+
*/
|
|
155
|
+
getScoreBreakdown(params: GetScoreBreakdownArgs): Promise<GetScoreBreakdownResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* Returns score values bucketed by time interval with optional grouping.
|
|
158
|
+
*/
|
|
159
|
+
getScoreTimeSeries(params: GetScoreTimeSeriesArgs): Promise<GetScoreTimeSeriesResponse>;
|
|
160
|
+
/**
|
|
161
|
+
* Returns percentile values for scores bucketed by time interval.
|
|
162
|
+
*/
|
|
163
|
+
getScorePercentiles(params: GetScorePercentilesArgs): Promise<GetScorePercentilesResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Retrieves a paginated list of feedback with optional filtering and sorting.
|
|
166
|
+
*/
|
|
167
|
+
listFeedback(params?: ListFeedbackArgs): Promise<ListFeedbackResponse>;
|
|
168
|
+
/**
|
|
169
|
+
* Creates a single feedback record in the observability store.
|
|
170
|
+
* Timestamp is set server-side.
|
|
171
|
+
*/
|
|
172
|
+
createFeedback(params: CreateFeedbackBody): Promise<CreateFeedbackResponse>;
|
|
173
|
+
/**
|
|
174
|
+
* Returns an aggregated feedback value with optional period-over-period comparison.
|
|
175
|
+
*/
|
|
176
|
+
getFeedbackAggregate(params: GetFeedbackAggregateArgs): Promise<GetFeedbackAggregateResponse>;
|
|
177
|
+
/**
|
|
178
|
+
* Returns feedback values grouped by specified dimensions.
|
|
179
|
+
*/
|
|
180
|
+
getFeedbackBreakdown(params: GetFeedbackBreakdownArgs): Promise<GetFeedbackBreakdownResponse>;
|
|
181
|
+
/**
|
|
182
|
+
* Returns feedback values bucketed by time interval with optional grouping.
|
|
183
|
+
*/
|
|
184
|
+
getFeedbackTimeSeries(params: GetFeedbackTimeSeriesArgs): Promise<GetFeedbackTimeSeriesResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Returns percentile values for feedback bucketed by time interval.
|
|
187
|
+
*/
|
|
188
|
+
getFeedbackPercentiles(params: GetFeedbackPercentilesArgs): Promise<GetFeedbackPercentilesResponse>;
|
|
189
|
+
/**
|
|
190
|
+
* Returns an aggregated metric value with optional period-over-period comparison.
|
|
191
|
+
*/
|
|
192
|
+
getMetricAggregate(params: GetMetricAggregateArgs): Promise<GetMetricAggregateResponse>;
|
|
193
|
+
/**
|
|
194
|
+
* Returns metric values grouped by specified dimensions.
|
|
195
|
+
*/
|
|
196
|
+
getMetricBreakdown(params: GetMetricBreakdownArgs): Promise<GetMetricBreakdownResponse>;
|
|
197
|
+
/**
|
|
198
|
+
* Returns metric values bucketed by time interval with optional grouping.
|
|
199
|
+
*/
|
|
200
|
+
getMetricTimeSeries(params: GetMetricTimeSeriesArgs): Promise<GetMetricTimeSeriesResponse>;
|
|
201
|
+
/**
|
|
202
|
+
* Returns percentile values for a metric bucketed by time interval.
|
|
203
|
+
*/
|
|
204
|
+
getMetricPercentiles(params: GetMetricPercentilesArgs): Promise<GetMetricPercentilesResponse>;
|
|
205
|
+
/**
|
|
206
|
+
* Returns distinct metric names with optional prefix filtering.
|
|
207
|
+
*/
|
|
208
|
+
getMetricNames(params?: GetMetricNamesArgs): Promise<GetMetricNamesResponse>;
|
|
209
|
+
/**
|
|
210
|
+
* Returns distinct label keys for a given metric.
|
|
211
|
+
*/
|
|
212
|
+
getMetricLabelKeys(params: GetMetricLabelKeysArgs): Promise<GetMetricLabelKeysResponse>;
|
|
213
|
+
/**
|
|
214
|
+
* Returns distinct values for a given metric label key.
|
|
215
|
+
*/
|
|
216
|
+
getMetricLabelValues(params: GetMetricLabelValuesArgs): Promise<GetMetricLabelValuesResponse>;
|
|
217
|
+
/**
|
|
218
|
+
* Returns distinct entity types from observability data.
|
|
219
|
+
*/
|
|
220
|
+
getEntityTypes(): Promise<GetEntityTypesResponse>;
|
|
221
|
+
/**
|
|
222
|
+
* Returns distinct entity names with optional type filtering.
|
|
223
|
+
*/
|
|
224
|
+
getEntityNames(params?: GetEntityNamesArgs): Promise<GetEntityNamesResponse>;
|
|
225
|
+
/**
|
|
226
|
+
* Returns distinct service names from observability data.
|
|
227
|
+
*/
|
|
228
|
+
getServiceNames(): Promise<GetServiceNamesResponse>;
|
|
229
|
+
/**
|
|
230
|
+
* Returns distinct environments from observability data.
|
|
231
|
+
*/
|
|
232
|
+
getEnvironments(): Promise<GetEnvironmentsResponse>;
|
|
233
|
+
/**
|
|
234
|
+
* Returns distinct tags with optional entity type filtering.
|
|
235
|
+
*/
|
|
236
|
+
getTags(params?: GetTagsArgs): Promise<GetTagsResponse>;
|
|
34
237
|
}
|
|
35
238
|
//# sourceMappingURL=observability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/resources/observability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/resources/observability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EAEnB,YAAY,EACZ,gBAAgB,EAEhB,cAAc,EACd,kBAAkB,IAAI,qBAAqB,EAC3C,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAE3B,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAE9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sBAAsB,CAAC;IAKhF;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAKvF;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAK7F;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAIjD;;OAEG;IACH,cAAc,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAKhF;;OAEG;IACH,eAAe,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAInD;;OAEG;IACH,eAAe,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAInD;;OAEG;IACH,OAAO,CAAC,MAAM,GAAE,WAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAI5D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ClientOptions, GetProcessorProviderResponse } from '../types.js';
|
|
2
|
+
import { BaseResource } from './base.js';
|
|
3
|
+
/**
|
|
4
|
+
* Resource for interacting with a specific processor provider
|
|
5
|
+
*/
|
|
6
|
+
export declare class ProcessorProvider extends BaseResource {
|
|
7
|
+
private providerId;
|
|
8
|
+
constructor(options: ClientOptions, providerId: string);
|
|
9
|
+
/**
|
|
10
|
+
* Gets details about this processor provider and its available processors
|
|
11
|
+
* @returns Promise containing provider info and processor list
|
|
12
|
+
*/
|
|
13
|
+
details(): Promise<GetProcessorProviderResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=processor-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processor-provider.d.ts","sourceRoot":"","sources":["../../src/resources/processor-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAG/C,OAAO,CAAC,UAAU;gBADlB,OAAO,EAAE,aAAa,EACd,UAAU,EAAE,MAAM;IAK5B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,4BAA4B,CAAC;CAGjD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
|
+
import type { ClientOptions, GetProcessorDetailResponse, ExecuteProcessorParams, ExecuteProcessorResponse } from '../types.js';
|
|
3
|
+
import { BaseResource } from './base.js';
|
|
4
|
+
export declare class Processor extends BaseResource {
|
|
5
|
+
private processorId;
|
|
6
|
+
constructor(options: ClientOptions, processorId: string);
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves details about the processor
|
|
9
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
10
|
+
* @returns Promise containing processor details including phases and configurations
|
|
11
|
+
*/
|
|
12
|
+
details(requestContext?: RequestContext | Record<string, any>): Promise<GetProcessorDetailResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Executes the processor with the provided parameters
|
|
15
|
+
* @param params - Parameters required for processor execution including phase and messages
|
|
16
|
+
* @returns Promise containing the processor execution results
|
|
17
|
+
*/
|
|
18
|
+
execute(params: ExecuteProcessorParams): Promise<ExecuteProcessorResponse>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/resources/processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,SAAU,SAAQ,YAAY;IAGvC,OAAO,CAAC,WAAW;gBADnB,OAAO,EAAE,aAAa,EACd,WAAW,EAAE,MAAM;IAK7B;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAInG;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAa3E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
|
+
import type { ClientOptions, CreateResponseParams, ResponsesDeleteResponse, ResponsesResponse, ResponsesStreamEvent } from '../types.js';
|
|
3
|
+
import { BaseResource } from './base.js';
|
|
4
|
+
export declare class ResponsesStream implements AsyncIterable<ResponsesStreamEvent> {
|
|
5
|
+
private response;
|
|
6
|
+
constructor(response: Response);
|
|
7
|
+
asResponse(): Response;
|
|
8
|
+
[Symbol.asyncIterator](): AsyncIterator<ResponsesStreamEvent>;
|
|
9
|
+
}
|
|
10
|
+
export declare class Responses extends BaseResource {
|
|
11
|
+
constructor(options: ClientOptions);
|
|
12
|
+
create(params: CreateResponseParams & {
|
|
13
|
+
stream: true;
|
|
14
|
+
}): Promise<ResponsesStream>;
|
|
15
|
+
create(params: CreateResponseParams & {
|
|
16
|
+
stream?: false | undefined;
|
|
17
|
+
}): Promise<ResponsesResponse>;
|
|
18
|
+
stream(params: Omit<CreateResponseParams, 'stream'>): Promise<ResponsesStream>;
|
|
19
|
+
retrieve(responseId: string, requestContext?: RequestContext | Record<string, any>): Promise<ResponsesResponse>;
|
|
20
|
+
delete(responseId: string, requestContext?: RequestContext | Record<string, any>): Promise<ResponsesDeleteResponse>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/resources/responses.ts"],"names":[],"mappings":"AAAA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