@mastra/client-js 0.0.0-error-handler-fix-20251020202607 → 0.0.0-execa-dynamic-import-20260304221256

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +3375 -3
  2. package/LICENSE.md +15 -0
  3. package/README.md +11 -13
  4. package/dist/_types/@ai-sdk_ui-utils/dist/index.d.ts +820 -0
  5. package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +10345 -0
  6. package/dist/client.d.ts +397 -75
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/docs/SKILL.md +44 -0
  9. package/dist/docs/assets/SOURCE_MAP.json +6 -0
  10. package/dist/docs/references/docs-server-auth-auth0.md +220 -0
  11. package/dist/docs/references/docs-server-auth-clerk.md +132 -0
  12. package/dist/docs/references/docs-server-auth-firebase.md +272 -0
  13. package/dist/docs/references/docs-server-auth-jwt.md +110 -0
  14. package/dist/docs/references/docs-server-auth-supabase.md +117 -0
  15. package/dist/docs/references/docs-server-auth-workos.md +186 -0
  16. package/dist/docs/references/docs-server-mastra-client.md +243 -0
  17. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +231 -0
  18. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v4-messages.md +79 -0
  19. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v5-messages.md +76 -0
  20. package/dist/docs/references/reference-client-js-agents.md +437 -0
  21. package/dist/docs/references/reference-client-js-error-handling.md +16 -0
  22. package/dist/docs/references/reference-client-js-logs.md +24 -0
  23. package/dist/docs/references/reference-client-js-mastra-client.md +63 -0
  24. package/dist/docs/references/reference-client-js-memory.md +221 -0
  25. package/dist/docs/references/reference-client-js-observability.md +72 -0
  26. package/dist/docs/references/reference-client-js-telemetry.md +20 -0
  27. package/dist/docs/references/reference-client-js-tools.md +44 -0
  28. package/dist/docs/references/reference-client-js-vectors.md +79 -0
  29. package/dist/docs/references/reference-client-js-workflows.md +199 -0
  30. package/dist/index.cjs +4575 -1896
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +4875 -2193
  33. package/dist/index.js.map +1 -1
  34. package/dist/resources/a2a.d.ts.map +1 -1
  35. package/dist/resources/agent-builder.d.ts +55 -62
  36. package/dist/resources/agent-builder.d.ts.map +1 -1
  37. package/dist/resources/agent.d.ts +89 -51
  38. package/dist/resources/agent.d.ts.map +1 -1
  39. package/dist/resources/base.d.ts +2 -1
  40. package/dist/resources/base.d.ts.map +1 -1
  41. package/dist/resources/index.d.ts +9 -0
  42. package/dist/resources/index.d.ts.map +1 -1
  43. package/dist/resources/mcp-tool.d.ts +5 -5
  44. package/dist/resources/mcp-tool.d.ts.map +1 -1
  45. package/dist/resources/memory-thread.d.ts +31 -16
  46. package/dist/resources/memory-thread.d.ts.map +1 -1
  47. package/dist/resources/observability.d.ts +62 -19
  48. package/dist/resources/observability.d.ts.map +1 -1
  49. package/dist/resources/processor-provider.d.ts +15 -0
  50. package/dist/resources/processor-provider.d.ts.map +1 -0
  51. package/dist/resources/processor.d.ts +20 -0
  52. package/dist/resources/processor.d.ts.map +1 -0
  53. package/dist/resources/run.d.ts +210 -0
  54. package/dist/resources/run.d.ts.map +1 -0
  55. package/dist/resources/stored-agent.d.ts +83 -0
  56. package/dist/resources/stored-agent.d.ts.map +1 -0
  57. package/dist/resources/stored-mcp-client.d.ts +30 -0
  58. package/dist/resources/stored-mcp-client.d.ts.map +1 -0
  59. package/dist/resources/stored-prompt-block.d.ts +83 -0
  60. package/dist/resources/stored-prompt-block.d.ts.map +1 -0
  61. package/dist/resources/stored-scorer.d.ts +83 -0
  62. package/dist/resources/stored-scorer.d.ts.map +1 -0
  63. package/dist/resources/stored-skill.d.ts +30 -0
  64. package/dist/resources/stored-skill.d.ts.map +1 -0
  65. package/dist/resources/tool-provider.d.ts +27 -0
  66. package/dist/resources/tool-provider.d.ts.map +1 -0
  67. package/dist/resources/tool.d.ts +4 -4
  68. package/dist/resources/vector.d.ts +5 -5
  69. package/dist/resources/vector.d.ts.map +1 -1
  70. package/dist/resources/workflow.d.ts +32 -231
  71. package/dist/resources/workflow.d.ts.map +1 -1
  72. package/dist/resources/workspace.d.ts +125 -0
  73. package/dist/resources/workspace.d.ts.map +1 -0
  74. package/dist/tools.d.ts +2 -2
  75. package/dist/tools.d.ts.map +1 -1
  76. package/dist/types.d.ts +1673 -146
  77. package/dist/types.d.ts.map +1 -1
  78. package/dist/utils/index.d.ts +56 -4
  79. package/dist/utils/index.d.ts.map +1 -1
  80. package/dist/utils/process-mastra-stream.d.ts +1 -1
  81. package/dist/utils/process-mastra-stream.d.ts.map +1 -1
  82. package/dist/utils/zod-to-json-schema.d.ts +9 -1
  83. package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
  84. package/package.json +20 -18
  85. package/dist/resources/network-memory-thread.d.ts +0 -47
  86. package/dist/resources/network-memory-thread.d.ts.map +0 -1
