@lowdefy/server-dev 0.0.0-experimental-20251010122007 → 0.0.0-experimental-20251203145918

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "0.0.0-experimental-20251010122007",
3
+ "version": "0.0.0-experimental-20251203145918",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -26,7 +26,6 @@
26
26
  "url": "https://github.com/lowdefy/lowdefy.git"
27
27
  },
28
28
  "files": [
29
- "app/*",
30
29
  "lib/*",
31
30
  "manager/*",
32
31
  "pages/*",
@@ -37,37 +36,35 @@
37
36
  ".npmrc"
38
37
  ],
39
38
  "dependencies": {
40
- "@lowdefy/actions-core": "0.0.0-experimental-20251010122007",
41
- "@lowdefy/api": "0.0.0-experimental-20251010122007",
42
- "@lowdefy/block-utils": "0.0.0-experimental-20251010122007",
43
- "@lowdefy/blocks-aggrid": "0.0.0-experimental-20251010122007",
44
- "@lowdefy/blocks-antd": "0.0.0-experimental-20251010122007",
45
- "@lowdefy/blocks-basic": "0.0.0-experimental-20251010122007",
46
- "@lowdefy/blocks-color-selectors": "0.0.0-experimental-20251010122007",
47
- "@lowdefy/blocks-echarts": "0.0.0-experimental-20251010122007",
48
- "@lowdefy/blocks-loaders": "0.0.0-experimental-20251010122007",
49
- "@lowdefy/blocks-markdown": "0.0.0-experimental-20251010122007",
50
- "@lowdefy/blocks-qr": "0.0.0-experimental-20251010122007",
51
- "@lowdefy/build": "0.0.0-experimental-20251010122007",
52
- "@lowdefy/client": "0.0.0-experimental-20251010122007",
53
- "@lowdefy/connection-axios-http": "0.0.0-experimental-20251010122007",
54
- "@lowdefy/engine": "0.0.0-experimental-20251010122007",
55
- "@lowdefy/helpers": "0.0.0-experimental-20251010122007",
56
- "@lowdefy/layout": "0.0.0-experimental-20251010122007",
57
- "@lowdefy/node-utils": "0.0.0-experimental-20251010122007",
58
- "@lowdefy/operators-change-case": "0.0.0-experimental-20251010122007",
59
- "@lowdefy/operators-diff": "0.0.0-experimental-20251010122007",
60
- "@lowdefy/operators-js": "0.0.0-experimental-20251010122007",
61
- "@lowdefy/operators-moment": "0.0.0-experimental-20251010122007",
62
- "@lowdefy/operators-mql": "0.0.0-experimental-20251010122007",
63
- "@lowdefy/operators-nunjucks": "0.0.0-experimental-20251010122007",
64
- "@lowdefy/operators-uuid": "0.0.0-experimental-20251010122007",
65
- "@lowdefy/operators-yaml": "0.0.0-experimental-20251010122007",
66
- "@lowdefy/plugin-next-auth": "0.0.0-experimental-20251010122007",
67
- "@modelcontextprotocol/sdk": "1.17.4",
39
+ "@lowdefy/actions-core": "0.0.0-experimental-20251203145918",
40
+ "@lowdefy/api": "0.0.0-experimental-20251203145918",
41
+ "@lowdefy/block-utils": "0.0.0-experimental-20251203145918",
42
+ "@lowdefy/blocks-aggrid": "0.0.0-experimental-20251203145918",
43
+ "@lowdefy/blocks-antd": "0.0.0-experimental-20251203145918",
44
+ "@lowdefy/blocks-basic": "0.0.0-experimental-20251203145918",
45
+ "@lowdefy/blocks-color-selectors": "0.0.0-experimental-20251203145918",
46
+ "@lowdefy/blocks-echarts": "0.0.0-experimental-20251203145918",
47
+ "@lowdefy/blocks-loaders": "0.0.0-experimental-20251203145918",
48
+ "@lowdefy/blocks-markdown": "0.0.0-experimental-20251203145918",
49
+ "@lowdefy/blocks-qr": "0.0.0-experimental-20251203145918",
50
+ "@lowdefy/build": "0.0.0-experimental-20251203145918",
51
+ "@lowdefy/client": "0.0.0-experimental-20251203145918",
52
+ "@lowdefy/connection-axios-http": "0.0.0-experimental-20251203145918",
53
+ "@lowdefy/engine": "0.0.0-experimental-20251203145918",
54
+ "@lowdefy/helpers": "0.0.0-experimental-20251203145918",
55
+ "@lowdefy/layout": "0.0.0-experimental-20251203145918",
56
+ "@lowdefy/node-utils": "0.0.0-experimental-20251203145918",
57
+ "@lowdefy/operators-change-case": "0.0.0-experimental-20251203145918",
58
+ "@lowdefy/operators-diff": "0.0.0-experimental-20251203145918",
59
+ "@lowdefy/operators-js": "0.0.0-experimental-20251203145918",
60
+ "@lowdefy/operators-moment": "0.0.0-experimental-20251203145918",
61
+ "@lowdefy/operators-mql": "0.0.0-experimental-20251203145918",
62
+ "@lowdefy/operators-nunjucks": "0.0.0-experimental-20251203145918",
63
+ "@lowdefy/operators-uuid": "0.0.0-experimental-20251203145918",
64
+ "@lowdefy/operators-yaml": "0.0.0-experimental-20251203145918",
65
+ "@lowdefy/plugin-next-auth": "0.0.0-experimental-20251203145918",
68
66
  "chokidar": "3.5.3",
69
67
  "dotenv": "16.3.1",
70
- "mcp-handler": "1.0.2",
71
68
  "next": "13.5.4",
72
69
  "next-auth": "4.24.5",
73
70
  "opener": "1.5.2",
@@ -78,8 +75,7 @@
78
75
  "react-icons": "4.12.0",
79
76
  "swr": "2.2.4",
80
77
  "yaml": "2.3.4",
81
- "yargs": "17.7.2",
82
- "zod": "3.25.76"
78
+ "yargs": "17.7.2"
83
79
  },
