@solidxai/solidctl 0.1.25 → 0.1.26-beta.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/LICENSE +89 -0
- package/README.md +3 -1
- package/dist/commands/mcp.command.js +70 -21
- package/dist/commands/mcp.command.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/templates/ui-template/src/App.tsx +6 -7
- package/templates/ui-template/src/{routes/AppRoutes.tsx → AppRoutes.tsx} +4 -2
- package/templates/ui-template/src/solid-ui-modules.ts +17 -0
- package/templates/ui-template/src/assets/react.svg +0 -1
- package/templates/ui-template/src/extensions/solid-extensions.ts +0 -16
package/LICENSE
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
|
|
4
|
+
"Business Source License" is a trademark of MariaDB plc.
|
|
5
|
+
|
|
6
|
+
Parameters:
|
|
7
|
+
|
|
8
|
+
Licensor: Logicloop Ventures Limited
|
|
9
|
+
Licensed Work: SolidCTL (@solidxai/solidctl)
|
|
10
|
+
Additional Use Grant: Individuals and organizations with total annual revenue
|
|
11
|
+
(including funding) of less than $1,000,000 USD may use
|
|
12
|
+
the Licensed Work for any purpose, including commercial
|
|
13
|
+
production use. Organizations with total annual revenue
|
|
14
|
+
(including funding) of $1,000,000 USD or more must obtain
|
|
15
|
+
a commercial Enterprise License before using the Licensed
|
|
16
|
+
Work in production. Contact https://solidxai.com/contact
|
|
17
|
+
for licensing.
|
|
18
|
+
|
|
19
|
+
"Production use" means any use of the Licensed Work other
|
|
20
|
+
than development, debugging, evaluation, or testing.
|
|
21
|
+
|
|
22
|
+
Change Date: None
|
|
23
|
+
Change License: Apache 2.0
|
|
24
|
+
|
|
25
|
+
Notice:
|
|
26
|
+
|
|
27
|
+
In consideration of the right to use this License's text and the
|
|
28
|
+
"Business Source License" name and trademark, Licensor covenants to MariaDB,
|
|
29
|
+
and to all other recipients of the Licensed Work, that Licensor will:
|
|
30
|
+
|
|
31
|
+
1. Specify as the Change License the Apache License, Version 2.0 or any
|
|
32
|
+
later version, or a license that is compatible with GPL Version 2.0 or
|
|
33
|
+
a later version, where "compatible" means that software provided under
|
|
34
|
+
the Change License can be included in a program with software provided
|
|
35
|
+
under GPL Version 2.0 or a later version. Licensor may specify
|
|
36
|
+
additional Change Licenses without limitation.
|
|
37
|
+
|
|
38
|
+
2. Specify an additional grant of rights to use that does not impose any
|
|
39
|
+
additional restriction on the rights granted in this License, as the
|
|
40
|
+
Additional Use Grant.
|
|
41
|
+
|
|
42
|
+
3. Not modify this License in any other way.
|
|
43
|
+
|
|
44
|
+
Terms
|
|
45
|
+
|
|
46
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
47
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
48
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
49
|
+
production use.
|
|
50
|
+
|
|
51
|
+
Effective on the Change Date, or the fourth anniversary of the first
|
|
52
|
+
publicly available distribution of a specific version of the Licensed Work
|
|
53
|
+
under this License, whichever comes first, the Licensor hereby grants you
|
|
54
|
+
rights under the terms of the Change License, and the rights granted in the
|
|
55
|
+
paragraph above terminate.
|
|
56
|
+
|
|
57
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
58
|
+
currently in effect as described in this License, you must purchase a
|
|
59
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
60
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
61
|
+
|
|
62
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
63
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
64
|
+
separately for each version of the Licensed Work and the Change Date may
|
|
65
|
+
vary for each version of the Licensed Work released by Licensor.
|
|
66
|
+
|
|
67
|
+
You must conspicuously display this License on each original or modified copy
|
|
68
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
69
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
70
|
+
License apply to your use of that work.
|
|
71
|
+
|
|
72
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
73
|
+
terminate your rights under this License for the current and all other
|
|
74
|
+
versions of the Licensed Work.
|
|
75
|
+
|
|
76
|
+
This License does not grant you any right in any trademark or logo of
|
|
77
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
78
|
+
Licensor as expressly required by this License).
|
|
79
|
+
|
|
80
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
81
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
82
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
83
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
84
|
+
TITLE.
|
|
85
|
+
|
|
86
|
+
For complete terms and conditions, see https://solidxai.com/terms.
|
|
87
|
+
|
|
88
|
+
For questions about licensing, contact support@solidxai.com or visit
|
|
89
|
+
https://solidxai.com/contact.
|
package/README.md
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
`solidctl` is the command-line interface that ties the SolidX ecosystem together. Whether you are starting a new project, upgrading core dependencies, or regenerating code after a model change using the command line, `solidctl` is the entry point.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@solidxai/solidctl)
|
|
8
|
-
[](https://
|
|
8
|
+
[](https://mariadb.com/bsl11/)
|
|
9
9
|
[](https://docs.solidxai.com/docs)
|
|
10
|
+
[](https://discord.gg/ATQW4CEksA)
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -210,6 +211,7 @@ my-solid-app/
|
|
|
210
211
|
|---|---|
|
|
211
212
|
| Website | [solidxai.com](https://solidxai.com) |
|
|
212
213
|
| Documentation | [docs.solidxai.com](https://docs.solidxai.com/docs) |
|
|
214
|
+
| Discord | [discord.gg/ATQW4CEksA](https://discord.gg/ATQW4CEksA) |
|
|
213
215
|
| Support | support@solidxai.com |
|
|
214
216
|
|
|
215
217
|
---
|
|
@@ -1,40 +1,89 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.registerMcpCommand = registerMcpCommand;
|
|
4
7
|
const child_process_1 = require("child_process");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const dotenv_1 = require("dotenv");
|
|
5
10
|
const helper_1 = require("../helper");
|
|
11
|
+
function resolveDatabaseUrl() {
|
|
12
|
+
if (process.env.DATABASE_URL)
|
|
13
|
+
return process.env.DATABASE_URL;
|
|
14
|
+
const host = process.env.DEFAULT_DATABASE_HOST;
|
|
15
|
+
const port = process.env.DEFAULT_DATABASE_PORT;
|
|
16
|
+
const user = process.env.DEFAULT_DATABASE_USER;
|
|
17
|
+
const password = process.env.DEFAULT_DATABASE_PASSWORD;
|
|
18
|
+
const name = process.env.DEFAULT_DATABASE_NAME;
|
|
19
|
+
if (host && port && user && name) {
|
|
20
|
+
return `postgresql://${user}${password ? ':' + password : ''}@${host}:${port}/${name}`;
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
function buildBridgedEnv() {
|
|
25
|
+
const projectRoot = process.cwd();
|
|
26
|
+
(0, dotenv_1.config)({ path: path_1.default.join(projectRoot, 'solid-api', '.env') });
|
|
27
|
+
const databaseUrl = resolveDatabaseUrl();
|
|
28
|
+
return {
|
|
29
|
+
...process.env,
|
|
30
|
+
SOLIDX_PROJECT_ROOT: projectRoot,
|
|
31
|
+
...(databaseUrl ? { DATABASE_URL: databaseUrl } : {}),
|
|
32
|
+
...(process.env.BASE_URL ? { BASE_URL: process.env.BASE_URL } : {}),
|
|
33
|
+
...(process.env.APP_ENCRYPTION_KEY ? { APP_ENCRYPTION_KEY: process.env.APP_ENCRYPTION_KEY } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function printBridgeSummary(env) {
|
|
37
|
+
const bridgedKeys = ['DATABASE_URL', 'SOLIDX_PROJECT_ROOT', 'BASE_URL', 'APP_ENCRYPTION_KEY'];
|
|
38
|
+
const bridged = bridgedKeys.filter((k) => env[k]);
|
|
39
|
+
const missing = bridgedKeys.filter((k) => !env[k]);
|
|
40
|
+
console.log(`✔ Bridged env: ${bridged.join(', ') || 'none'}`);
|
|
41
|
+
if (missing.length)
|
|
42
|
+
console.warn(`⚠ Missing env: ${missing.join(', ')}`);
|
|
43
|
+
}
|
|
6
44
|
function registerMcpCommand(program) {
|
|
7
|
-
program
|
|
45
|
+
const mcp = program
|
|
8
46
|
.command('mcp')
|
|
9
|
-
.description('
|
|
10
|
-
|
|
11
|
-
.
|
|
12
|
-
.
|
|
13
|
-
.
|
|
47
|
+
.description('SolidX MCP Server (Streamable HTTP) — for remote clients (Cursor, Codex, cloud desktops)');
|
|
48
|
+
mcp
|
|
49
|
+
.command('start')
|
|
50
|
+
.description('Start the MCP server using Streamable HTTP transport')
|
|
51
|
+
.option('-p, --port <port>', 'Port number', '9000')
|
|
52
|
+
.option('-H, --host <host>', 'Host to bind', '0.0.0.0')
|
|
53
|
+
.option('-l, --log-level <level>', 'Logging level', 'INFO')
|
|
54
|
+
.option('--mount-path <path>', 'Path under which to mount the MCP app', '/mcp')
|
|
55
|
+
.action((options) => {
|
|
14
56
|
(0, helper_1.validateProjectRoot)();
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
57
|
+
const env = buildBridgedEnv();
|
|
58
|
+
if (!env.DATABASE_URL) {
|
|
59
|
+
console.error('❌ DATABASE_URL is required for MCP mode.\n' +
|
|
60
|
+
' It is needed to validate API keys and write audit logs.\n' +
|
|
61
|
+
' Set it in your solid-api/.env or environment.');
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
printBridgeSummary(env);
|
|
65
|
+
console.log(`▶ Starting SolidX MCP Server on ${options.host}:${options.port}`);
|
|
66
|
+
const agentCommand = process.platform === 'win32' ? 'solidx-agent.cmd' : 'solidx-agent';
|
|
67
|
+
const result = (0, child_process_1.spawnSync)(agentCommand, [
|
|
68
|
+
'mcp-remote',
|
|
69
|
+
'--host', options.host,
|
|
70
|
+
'--port', options.port,
|
|
71
|
+
'--log-level', options.logLevel,
|
|
72
|
+
'--mount-path', options.mountPath,
|
|
73
|
+
], {
|
|
74
|
+
cwd: env.SOLIDX_PROJECT_ROOT,
|
|
25
75
|
stdio: 'inherit',
|
|
26
|
-
env
|
|
27
|
-
shell: process.platform === 'win32'
|
|
76
|
+
env,
|
|
77
|
+
shell: process.platform === 'win32',
|
|
28
78
|
});
|
|
29
79
|
if (result.error) {
|
|
30
|
-
console.error('❌ Failed to
|
|
80
|
+
console.error('❌ Failed to start MCP server:', result.error.message);
|
|
31
81
|
process.exit(1);
|
|
32
82
|
}
|
|
33
83
|
if (result.status !== 0) {
|
|
34
|
-
console.error('❌
|
|
84
|
+
console.error('❌ MCP server exited with code', result.status);
|
|
35
85
|
process.exit(result.status ?? 1);
|
|
36
86
|
}
|
|
37
|
-
console.log('✔ solid mcp completed');
|
|
38
87
|
});
|
|
39
88
|
}
|
|
40
89
|
//# sourceMappingURL=mcp.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.command.js","sourceRoot":"","sources":["../../src/commands/mcp.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp.command.js","sourceRoot":"","sources":["../../src/commands/mcp.command.ts"],"names":[],"mappings":";;;;;AA4DA,gDAwDC;AAnHD,iDAA0C;AAC1C,gDAA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