@mastra/claude 1.0.0 → 1.0.1-alpha.1
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/package.json +8 -6
- package/src/Claude.test.ts +7 -18
- package/src/assets/claude.png +0 -0
- package/src/client/index.ts +4 -0
- package/src/client/schemas.gen.ts +1182 -0
- package/src/client/service-comments.ts +14 -0
- package/src/client/services.gen.ts +63 -0
- package/src/client/types.gen.ts +933 -0
- package/src/client/zodSchema.ts +337 -0
- package/src/index.ts +43 -52
- package/src/assets/claude.svg +0 -64
- package/src/openapi-components.ts +0 -467
- package/src/openapi-paths.ts +0 -85
- package/src/openapi.ts +0 -286
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/claude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/
|
|
6
|
+
"module": "dist/claude.esm.js",
|
|
7
7
|
"typings": "dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=20
|
|
18
|
+
"node": ">=20"
|
|
19
19
|
},
|
|
20
20
|
"size-limit": [
|
|
21
21
|
{
|
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
"author": "",
|
|
48
48
|
"license": "ISC",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"
|
|
50
|
+
"@hey-api/client-fetch": "^0.3.3",
|
|
51
51
|
"zod": "^3.23.8",
|
|
52
|
-
"
|
|
52
|
+
"ts-to-zod": "^3.13.0",
|
|
53
|
+
"@mastra/core": "^0.1.27-alpha.22"
|
|
53
54
|
},
|
|
54
55
|
"scripts": {
|
|
55
56
|
"analyze": "size-limit --why",
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"size": "size-limit",
|
|
60
61
|
"start": "dts watch",
|
|
61
62
|
"test": "jest",
|
|
62
|
-
"
|
|
63
|
+
"clean": "rm -rf dist && rm -rf node_modules",
|
|
64
|
+
"gen:zod:schema": "pnpx ts-to-zod src/client/types.gen.ts src/client/zodSchema.ts"
|
|
63
65
|
}
|
|
64
66
|
}
|
package/src/Claude.test.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
beforeAll,
|
|
5
5
|
afterAll, //expect
|
|
6
6
|
} from '@jest/globals';
|
|
7
|
-
import {
|
|
7
|
+
import { Mastra } from '@mastra/core';
|
|
8
8
|
|
|
9
9
|
import { ClaudeIntegration } from '.';
|
|
10
10
|
|
|
@@ -14,13 +14,13 @@ const connectionId = process.env.CONNECTION_ID!;
|
|
|
14
14
|
|
|
15
15
|
const integrationName = 'CLAUDE';
|
|
16
16
|
|
|
17
|
-
const integrationFramework =
|
|
17
|
+
const integrationFramework = Mastra.init({
|
|
18
18
|
name: 'TestFramework',
|
|
19
19
|
integrations: [new ClaudeIntegration()],
|
|
20
20
|
workflows: {
|
|
21
21
|
systemApis: [],
|
|
22
|
-
systemEvents: {},
|
|
23
22
|
blueprintDirPath: '',
|
|
23
|
+
systemEvents: {},
|
|
24
24
|
},
|
|
25
25
|
db: {
|
|
26
26
|
provider: 'postgres',
|
|
@@ -30,7 +30,7 @@ const integrationFramework = Framework.init({
|
|
|
30
30
|
routeRegistrationPath: '/api/mastra',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
const integration = integrationFramework.getIntegration(integrationName) as ClaudeIntegration
|
|
33
|
+
//const integration = integrationFramework.getIntegration(integrationName) as ClaudeIntegration
|
|
34
34
|
|
|
35
35
|
describe('claude', () => {
|
|
36
36
|
beforeAll(async () => {
|
|
@@ -47,20 +47,9 @@ describe('claude', () => {
|
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
it('should 200 on some apis', async () => {
|
|
50
|
-
const client = await integration.getApiClient({ connectionId });
|
|
51
|
-
const response = await client['/
|
|
52
|
-
|
|
53
|
-
prompt: 'test',
|
|
54
|
-
model: 'gpt-3.5-turbo',
|
|
55
|
-
temperature: null,
|
|
56
|
-
top_k: null,
|
|
57
|
-
top_p: null,
|
|
58
|
-
max_tokens_to_sample: null,
|
|
59
|
-
stream: {},
|
|
60
|
-
stop_sequences: null,
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
expect(response.status).toBe(200);
|
|
50
|
+
//const client = await integration.getApiClient({ connectionId });
|
|
51
|
+
//const response = await client['/2010-04-01/Accounts.json'].get();
|
|
52
|
+
//expect(response.status).toBe(200);
|
|
64
53
|
});
|
|
65
54
|
|
|
66
55
|
afterAll(async () => {
|
|
Binary file
|