84
80
  "devDependencies": {
85
81
  "@next/eslint-plugin-next": "13.5.4",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "0.0.0-experimental-20251010122007",
3
+ "version": "0.0.0-experimental-20251203145918",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -26,7 +26,6 @@
26
26
  "url": "https://github.com/lowdefy/lowdefy.git"
27
27
  },
28
28
  "files": [
29
- "app/*",
30
29
  "lib/*",
31
30
  "manager/*",
32
31
  "pages/*",
@@ -44,37 +43,35 @@
44
43
  "prepublishOnly": "pnpm build"
45
44
  },
46
45
  "dependencies": {
47
- "@lowdefy/actions-core": "0.0.0-experimental-20251010122007",
48
- "@lowdefy/api": "0.0.0-experimental-20251010122007",
49
- "@lowdefy/block-utils": "0.0.0-experimental-20251010122007",
50
- "@lowdefy/blocks-aggrid": "0.0.0-experimental-20251010122007",
51
- "@lowdefy/blocks-antd": "0.0.0-experimental-20251010122007",
52
- "@lowdefy/blocks-basic": "0.0.0-experimental-20251010122007",
53
- "@lowdefy/blocks-color-selectors": "0.0.0-experimental-20251010122007",
54
- "@lowdefy/blocks-echarts": "0.0.0-experimental-20251010122007",
55
- "@lowdefy/blocks-loaders": "0.0.0-experimental-20251010122007",
56
- "@lowdefy/blocks-markdown": "0.0.0-experimental-20251010122007",
57
- "@lowdefy/blocks-qr": "0.0.0-experimental-20251010122007",
58
- "@lowdefy/build": "0.0.0-experimental-20251010122007",
59
- "@lowdefy/client": "0.0.0-experimental-20251010122007",
60
- "@lowdefy/connection-axios-http": "0.0.0-experimental-20251010122007",
61
- "@lowdefy/engine": "0.0.0-experimental-20251010122007",
62
- "@lowdefy/helpers": "0.0.0-experimental-20251010122007",
63
- "@lowdefy/layout": "0.0.0-experimental-20251010122007",
64
- "@lowdefy/node-utils": "0.0.0-experimental-20251010122007",
65
- "@lowdefy/operators-change-case": "0.0.0-experimental-20251010122007",
66
- "@lowdefy/operators-diff": "0.0.0-experimental-20251010122007",
67
- "@lowdefy/operators-js": "0.0.0-experimental-20251010122007",
68
- "@lowdefy/operators-moment": "0.0.0-experimental-20251010122007",
69
- "@lowdefy/operators-mql": "0.0.0-experimental-20251010122007",
70
- "@lowdefy/operators-nunjucks": "0.0.0-experimental-20251010122007",
71
- "@lowdefy/operators-uuid": "0.0.0-experimental-20251010122007",
72
- "@lowdefy/operators-yaml": "0.0.0-experimental-20251010122007",
73
- "@lowdefy/plugin-next-auth": "0.0.0-experimental-20251010122007",
74
- "@modelcontextprotocol/sdk": "1.17.4",
46
+ "@lowdefy/actions-core": "0.0.0-experimental-20251203145918",
47
+ "@lowdefy/api": "0.0.0-experimental-20251203145918",
48
+ "@lowdefy/block-utils": "0.0.0-experimental-20251203145918",
49
+ "@lowdefy/blocks-aggrid": "0.0.0-experimental-20251203145918",
50
+ "@lowdefy/blocks-antd": "0.0.0-experimental-20251203145918",
51
+ "@lowdefy/blocks-basic": "0.0.0-experimental-20251203145918",
52
+ "@lowdefy/blocks-color-selectors": "0.0.0-experimental-20251203145918",
53
+ "@lowdefy/blocks-echarts": "0.0.0-experimental-20251203145918",
54
+ "@lowdefy/blocks-loaders": "0.0.0-experimental-20251203145918",
55
+ "@lowdefy/blocks-markdown": "0.0.0-experimental-20251203145918",
56
+ "@lowdefy/blocks-qr": "0.0.0-experimental-20251203145918",
57
+ "@lowdefy/build": "0.0.0-experimental-20251203145918",
58
+ "@lowdefy/client": "0.0.0-experimental-20251203145918",
59
+ "@lowdefy/connection-axios-http": "0.0.0-experimental-20251203145918",
60
+ "@lowdefy/engine": "0.0.0-experimental-20251203145918",
61
+ "@lowdefy/helpers": "0.0.0-experimental-20251203145918",
62
+ "@lowdefy/layout": "0.0.0-experimental-20251203145918",
63
+ "@lowdefy/node-utils": "0.0.0-experimental-20251203145918",
64
+ "@lowdefy/operators-change-case": "0.0.0-experimental-20251203145918",
65
+ "@lowdefy/operators-diff": "0.0.0-experimental-20251203145918",
66
+ "@lowdefy/operators-js": "0.0.0-experimental-20251203145918",
67
+ "@lowdefy/operators-moment": "0.0.0-experimental-20251203145918",
68
+ "@lowdefy/operators-mql": "0.0.0-experimental-20251203145918",
69
+ "@lowdefy/operators-nunjucks": "0.0.0-experimental-20251203145918",
70
+ "@lowdefy/operators-uuid": "0.0.0-experimental-20251203145918",
71
+ "@lowdefy/operators-yaml": "0.0.0-experimental-20251203145918",
72
+ "@lowdefy/plugin-next-auth": "0.0.0-experimental-20251203145918",
75
73
  "chokidar": "3.5.3",
76
74
  "dotenv": "16.3.1",
77
- "mcp-handler": "1.0.2",
78
75
  "next": "13.5.4",
79
76
  "next-auth": "4.24.5",
80
77
  "opener": "1.5.2",
@@ -85,8 +82,7 @@
85
82
  "react-icons": "4.12.0",
86
83
  "swr": "2.2.4",
87
84
  "yaml": "2.3.4",
88
- "yargs": "17.7.2",
89
- "zod": "3.25.76"
85
+ "yargs": "17.7.2"
90
86
  },