@@ -0,0 +1,83 @@
1
+ import type { RequestContext } from '@mastra/core/request-context';
2
+ import type { ClientOptions, StoredPromptBlockResponse, UpdateStoredPromptBlockParams, DeleteStoredPromptBlockResponse, PromptBlockVersionResponse, ListPromptBlockVersionsParams, ListPromptBlockVersionsResponse, CreatePromptBlockVersionParams, ActivatePromptBlockVersionResponse, CompareVersionsResponse, DeletePromptBlockVersionResponse } from '../types.js';
3
+ import { BaseResource } from './base.js';
4
+ /**
5
+ * Resource for interacting with a specific stored prompt block
6
+ */
7
+ export declare class StoredPromptBlock extends BaseResource {
8
+ private storedPromptBlockId;
9
+ constructor(options: ClientOptions, storedPromptBlockId: string);
10
+ /**
11
+ * Retrieves details about the stored prompt block
12
+ * @param requestContext - Optional request context to pass as query parameter
13
+ * @param options - Optional options like status filter
14
+ * @returns Promise containing stored prompt block details
15
+ */
16
+ details(requestContext?: RequestContext | Record<string, any>, options?: {
17
+ status?: 'draft' | 'published' | 'archived';
18
+ }): Promise<StoredPromptBlockResponse>;
19
+ /**
20
+ * Updates the stored prompt block with the provided fields
21
+ * @param params - Fields to update
22
+ * @param requestContext - Optional request context to pass as query parameter
23
+ * @returns Promise containing the updated stored prompt block
24
+ */
25
+ update(params: UpdateStoredPromptBlockParams, requestContext?: RequestContext | Record<string, any>): Promise<StoredPromptBlockResponse>;
26
+ /**
27
+ * Deletes the stored prompt block
28
+ * @param requestContext - Optional request context to pass as query parameter
29
+ * @returns Promise containing deletion confirmation
30
+ */
31
+ delete(requestContext?: RequestContext | Record<string, any>): Promise<DeleteStoredPromptBlockResponse>;
32
+ /**
33
+ * Lists all versions for this stored prompt block
34
+ * @param params - Optional pagination and sorting parameters
35
+ * @param requestContext - Optional request context to pass as query parameter
36
+ * @returns Promise containing paginated list of versions
37
+ */
38
+ listVersions(params?: ListPromptBlockVersionsParams, requestContext?: RequestContext | Record<string, any>): Promise<ListPromptBlockVersionsResponse>;
39
+ /**
40
+ * Creates a new version snapshot for this stored prompt block
41
+ * @param params - Optional name and change message for the version
42
+ * @param requestContext - Optional request context to pass as query parameter
43
+ * @returns Promise containing the created version
44
+ */
45
+ createVersion(params?: CreatePromptBlockVersionParams, requestContext?: RequestContext | Record<string, any>): Promise<PromptBlockVersionResponse>;
46
+ /**
47
+ * Retrieves a specific version by its ID
48
+ * @param versionId - The UUID of the version to retrieve
49
+ * @param requestContext - Optional request context to pass as query parameter
50
+ * @returns Promise containing the version details
51
+ */
52
+ getVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<PromptBlockVersionResponse>;
53
+ /**
54
+ * Activates a specific version, making it the active version for this prompt block
55
+ * @param versionId - The UUID of the version to activate
56
+ * @param requestContext - Optional request context to pass as query parameter
57
+ * @returns Promise containing activation confirmation with success status, message, and active version ID
58
+ */
59
+ activateVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<ActivatePromptBlockVersionResponse>;
60
+ /**
61
+ * Restores a version by creating a new version with the same configuration
62
+ * @param versionId - The UUID of the version to restore
63
+ * @param requestContext - Optional request context to pass as query parameter
64
+ * @returns Promise containing the newly created version
65
+ */
66
+ restoreVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<PromptBlockVersionResponse>;
67
+ /**
68
+ * Deletes a specific version
69
+ * @param versionId - The UUID of the version to delete
70
+ * @param requestContext - Optional request context to pass as query parameter
71
+ * @returns Promise that resolves with deletion response
72
+ */
73
+ deleteVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<DeletePromptBlockVersionResponse>;
74
+ /**
75
+ * Compares two versions and returns their differences
76
+ * @param fromId - The UUID of the source version
77
+ * @param toId - The UUID of the target version
78
+ * @param requestContext - Optional request context to pass as query parameter
79
+ * @returns Promise containing the comparison results
80
+ */
81
+ compareVersions(fromId: string, toId: string, requestContext?: RequestContext | Record<string, any>): Promise<CompareVersionsResponse>;
82
+ }
83
+ //# sourceMappingURL=stored-prompt-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stored-prompt-block.d.ts","sourceRoot":"","sources":["../../src/resources/stored-prompt-block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EACV,aAAa,EACb,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAC/B,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,EAC9B,kCAAkC,EAClC,uBAAuB,EACvB,gCAAgC,EACjC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAG/C,OAAO,CAAC,mBAAmB;gBAD3B,OAAO,EAAE,aAAa,EACd,mBAAmB,EAAE,MAAM;IAKrC;;;;;OAKG;IACH,OAAO,CACL,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAA;K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,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,gCAAgC,CAAC;IAS5C;;;;;;OAMG;IACH,eAAe,CACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,uBAAuB,CAAC;CAUpC"}
@@ -0,0 +1,83 @@
1
+ import type { RequestContext } from '@mastra/core/request-context';
2
+ import type { ClientOptions, StoredScorerResponse, UpdateStoredScorerParams, DeleteStoredScorerResponse, ScorerVersionResponse, ListScorerVersionsParams, ListScorerVersionsResponse, CreateScorerVersionParams, ActivateScorerVersionResponse, CompareScorerVersionsResponse, DeleteScorerVersionResponse } from '../types.js';
3
+ import { BaseResource } from './base.js';
4
+ /**
5
+ * Resource for interacting with a specific stored scorer definition
6
+ */
7
+ export declare class StoredScorer extends BaseResource {
8
+ private storedScorerId;
9
+ constructor(options: ClientOptions, storedScorerId: string);
10
+ /**
11
+ * Retrieves details about the stored scorer definition
12
+ * @param requestContext - Optional request context to pass as query parameter
13
+ * @param options - Optional options like status filter
14
+ * @returns Promise containing stored scorer definition details
15
+ */
16
+ details(requestContext?: RequestContext | Record<string, any>, options?: {
17
+ status?: 'draft' | 'published' | 'archived';
18
+ }): Promise<StoredScorerResponse>;
19
+ /**
20
+ * Updates the stored scorer definition with the provided fields
21
+ * @param params - Fields to update
22
+ * @param requestContext - Optional request context to pass as query parameter
23
+ * @returns Promise containing the updated stored scorer definition
24
+ */
25
+ update(params: UpdateStoredScorerParams, requestContext?: RequestContext | Record<string, any>): Promise<StoredScorerResponse>;
26
+ /**
27
+ * Deletes the stored scorer definition
28
+ * @param requestContext - Optional request context to pass as query parameter
29
+ * @returns Promise containing deletion confirmation
30
+ */
31
+ delete(requestContext?: RequestContext | Record<string, any>): Promise<DeleteStoredScorerResponse>;
32
+ /**
33
+ * Lists all versions for this stored scorer
34
+ * @param params - Optional pagination and sorting parameters
35
+ * @param requestContext - Optional request context to pass as query parameter
36
+ * @returns Promise containing paginated list of versions
37
+ */
38
+ listVersions(params?: ListScorerVersionsParams, requestContext?: RequestContext | Record<string, any>): Promise<ListScorerVersionsResponse>;
39
+ /**
40
+ * Creates a new version snapshot for this stored scorer
41
+ * @param params - Optional change message for the version
42
+ * @param requestContext - Optional request context to pass as query parameter
43
+ * @returns Promise containing the created version
44
+ */
45
+ createVersion(params?: CreateScorerVersionParams, requestContext?: RequestContext | Record<string, any>): Promise<ScorerVersionResponse>;
46
+ /**
47
+ * Retrieves a specific version by its ID
48
+ * @param versionId - The UUID of the version to retrieve
49
+ * @param requestContext - Optional request context to pass as query parameter
50
+ * @returns Promise containing the version details
51
+ */
52
+ getVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<ScorerVersionResponse>;
53
+ /**
54
+ * Activates a specific version, making it the active version for this scorer
55
+ * @param versionId - The UUID of the version to activate
56
+ * @param requestContext - Optional request context to pass as query parameter
57
+ * @returns Promise containing activation confirmation
58
+ */
59
+ activateVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<ActivateScorerVersionResponse>;
60
+ /**
61
+ * Restores a version by creating a new version with the same configuration
62
+ * @param versionId - The UUID of the version to restore
63
+ * @param requestContext - Optional request context to pass as query parameter
64
+ * @returns Promise containing the newly created version
65
+ */
66
+ restoreVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<ScorerVersionResponse>;
67
+ /**
68
+ * Deletes a specific version
69
+ * @param versionId - The UUID of the version to delete
70
+ * @param requestContext - Optional request context to pass as query parameter
71
+ * @returns Promise that resolves with deletion response
72
+ */
73
+ deleteVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<DeleteScorerVersionResponse>;
74
+ /**
75
+ * Compares two versions and returns their differences
76
+ * @param fromId - The UUID of the source version
77
+ * @param toId - The UUID of the target version
78
+ * @param requestContext - Optional request context to pass as query parameter
79
+ * @returns Promise containing the comparison results
80
+ */
81
+ compareVersions(fromId: string, toId: string, requestContext?: RequestContext | Record<string, any>): Promise<CompareScorerVersionsResponse>;
82
+ }
83
+ //# sourceMappingURL=stored-scorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stored-scorer.d.ts","sourceRoot":"","sources":["../../src/resources/stored-scorer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,cAAc;gBADtB,OAAO,EAAE,aAAa,EACd,cAAc,EAAE,MAAM;IAKhC;;;;;OAKG;IACH,OAAO,CACL,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAA;KAAE,GACxD,OAAO,CAAC,oBAAoB,CAAC;IAQhC;;;;;OAKG;IACH,MAAM,CACJ,MAAM,EAAE,wBAAwB,EAChC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,oBAAoB,CAAC;IAUhC;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAalG;;;;;OAKG;IACH,YAAY,CACV,MAAM,CAAC,EAAE,wBAAwB,EACjC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,0BAA0B,CAAC;IActC;;;;;OAKG;IACH,aAAa,CACX,MAAM,CAAC,EAAE,yBAAyB,EAClC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,qBAAqB,CAAC;IAUjC;;;;;OAKG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAMpH;;;;;OAKG;IACH,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,6BAA6B,CAAC;IASzC;;;;;OAKG;IACH,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,qBAAqB,CAAC;IASjC;;;;;OAKG;IACH,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,2BAA2B,CAAC;IASvC;;;;;;OAMG;IACH,eAAe,CACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,6BAA6B,CAAC;CAU1C"}
@@ -0,0 +1,30 @@
1
+ import type { RequestContext } from '@mastra/core/request-context';
2
+ import type { ClientOptions, StoredSkillResponse, UpdateStoredSkillParams, DeleteStoredSkillResponse } from '../types.js';
3
+ import { BaseResource } from './base.js';
4
+ /**
5
+ * Resource for interacting with a specific stored skill
6
+ */
7
+ export declare class StoredSkill extends BaseResource {
8
+ private storedSkillId;
9
+ constructor(options: ClientOptions, storedSkillId: string);
10
+ /**
11
+ * Retrieves details about the stored skill
12
+ * @param requestContext - Optional request context to pass as query parameter
13
+ * @returns Promise containing stored skill details
14
+ */
15
+ details(requestContext?: RequestContext | Record<string, any>): Promise<StoredSkillResponse>;
16
+ /**
17
+ * Updates the stored skill with the provided fields
18
+ * @param params - Fields to update
19
+ * @param requestContext - Optional request context to pass as query parameter
20
+ * @returns Promise containing the updated stored skill
21
+ */
22
+ update(params: UpdateStoredSkillParams, requestContext?: RequestContext | Record<string, any>): Promise<StoredSkillResponse>;
23
+ /**
24
+ * Deletes the stored skill
25
+ * @param requestContext - Optional request context to pass as query parameter
26
+ * @returns Promise containing deletion confirmation
27
+ */
28
+ delete(requestContext?: RequestContext | Record<string, any>): Promise<DeleteStoredSkillResponse>;
29
+ }
30
+ //# sourceMappingURL=stored-skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stored-skill.d.ts","sourceRoot":"","sources":["../../src/resources/stored-skill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGvH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAGzC,OAAO,CAAC,aAAa;gBADrB,OAAO,EAAE,aAAa,EACd,aAAa,EAAE,MAAM;IAK/B;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAM5F;;;;;OAKG;IACH,MAAM,CACJ,MAAM,EAAE,uBAAuB,EAC/B,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,mBAAmB,CAAC;IAU/B;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAQlG"}
@@ -0,0 +1,27 @@
1
+ import type { ClientOptions, ListToolProviderToolkitsResponse, ListToolProviderToolsParams, ListToolProviderToolsResponse, GetToolProviderToolSchemaResponse } from '../types.js';
2
+ import { BaseResource } from './base.js';
3
+ /**
4
+ * Resource for interacting with a specific tool provider
5
+ */
6
+ export declare class ToolProvider extends BaseResource {
7
+ private providerId;
8
+ constructor(options: ClientOptions, providerId: string);
9
+ /**
10
+ * Lists available toolkits from this provider
11
+ * @returns Promise containing list of toolkits
12
+ */
13
+ listToolkits(): Promise<ListToolProviderToolkitsResponse>;
14
+ /**
15
+ * Lists available tools from this provider, with optional filtering
16
+ * @param params - Optional filtering and pagination parameters
17
+ * @returns Promise containing list of tools
18
+ */
19
+ listTools(params?: ListToolProviderToolsParams): Promise<ListToolProviderToolsResponse>;
20
+ /**
21
+ * Gets the input schema for a specific tool
22
+ * @param toolSlug - The slug of the tool
23
+ * @returns Promise containing the tool's JSON schema
24
+ */
25
+ getToolSchema(toolSlug: string): Promise<GetToolProviderToolSchemaResponse>;
26
+ }
27
+ //# sourceMappingURL=tool-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-provider.d.ts","sourceRoot":"","sources":["../../src/resources/tool-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gCAAgC,EAChC,2BAA2B,EAC3B,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,UAAU;gBADlB,OAAO,EAAE,aAAa,EACd,UAAU,EAAE,MAAM;IAK5B;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,gCAAgC,CAAC;IAIzD;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAsBvF;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iCAAiC,CAAC;CAK5E"}
@@ -1,4 +1,4 @@
1
- import type { RuntimeContext } from '@mastra/core/runtime-context';
1
+ import type { RequestContext } from '@mastra/core/request-context';
2
2
  import type { GetToolResponse, ClientOptions } from '../types.js';
