@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.
- package/CHANGELOG.md +3375 -3
- package/LICENSE.md +15 -0
- package/README.md +11 -13
- package/dist/_types/@ai-sdk_ui-utils/dist/index.d.ts +820 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +10345 -0
- package/dist/client.d.ts +397 -75
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/SKILL.md +44 -0
- package/dist/docs/assets/SOURCE_MAP.json +6 -0
- package/dist/docs/references/docs-server-auth-auth0.md +220 -0
- package/dist/docs/references/docs-server-auth-clerk.md +132 -0
- package/dist/docs/references/docs-server-auth-firebase.md +272 -0
- package/dist/docs/references/docs-server-auth-jwt.md +110 -0
- package/dist/docs/references/docs-server-auth-supabase.md +117 -0
- package/dist/docs/references/docs-server-auth-workos.md +186 -0
- package/dist/docs/references/docs-server-mastra-client.md +243 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +231 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v4-messages.md +79 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v5-messages.md +76 -0
- package/dist/docs/references/reference-client-js-agents.md +437 -0
- package/dist/docs/references/reference-client-js-error-handling.md +16 -0
- package/dist/docs/references/reference-client-js-logs.md +24 -0
- package/dist/docs/references/reference-client-js-mastra-client.md +63 -0
- package/dist/docs/references/reference-client-js-memory.md +221 -0
- package/dist/docs/references/reference-client-js-observability.md +72 -0
- package/dist/docs/references/reference-client-js-telemetry.md +20 -0
- package/dist/docs/references/reference-client-js-tools.md +44 -0
- package/dist/docs/references/reference-client-js-vectors.md +79 -0
- package/dist/docs/references/reference-client-js-workflows.md +199 -0
- package/dist/index.cjs +4575 -1896
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4875 -2193
- package/dist/index.js.map +1 -1
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/resources/agent-builder.d.ts +55 -62
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +89 -51
- 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/index.d.ts +9 -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 +31 -16
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +62 -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/run.d.ts +210 -0
- package/dist/resources/run.d.ts.map +1 -0
- package/dist/resources/stored-agent.d.ts +83 -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 +30 -0
- package/dist/resources/stored-skill.d.ts.map +1 -0
- package/dist/resources/tool-provider.d.ts +27 -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 +5 -5
- 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 +125 -0
- package/dist/resources/workspace.d.ts.map +1 -0
- package/dist/tools.d.ts +2 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +1673 -146
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +56 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts +1 -1
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema.d.ts +9 -1
- package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
- package/package.json +20 -18
- package/dist/resources/network-memory-thread.d.ts +0 -47
- 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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;;;;;OAKG;IACH,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,kCAAkC,CAAC;IAS9C;;;;;OAKG;IACH,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC,0BAA0B,CAAC;IAStC;;;;;OAKG;IACH,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,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":[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E,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"}
|
package/dist/resources/tool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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
|
|
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(
|
|
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
|
-
|
|
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 {
|
|
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
|
|
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,
|
|
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
|
|
24
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
25
25
|
* @returns Promise containing array of index names
|
|
26
26
|
*/
|
|
27
|
-
getIndexes(
|
|
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,E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cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAMlH;;;;OAIG;IACH,MAAM,CAAC,SAAS,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 {
|
|
2
|
-
import type {
|
|
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
|
|
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(
|
|
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
|
|
17
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
26
18
|
* @returns Promise containing workflow runs array
|
|
27
19
|
*/
|
|
28
|
-
runs(params?:
|
|
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
|
|
33
|
-
* @
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param runId - The ID of the workflow run to
|
|
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
|
-
|
|
40
|
+
deleteRunById(runId: string): Promise<{
|
|
49
41
|
message: string;
|
|
50
42
|
}>;
|
|
51
43
|
/**
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
|
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
|
-
|
|
56
|
+
createRun(params?: {
|
|
258
57
|
runId?: string;
|
|
259
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/resources/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAQlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAI5B,qBAAa,QAAS,SAAQ,YAAY;IAGtC,OAAO,CAAC,UAAU;gBADlB,OAAO,EAAE,aAAa,EACd,UAAU,EAAE,MAAM;IAK5B;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI5F;;;;;OAKG;IACH,IAAI,CACF,MAAM,CAAC,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM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