91
87
  "devDependencies": {
92
88
  "@next/eslint-plugin-next": "13.5.4",
@@ -1,60 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import path from 'path';
18
- import crypto from 'crypto';
19
- import { createApiContext } from '@lowdefy/api';
20
- import { getSecretsFromEnv } from '@lowdefy/node-utils';
21
-
22
- import config from '../../../../../build/config.json';
23
- import connections from '../../../../../build/plugins/connections.js';
24
- import createLogger from '../../../../../lib/server/log/createLogger.js';
25
- import fileCache from '../../../../../lib/server/fileCache.js';
26
- import logError from '../../../../../lib/server/log/logError.js';
27
- import logRequest from '../../../../../lib/server/log/logRequest.js';
28
- import operators from '../../../../../build/plugins/operators/server.js';
29
- import jsMap from '../../../../../build/plugins/operators/serverJsMap.js';
30
- import getAuthOptions from '../../../../../lib/server/auth/getAuthOptions.js';
31
-
32
- const secrets = getSecretsFromEnv();
33
-
34
- async function createContext() {
35
- const context = {
36
- rid: crypto.randomUUID(),
37
- buildDirectory: path.join(process.cwd(), 'build'),
38
- config,
39
- connections,
40
- fileCache,
41
- jsMap,
42
- logger: console,
43
- operators,
44
- secrets,
45
- };
46
-
47
- try {
48
- context.logger = createLogger({ rid: context.rid });
49
- context.authOptions = getAuthOptions(context);
50
-
51
- createApiContext(context);
52
- logRequest({ context });
53
- } catch (error) {
54
- logError({ error, context });
55
- }
56
-
57
- return context;
58
- }
59
-
60
- export default createContext;
@@ -1,32 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
-
4
- // Helper function to load block/action/operator names from filenames
5
- function loadDocsAsArray(docType) {
6
- try {
7
- const docsDir = path.join(process.cwd(), 'build', 'docs', docType);
8
-
9
- const files = fs.readdirSync(docsDir);
10
-
11
- const docs = [];
12
-
13
- files.forEach((file) => {
14
- if (file.endsWith('.md')) {
15
- // Use filename as title (remove .md extension)
16
- const title = file.replace('.md', '');
17
-
18
- const doc = {
19
- title: title,
20
- description: 'Description to be added.', // TODO: Extract description from md file
21
- };
22
- docs.push(doc);
23
- }
24
- });
25
-
26
- return docs;
27
- } catch (error) {
28
- return [];
29
- }
30
- }
31
-
32
- export default loadDocsAsArray;
@@ -1,32 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import fs from 'fs';
18
- import path from 'path';
19
-
20
- // Helper function to load individual schema
21
- function loadIndividualDoc(docType, identifier) {
22
- try {
23
- const docPath = path.join(process.cwd(), `build/docs/${docType}/${identifier}.md`);
24
- const content = fs.readFileSync(docPath, 'utf8');
25
-
26
- return content;
27
- } catch (error) {
28
- return null;
29
- }
30
- }
31
-
32
- export default loadIndividualDoc;
@@ -1,63 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { createMcpHandler } from 'mcp-handler';
18
- import getAction from './tools/getAction.js';
19
- import getBlock from './tools/getBlock.js';
20
- import getConnection from './tools/getConnection.js';
21
- import getOperator from './tools/getOperator.js';
22
- import getRequest from './tools/getRequest.js';
23
- import listActions from './tools/listActions.js';
24
- import listBlocks from './tools/listBlocks.js';
25
- import listConnections from './tools/listConnections.js';
26
- import listOperators from './tools/listOperators.js';
27
- import listRequests from './tools/listRequests.js';
28
- import executeRequest from './tools/executeRequest.js';
29
-
30
- const handler = createMcpHandler(
31
- async (server) => {
32
- // Actions
33
- server.tool(...listActions);
34
- server.tool(...getAction);
35
-
36
- // Blocks
37
- server.tool(...listBlocks);
38
- server.tool(...getBlock);
39
-
40
- // Connections
41
- server.tool(...listConnections);
42
- server.tool(...getConnection);
43
-
44
- // Operators
45
- server.tool(...listOperators);
46
- server.tool(...getOperator);
47
-
48
- // Requests
49
- server.tool(...listRequests);
50
- server.tool(...getRequest);
51
- server.tool(...executeRequest);
52
- },
53
- {
54
- // Optional server options
55
- },
56
- {
57
- basePath: '/api/ai',
58
- verboseLogs: true,
59
- maxDuration: 60,
60
- }
61
- );
62
-
63
- export { handler as GET, handler as POST, handler as DELETE };
@@ -1,63 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import { callRequest } from '@lowdefy/api';
19
-
20
- import createContext from '../helpers/createContext.js';
21
-
22
- export default [
23
- 'execute_request',
24
- 'Execute a request with specified blockId, pageId, payload and requestId',
25
- {
26
- blockId: z.string().describe('The block ID to test against'),
27
- pageId: z.string().describe('The page ID to test against'),
28
- payload: z.record(z.any()).optional().describe('Additional payload for the request'),
29
- requestId: z.string().optional().describe('The request ID to test against'),
30
- },
31
- async ({ blockId, pageId, payload = {}, requestId }) => {
32
- const requestConfig = {
33
- blockId,
34
- pageId,
35
- payload,
36
- requestId,
37
- };
38
-
39
- let responseText = `Executing Request:\n${JSON.stringify(requestConfig, null, 2)}`;
40
-
41
- try {
42
- const context = await createContext();
43
- const response = await callRequest(context, requestConfig);
44
-
45
- responseText += `\n\nExecution Result:\n${JSON.stringify(response, null, 2)}`;
46
- } catch (error) {
47
- responseText += `\n\nExecution Error:\n${error.message || 'Unknown error occurred'}`;
48
-
49
- if (error.stack) {
50
- responseText += `\n\nStack Trace:\n${error.stack}`;
51
- }
52
- }
53
-
54
- return {
55
- content: [
56
- {
57
- type: 'text',
58
- text: responseText,
59
- },
60
- ],
61
- };
62
- },
63
- ];
@@ -1,51 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
19
-
20
- export default [
21
- 'get_action',
22
- 'Returns detailed schema information for a specific action type',
23
- {
24
- actionType: z
25
- .string()
26
- .describe('The action type to get schema for (e.g., "CallAPI", "SetState", "Fetch")'),
27
- },
28
- async ({ actionType }) => {
29
- const action = loadIndividualDoc('actions', actionType);
30
-
31
- if (!action) {
32
- return {
33
- content: [
34
- {
35
- type: 'text',
36
- text: `Action "${actionType}" not found.`,
37
- },
38
- ],
39
- };
40
- }
41
-
42
- return {
43
- content: [
44
- {
45
- type: 'text',
46
- text: `Action: ${actionType}\nDocumentation:\n${action}`,
47
- },
48
- ],
49
- };
50
- },
51
- ];
@@ -1,51 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
19
-
20
- export default [
21
- 'get_block',
22
- 'Returns detailed schema information for a specific block type',
23
- {
24
- blockType: z
25
- .string()
26
- .describe('The block type to get schema for (e.g., "Button", "TextInput", "Card")'),
27
- },
28
- async ({ blockType }) => {
29
- const block = loadIndividualDoc('blocks', blockType);
30
-
31
- if (!block) {
32
- return {
33
- content: [
34
- {
35
- type: 'text',
36
- text: `Block "${blockType}" not found.`,
37
- },
38
- ],
39
- };
40
- }
41
-
42
- return {
43
- content: [
44
- {
45
- type: 'text',
46
- text: `Block: ${blockType}\nDocumentation:\n${block}`,
47
- },
48
- ],
49
- };
50
- },
51
- ];
@@ -1,51 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
19
-
20
- export default [
21
- 'get_connection',
22
- 'Returns detailed schema information for a specific connection type',
23
- {
24
- connectionType: z
25
- .string()
26
- .describe('The connection type to get schema for (e.g., "AxiosHttp", "MongoDBCollection")'),
27
- },
28
- async ({ connectionType }) => {
29
- const connection = loadIndividualDoc('connections', connectionType);
30
-
31
- if (!connection) {
32
- return {
33
- content: [
34
- {
35
- type: 'text',
36
- text: `Connection "${connectionType}" not found.`,
37
- },
38
- ],
39
- };
40
- }
41
-
42
- return {
43
- content: [
44
- {
45
- type: 'text',
46
- text: `Connection: ${connectionType}\nDocumentation:\n${connection}`,
47
- },
48
- ],
49
- };
50
- },
51
- ];
@@ -1,51 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
19
-
20
- export default [
21
- 'get_operator',
22
- 'Returns detailed schema information for a specific operator type',
23
- {
24
- operatorType: z
25
- .string()
26
- .describe('The operator type to get schema for (e.g., "_and", "_array", "_string")'),
27
- },
28
- async ({ operatorType }) => {
29
- const operator = loadIndividualDoc('operators', operatorType);
30
-
31
- if (!operator) {
32
- return {
33
- content: [
34
- {
35
- type: 'text',
36
- text: `Operator "${operatorType}" not found.`,
37
- },
38
- ],
39
- };
40
- }
41
-
42
- return {
43
- content: [
44
- {
45
- type: 'text',
46
- text: `Operator: ${operatorType}\nDocumentation:\n${operator}`,
47
- },
48
- ],
49
- };
50
- },
51
- ];
@@ -1,56 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
19
-
20
- export default [
21
- 'get_request',
22
- 'Returns detailed schema information for a specific request type',
23
- {
24
- connectionType: z
25
- .string()
26
- .describe(
27
- 'The connection type the request belongs to (e.g., "AxiosHttp", "MongoDBCollection")'
28
- ),
29
- requestType: z
30
- .string()
31
- .describe('The request type to get schema for (e.g., "AxiosHttp", "MongoDBAggregation")'),
32
- },
33
- async ({ connectionType, requestType }) => {
34
- const request = loadIndividualDoc(`requests/${connectionType}`, requestType);
35
-
36
- if (!request) {
37
- return {
38
- content: [
39
- {
40
- type: 'text',
41
- text: `Request "${requestType}" not found.`,
42
- },
43
- ],
44
- };
45
- }
46
-
47
- return {
48
- content: [
49
- {
50
- type: 'text',
51
- text: `Connection: ${connectionType}\nRequest: ${requestType}\nDocumentation:\n${request}`,
52
- },
53
- ],
54
- };
55
- },
56
- ];
@@ -1,39 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
18
-
19
- export default [
20
- 'list_actions',
21
- 'Returns a list of all available Lowdefy actions with their types and packages',
22
- {},
23
- async () => {
24
- const actionList = loadDocsAsArray('actions');
25
-
26
- const formattedList = actionList
27
- .map((action) => `- ${action.title}: ${action.description}`)
28
- .join('\n');
29
-
30
- return {
31
- content: [
32
- {
33
- type: 'text',
34
- text: `Available actions:\n${formattedList}`,
35
- },
36
- ],
37
- };
38
- },
39
- ];
@@ -1,39 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
18
-
19
- export default [
20
- 'list_blocks',
21
- 'Returns a list of all available Lowdefy blocks with their types and packages',
22
- {},
23
- async () => {
24
- const blockList = loadDocsAsArray('blocks');
25
-
26
- const formattedList = blockList
27
- .map((block) => `- ${block.title}: ${block.description}`)
28
- .join('\n');
29
-
30
- return {
31
- content: [
32
- {
33
- type: 'text',
34
- text: `Available blocks:\n${formattedList}`,
35
- },
36
- ],
37
- };
38
- },
39
- ];
@@ -1,39 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
18
-
19
- export default [
20
- 'list_connections',
21
- 'Returns a list of all available Lowdefy connections with their types and packages',
22
- {},
23
- async () => {
24
- const connectionList = loadDocsAsArray('connections');
25
-
26
- const formattedList = connectionList
27
- .map((connection) => `- ${connection.title}: ${connection.description}`)
28
- .join('\n');
29
-
30
- return {
31
- content: [
32
- {
33
- type: 'text',
34
- text: `Available connections:\n${formattedList}`,
35
- },
36
- ],
37
- };
38
- },
39
- ];
@@ -1,39 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
18
-
19
- export default [
20
- 'list_operators',
21
- 'Returns a list of all available Lowdefy operators with their types and packages',
22
- {},
23
- async () => {
24
- const operatorList = loadDocsAsArray('operators');
25
-
26
- const formattedList = operatorList
27
- .map((operator) => `- ${operator.title}: ${operator.description}`)
28
- .join('\n');
29
-
30
- return {
31
- content: [
32
- {
33
- type: 'text',
34
- text: `Available operators:\n${formattedList}`,
35
- },
36
- ],
37
- };
38
- },
39
- ];
@@ -1,44 +0,0 @@
1
- /*
2
- Copyright 2020-2024 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- import { z } from 'zod';
18
- import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
19
-
20
- export default [
21
- 'list_requests',
22
- 'Returns a list of all available Lowdefy requests for a specific connection type',
23
- {
24
- connectionType: z
25
- .string()
26
- .describe('The connection type to get requests for (e.g., "AxiosHttp", "MongoDBCollection")'),
27
- },
28
- async ({ connectionType }) => {
29
- const requestList = loadDocsAsArray(`requests/${connectionType}`);
30
-
31
- const formattedList = requestList
32
- .map((request) => `- ${request.title}: ${request.description}`)
33
- .join('\n');
34
-
35
- return {
36
- content: [
37
- {
38
- type: 'text',
39
- text: `Available requests for ${connectionType}:\n${formattedList}`,
40
- },
41
- ],
42
- };
43
- },
44
- ];