3
3
  import { BaseResource } from './base.js';
4
4
  export declare class Tool extends BaseResource {
@@ -6,10 +6,10 @@ export declare class Tool extends BaseResource {
6
6
  constructor(options: ClientOptions, toolId: string);
7
7
  /**
8
8
  * Retrieves details about the tool
9
- * @param runtimeContext - Optional runtime context to pass as query parameter
9
+ * @param requestContext - Optional request context to pass as query parameter
10
10
  * @returns Promise containing tool details including description and schemas
11
11
  */
12
- details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetToolResponse>;
12
+ details(requestContext?: RequestContext | Record<string, any>): Promise<GetToolResponse>;
13
13
  /**
14
14
  * Executes the tool with the provided parameters
15
15
  * @param params - Parameters required for tool execution
@@ -18,7 +18,7 @@ export declare class Tool extends BaseResource {
18
18
  execute(params: {
19
19
  data: any;
20
20
  runId?: string;
21
- runtimeContext?: RuntimeContext | Record<string, any>;
21
+ requestContext?: RequestContext | Record<string, any>;
22
22
  }): Promise<any>;
23
23
  }
24
24
  //# sourceMappingURL=tool.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { RuntimeContext } from '@mastra/core/runtime-context';
1
+ import type { RequestContext } from '@mastra/core/request-context';
2
2
  import type { CreateIndexParams, GetVectorIndexResponse, QueryVectorParams, QueryVectorResponse, ClientOptions, UpsertVectorParams } from '../types.js';
3
3
  import { BaseResource } from './base.js';
4
4
  export declare class Vector extends BaseResource {
@@ -7,10 +7,10 @@ export declare class Vector extends BaseResource {
7
7
  /**
8
8
  * Retrieves details about a specific vector index
9
9
  * @param indexName - Name of the index to get details for
10
- * @param runtimeContext - Optional runtime context to pass as query parameter
10
+ * @param requestContext - Optional request context to pass as query parameter
11
11
  * @returns Promise containing vector index details
12
12
  */
13
- details(indexName: string, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetVectorIndexResponse>;
13
+ details(indexName: string, requestContext?: RequestContext | Record<string, any>): Promise<GetVectorIndexResponse>;
14
14
  /**
15
15
  * Deletes a vector index
16
16
  * @param indexName - Name of the index to delete
@@ -21,10 +21,10 @@ export declare class Vector extends BaseResource {
21
21
  }>;
22
22
  /**
23
23
  * Retrieves a list of all available indexes
24
- * @param runtimeContext - Optional runtime context to pass as query parameter
24
+ * @param requestContext - Optional request context to pass as query parameter
25
25
  * @returns Promise containing array of index names
26
26
  */
27
- getIndexes(runtimeContext?: RuntimeContext | Record<string, any>): Promise<{
27
+ getIndexes(requestContext?: RequestContext | Record<string, any>): Promise<{
28
28
  indexes: string[];
29
29
  }>;
30
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../src/resources/vector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,MAAO,SAAQ,YAAY;IAGpC,OAAO,CAAC,UAAU;gBADlB,OAAO,EAAE,aAAa,EACd,UAAU,EAAE,MAAM;IAK5B;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE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EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAMxD;;;;OAIG;IACH,UAAU,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAMjG;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAOrE;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAOrD;;;;OAIG;IACH,KAAK,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAM/D"}
@@ -1,262 +1,63 @@
1
- import type { TracingOptions } from '@mastra/core/ai-tracing';
2
- import type { RuntimeContext } from '@mastra/core/runtime-context';
3
- import type { ClientOptions, GetWorkflowResponse, GetWorkflowRunsResponse, GetWorkflowRunsParams, WorkflowRunResult, WorkflowWatchResult, GetWorkflowRunByIdResponse, GetWorkflowRunExecutionResultResponse, StreamVNextChunkType } from '../types.js';
1
+ import type { RequestContext } from '@mastra/core/request-context';
2
+ import type { ClientOptions, GetWorkflowResponse, ListWorkflowRunsResponse, ListWorkflowRunsParams, GetWorkflowRunByIdResponse } from '../types.js';
4
3
  import { BaseResource } from './base.js';
4
+ import { Run } from './run.js';
5
5
  export declare class Workflow extends BaseResource {
6
6
  private workflowId;
7
7
  constructor(options: ClientOptions, workflowId: string);
8
- /**
9
- * Creates an async generator that processes a readable stream and yields workflow records
10
- * separated by the Record Separator character (\x1E)
11
- *
12
- * @param stream - The readable stream to process
13
- * @returns An async generator that yields parsed records
14
- */
15
- private streamProcessor;
16
8
  /**
17
9
  * Retrieves details about the workflow
18
- * @param runtimeContext - Optional runtime context to pass as query parameter
10
+ * @param requestContext - Optional request context to pass as query parameter
19
11
  * @returns Promise containing workflow details including steps and graphs
20
12
  */
21
- details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetWorkflowResponse>;
13
+ details(requestContext?: RequestContext | Record<string, any>): Promise<GetWorkflowResponse>;
22
14
  /**
23
15
  * Retrieves all runs for a workflow
24
16
  * @param params - Parameters for filtering runs
25
- * @param runtimeContext - Optional runtime context to pass as query parameter
17
+ * @param requestContext - Optional request context to pass as query parameter
26
18
  * @returns Promise containing workflow runs array
27
19
  */
28
- runs(params?: GetWorkflowRunsParams, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetWorkflowRunsResponse>;
20
+ runs(params?: ListWorkflowRunsParams, requestContext?: RequestContext | Record<string, any>): Promise<ListWorkflowRunsResponse>;
29
21
  /**
30
22
  * Retrieves a specific workflow run by its ID
31
23
  * @param runId - The ID of the workflow run to retrieve
32
- * @param runtimeContext - Optional runtime context to pass as query parameter
33
- * @returns Promise containing the workflow run details
34
- */
35
- runById(runId: string, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetWorkflowRunByIdResponse>;
36
- /**
37
- * Retrieves the execution result for a specific workflow run by its ID
38
- * @param runId - The ID of the workflow run to retrieve the execution result for
39
- * @param runtimeContext - Optional runtime context to pass as query parameter
40
- * @returns Promise containing the workflow run execution result
41
- */
42
- runExecutionResult(runId: string, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetWorkflowRunExecutionResultResponse>;
43
- /**
44
- * Cancels a specific workflow run by its ID
45
- * @param runId - The ID of the workflow run to cancel
24
+ * @param options - Optional configuration
25
+ * @param options.requestContext - Optional request context to pass as query parameter
26
+ * @param options.fields - Optional array of fields to return (e.g., ['result', 'steps']). Available fields: result, error, payload, steps, activeStepsPath, serializedStepGraph. Metadata fields (runId, workflowName, resourceId, createdAt, updatedAt) and status are always included.
27
+ * @param options.withNestedWorkflows - Whether to include nested workflow data in steps. Defaults to true. Set to false for better performance when you don't need nested workflow details.
28
+ * @returns Promise containing the workflow run details with metadata and processed execution state
29
+ */
30
+ runById(runId: string, options?: {
31
+ requestContext?: RequestContext | Record<string, any>;
32
+ fields?: string[];
33
+ withNestedWorkflows?: boolean;
34
+ }): Promise<GetWorkflowRunByIdResponse>;
35
+ /**
36
+ * Deletes a specific workflow run by its ID
37
+ * @param runId - The ID of the workflow run to delete
46
38
  * @returns Promise containing a success message
47
39
  */
48
- cancelRun(runId: string): Promise<{
40
+ deleteRunById(runId: string): Promise<{
49
41
  message: string;
50
42
  }>;
51
43
  /**
52
- * Sends an event to a specific workflow run by its ID
53
- * @param params - Object containing the runId, event and data
54
- * @returns Promise containing a success message
44
+ * Retrieves the input/output schema for the workflow
45
+ * @returns Promise containing parsed inputSchema and outputSchema, or null if not defined
55
46
  */
56
- sendRunEvent(params: {
57
- runId: string;
58
- event: string;
59
- data: unknown;
60
- }): Promise<{
61
- message: string;
62
- }>;
63
- /**
64
- * @deprecated Use createRunAsync() instead.
65
- * @throws {Error} Always throws an error directing users to use createRunAsync()
66
- */
67
- createRun(_params?: {
68
- runId?: string;
69
- }): Promise<{
70
- runId: string;
71
- start: (params: {
72
- inputData: Record<string, any>;
73
- runtimeContext?: RuntimeContext | Record<string, any>;
74
- }) => Promise<{
75
- message: string;
76
- }>;
77
- watch: (onRecord: (record: WorkflowWatchResult) => void) => Promise<void>;
78
- resume: (params: {
79
- step: string | string[];
80
- resumeData?: Record<string, any>;
81
- runtimeContext?: RuntimeContext | Record<string, any>;
82
- }) => Promise<{
83
- message: string;
84
- }>;
85
- stream: (params: {
86
- inputData: Record<string, any>;
87
- runtimeContext?: RuntimeContext | Record<string, any>;
88
- }) => Promise<ReadableStream>;
89
- startAsync: (params: {
90
- inputData: Record<string, any>;
91
- runtimeContext?: RuntimeContext | Record<string, any>;
92
- }) => Promise<WorkflowRunResult>;
93
- resumeAsync: (params: {
94
- step: string | string[];
95
- resumeData?: Record<string, any>;
96
- runtimeContext?: RuntimeContext | Record<string, any>;
97
- }) => Promise<WorkflowRunResult>;
47
+ getSchema(): Promise<{
48
+ inputSchema: Record<string, unknown> | null;
49
+ outputSchema: Record<string, unknown> | null;
98
50
  }>;
99
51
  /**
100
52
  * Creates a new workflow run
101
53
  * @param params - Optional object containing the optional runId
102
- * @returns Promise containing the runId of the created run with methods to control execution
103
- */
104
- createRunAsync(params?: {
105
- runId?: string;
106
- }): Promise<{
107
- runId: string;
108
- start: (params: {
109
- inputData: Record<string, any>;
110
- runtimeContext?: RuntimeContext | Record<string, any>;
111
- tracingOptions?: TracingOptions;
112
- }) => Promise<{
113
- message: string;
114
- }>;
115
- watch: (onRecord: (record: WorkflowWatchResult) => void) => Promise<void>;
116
- resume: (params: {
117
- step: string | string[];
118
- resumeData?: Record<string, any>;
119
- runtimeContext?: RuntimeContext | Record<string, any>;
120
- tracingOptions?: TracingOptions;
121
- }) => Promise<{
122
- message: string;
123
- }>;
124
- stream: (params: {
125
- inputData: Record<string, any>;
126
- runtimeContext?: RuntimeContext | Record<string, any>;
127
- }) => Promise<ReadableStream>;
128
- startAsync: (params: {
129
- inputData: Record<string, any>;
130
- runtimeContext?: RuntimeContext | Record<string, any>;
131
- tracingOptions?: TracingOptions;
132
- }) => Promise<WorkflowRunResult>;
133
- resumeAsync: (params: {
134
- step: string | string[];
135
- resumeData?: Record<string, any>;
136
- runtimeContext?: RuntimeContext | Record<string, any>;
137
- tracingOptions?: TracingOptions;
138
- }) => Promise<WorkflowRunResult>;
139
- resumeStreamVNext: (params: {
140
- step: string | string[];
141
- resumeData?: Record<string, any>;
142
- runtimeContext?: RuntimeContext | Record<string, any>;
143
- }) => Promise<ReadableStream>;
144
- }>;
145
- /**
146
- * Starts a workflow run synchronously without waiting for the workflow to complete
147
- * @param params - Object containing the runId, inputData and runtimeContext
148
- * @returns Promise containing success message
149
- */
150
- start(params: {
151
- runId: string;
152
- inputData: Record<string, any>;
153
- runtimeContext?: RuntimeContext | Record<string, any>;
154
- tracingOptions?: TracingOptions;
155
- }): Promise<{
156
- message: string;
157
- }>;
158
- /**
159
- * Resumes a suspended workflow step synchronously without waiting for the workflow to complete
160
- * @param params - Object containing the runId, step, resumeData and runtimeContext
161
- * @returns Promise containing success message
162
- */
163
- resume({ step, runId, resumeData, tracingOptions, ...rest }: {
164
- step: string | string[];
165
- runId: string;
166
- resumeData?: Record<string, any>;
167
- runtimeContext?: RuntimeContext | Record<string, any>;
168
- tracingOptions?: TracingOptions;
169
- }): Promise<{
170
- message: string;
171
- }>;
172
- /**
173
- * Starts a workflow run asynchronously and returns a promise that resolves when the workflow is complete
174
- * @param params - Object containing the optional runId, inputData and runtimeContext
175
- * @returns Promise containing the workflow execution results
176
- */
177
- startAsync(params: {
178
- runId?: string;
179
- inputData: Record<string, any>;
180
- runtimeContext?: RuntimeContext | Record<string, any>;
181
- tracingOptions?: TracingOptions;
182
- }): Promise<WorkflowRunResult>;
183
- /**
184
- * Starts a workflow run and returns a stream
185
- * @param params - Object containing the optional runId, inputData and runtimeContext
186
- * @returns Promise containing the workflow execution results
187
- */
188
- stream(params: {
189
- runId?: string;
190
- inputData: Record<string, any>;
191
- runtimeContext?: RuntimeContext | Record<string, any>;
192
- tracingOptions?: TracingOptions;
193
- }): Promise<import("stream/web").ReadableStream<{
194
- type: string;
195
- payload: any;
196
- }>>;
197
- /**
198
- * Observes workflow stream for a workflow run
199
- * @param params - Object containing the runId
200
- * @returns Promise containing the workflow execution results
201
- */
202
- observeStream(params: {
203
- runId: string;
204
- }): Promise<import("stream/web").ReadableStream<{
205
- type: string;
206
- payload: any;
207
- }>>;
208
- /**
209
- * Starts a workflow run and returns a stream
210
- * @param params - Object containing the optional runId, inputData and runtimeContext
211
- * @returns Promise containing the workflow execution results
212
- */
213
- streamVNext(params: {
214
- runId?: string;
215
- inputData?: Record<string, any>;
216
- runtimeContext?: RuntimeContext;
217
- closeOnSuspend?: boolean;
218
- tracingOptions?: TracingOptions;
219
- }): Promise<import("stream/web").ReadableStream<StreamVNextChunkType>>;
220
- /**
221
- * Observes workflow vNext stream for a workflow run
222
- * @param params - Object containing the runId
223
- * @returns Promise containing the workflow execution results
224
- */
225
- observeStreamVNext(params: {
226
- runId: string;
227
- }): Promise<import("stream/web").ReadableStream<StreamVNextChunkType>>;
228
- /**
229
- * Resumes a suspended workflow step asynchronously and returns a promise that resolves when the workflow is complete
230
- * @param params - Object containing the runId, step, resumeData and runtimeContext
231
- * @returns Promise containing the workflow resume results
232
- */
233
- resumeAsync(params: {
234
- runId: string;
235
- step: string | string[];
236
- resumeData?: Record<string, any>;
237
- runtimeContext?: RuntimeContext | Record<string, any>;
238
- tracingOptions?: TracingOptions;
239
- }): Promise<WorkflowRunResult>;
240
- /**
241
- * Resumes a suspended workflow step that uses streamVNext asynchronously and returns a promise that resolves when the workflow is complete
242
- * @param params - Object containing the runId, step, resumeData and runtimeContext
243
- * @returns Promise containing the workflow resume results
244
- */
245
- resumeStreamVNext(params: {
246
- runId: string;
247
- step: string | string[];
248
- resumeData?: Record<string, any>;
249
- runtimeContext?: RuntimeContext | Record<string, any>;
250
- tracingOptions?: TracingOptions;
251
- }): Promise<ReadableStream>;
252
- /**
253
- * Watches workflow transitions in real-time
254
- * @param runId - Optional run ID to filter the watch stream
255
- * @returns AsyncGenerator that yields parsed records from the workflow watch stream
54
+ * @returns Promise containing the Run instance
256
55
  */
257
- watch({ runId }: {
56
+ createRun(params?: {
258
57
  runId?: string;
259
- }, onRecord: (record: WorkflowWatchResult) => void): Promise<void>;
58
+ resourceId?: string;
59
+ disableScorers?: boolean;
60
+ }): Promise<Run>;
260
61
  /**
261
62
  * Creates a new ReadableStream from an iterable or async iterable of objects,
262
63
  * serializing each as JSON and separating them with the record separator (\x1E).
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/resources/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,K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