@stellisoft/stellify-mcp 0.1.12 → 0.1.13
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/dist/index.js +22 -282
- package/dist/stellify-client.d.ts +0 -28
- package/dist/stellify-client.js +0 -46
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -178,6 +178,10 @@ The system resolves these to UUIDs automatically, creating missing dependencies
|
|
|
178
178
|
items: { type: 'string' },
|
|
179
179
|
description: 'Array of namespace strings to include as dependencies (e.g., ["App\\Models\\User", "Illuminate\\Support\\Facades\\Hash"]). These are resolved to UUIDs automatically.',
|
|
180
180
|
},
|
|
181
|
+
module: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: 'Optional module name to group this file with related code (e.g., "blog-posts", "user-auth"). Module is auto-created if it doesn\'t exist.',
|
|
184
|
+
},
|
|
181
185
|
},
|
|
182
186
|
required: ['directory', 'name', 'type'],
|
|
183
187
|
},
|
|
@@ -406,6 +410,10 @@ Example:
|
|
|
406
410
|
type: 'object',
|
|
407
411
|
description: 'Additional route data (title, description, element UUIDs)',
|
|
408
412
|
},
|
|
413
|
+
module: {
|
|
414
|
+
type: 'string',
|
|
415
|
+
description: 'Optional module name to group this route with related code (e.g., "blog-posts", "user-auth"). Module is auto-created if it doesn\'t exist.',
|
|
416
|
+
},
|
|
409
417
|
},
|
|
410
418
|
required: ['project_id', 'name', 'path', 'method'],
|
|
411
419
|
},
|
|
@@ -654,150 +662,6 @@ IMPORTANT: Use the returned root element UUID in save_file's template array.`,
|
|
|
654
662
|
required: ['elements'],
|
|
655
663
|
},
|
|
656
664
|
},
|
|
657
|
-
{
|
|
658
|
-
name: 'list_globals',
|
|
659
|
-
description: 'List all global files in the Application database. Globals are reusable, curated code (controllers, models, services) that can be installed into tenant projects.',
|
|
660
|
-
inputSchema: {
|
|
661
|
-
type: 'object',
|
|
662
|
-
properties: {},
|
|
663
|
-
},
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
name: 'get_global',
|
|
667
|
-
description: 'Get a global file with all its methods, statements, and clauses. Returns the full structure of a reusable code file.',
|
|
668
|
-
inputSchema: {
|
|
669
|
-
type: 'object',
|
|
670
|
-
properties: {
|
|
671
|
-
uuid: {
|
|
672
|
-
type: 'string',
|
|
673
|
-
description: 'UUID of the global file to retrieve',
|
|
674
|
-
},
|
|
675
|
-
},
|
|
676
|
-
required: ['uuid'],
|
|
677
|
-
},
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
name: 'install_global',
|
|
681
|
-
description: 'Install a global file from the Application database into a tenant project. Copies the file, methods, and statements to the tenant database with the same UUIDs (for deduplication). Clauses remain shared in the Application DB.',
|
|
682
|
-
inputSchema: {
|
|
683
|
-
type: 'object',
|
|
684
|
-
properties: {
|
|
685
|
-
file_uuid: {
|
|
686
|
-
type: 'string',
|
|
687
|
-
description: 'UUID of the global file to install',
|
|
688
|
-
},
|
|
689
|
-
directory_uuid: {
|
|
690
|
-
type: 'string',
|
|
691
|
-
description: 'UUID of the directory in the tenant project to install the file into',
|
|
692
|
-
},
|
|
693
|
-
},
|
|
694
|
-
required: ['file_uuid', 'directory_uuid'],
|
|
695
|
-
},
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
name: 'search_global_methods',
|
|
699
|
-
description: 'Search for methods across the Application database (global/framework methods). Use this to find reusable Laravel framework methods, facades, and shared code.',
|
|
700
|
-
inputSchema: {
|
|
701
|
-
type: 'object',
|
|
702
|
-
properties: {
|
|
703
|
-
query: {
|
|
704
|
-
type: 'string',
|
|
705
|
-
description: 'Search query to find methods by name',
|
|
706
|
-
},
|
|
707
|
-
},
|
|
708
|
-
required: ['query'],
|
|
709
|
-
},
|
|
710
|
-
},
|
|
711
|
-
// Module tools (groups of globals)
|
|
712
|
-
{
|
|
713
|
-
name: 'list_modules',
|
|
714
|
-
description: 'List all available modules. A module is a named collection of related global files that can be installed together as a package.',
|
|
715
|
-
inputSchema: {
|
|
716
|
-
type: 'object',
|
|
717
|
-
properties: {},
|
|
718
|
-
},
|
|
719
|
-
},
|
|
720
|
-
{
|
|
721
|
-
name: 'get_module',
|
|
722
|
-
description: 'Get a module with all its files. Returns the module metadata and list of global files it contains, in installation order.',
|
|
723
|
-
inputSchema: {
|
|
724
|
-
type: 'object',
|
|
725
|
-
properties: {
|
|
726
|
-
uuid: {
|
|
727
|
-
type: 'string',
|
|
728
|
-
description: 'UUID of the module to retrieve',
|
|
729
|
-
},
|
|
730
|
-
},
|
|
731
|
-
required: ['uuid'],
|
|
732
|
-
},
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
name: 'create_module',
|
|
736
|
-
description: 'Create a new module to group related global files together.',
|
|
737
|
-
inputSchema: {
|
|
738
|
-
type: 'object',
|
|
739
|
-
properties: {
|
|
740
|
-
name: {
|
|
741
|
-
type: 'string',
|
|
742
|
-
description: 'Unique name for the module (e.g., "laravel-sanctum-auth")',
|
|
743
|
-
},
|
|
744
|
-
description: {
|
|
745
|
-
type: 'string',
|
|
746
|
-
description: 'Description of what the module provides',
|
|
747
|
-
},
|
|
748
|
-
version: {
|
|
749
|
-
type: 'string',
|
|
750
|
-
description: 'Version string (default: "1.0.0")',
|
|
751
|
-
},
|
|
752
|
-
tags: {
|
|
753
|
-
type: 'array',
|
|
754
|
-
items: { type: 'string' },
|
|
755
|
-
description: 'Tags for categorization (e.g., ["auth", "api", "sanctum"])',
|
|
756
|
-
},
|
|
757
|
-
},
|
|
758
|
-
required: ['name'],
|
|
759
|
-
},
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
name: 'add_file_to_module',
|
|
763
|
-
description: 'Add a global file to a module. Files are installed in order when the module is installed.',
|
|
764
|
-
inputSchema: {
|
|
765
|
-
type: 'object',
|
|
766
|
-
properties: {
|
|
767
|
-
module_uuid: {
|
|
768
|
-
type: 'string',
|
|
769
|
-
description: 'UUID of the module',
|
|
770
|
-
},
|
|
771
|
-
file_uuid: {
|
|
772
|
-
type: 'string',
|
|
773
|
-
description: 'UUID of the global file to add',
|
|
774
|
-
},
|
|
775
|
-
order: {
|
|
776
|
-
type: 'number',
|
|
777
|
-
description: 'Installation order (optional, auto-increments if not specified)',
|
|
778
|
-
},
|
|
779
|
-
},
|
|
780
|
-
required: ['module_uuid', 'file_uuid'],
|
|
781
|
-
},
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
name: 'install_module',
|
|
785
|
-
description: 'Install all files from a module into a tenant project. Copies files, methods, and statements in the defined order. Clauses remain shared in the Application DB.',
|
|
786
|
-
inputSchema: {
|
|
787
|
-
type: 'object',
|
|
788
|
-
properties: {
|
|
789
|
-
module_uuid: {
|
|
790
|
-
type: 'string',
|
|
791
|
-
description: 'UUID of the module to install',
|
|
792
|
-
},
|
|
793
|
-
directory_uuid: {
|
|
794
|
-
type: 'string',
|
|
795
|
-
description: 'UUID of the directory in the tenant project to install files into',
|
|
796
|
-
},
|
|
797
|
-
},
|
|
798
|
-
required: ['module_uuid', 'directory_uuid'],
|
|
799
|
-
},
|
|
800
|
-
},
|
|
801
665
|
// =============================================================================
|
|
802
666
|
// STATEMENT & FILE MANAGEMENT TOOLS
|
|
803
667
|
// =============================================================================
|
|
@@ -1372,7 +1236,20 @@ Examples of capabilities (packages you cannot write):
|
|
|
1372
1236
|
- Call request_capability() to log it
|
|
1373
1237
|
- INFORM THE USER: "This feature requires the [X] package which isn't installed in Stellify yet. I've logged a request. This cannot be built until the package is added."
|
|
1374
1238
|
|
|
1375
|
-
**NEVER write code that belongs in a package.** If you find yourself writing OAuth flows, payment processing, S3 clients, email transport, search indexing, or similar infrastructure - STOP. That's a capability request, not business logic
|
|
1239
|
+
**NEVER write code that belongs in a package.** If you find yourself writing OAuth flows, payment processing, S3 clients, email transport, search indexing, or similar infrastructure - STOP. That's a capability request, not business logic.
|
|
1240
|
+
|
|
1241
|
+
## Project Modules (Code Organization)
|
|
1242
|
+
|
|
1243
|
+
When building features, group related files by passing a "module" parameter.
|
|
1244
|
+
|
|
1245
|
+
**WORKFLOW:** Simply include the 'module' parameter when creating files or routes:
|
|
1246
|
+
|
|
1247
|
+
- create_file(..., module: "blog-posts") - auto-groups file
|
|
1248
|
+
- create_route(..., module: "blog-posts") - auto-groups route
|
|
1249
|
+
|
|
1250
|
+
Modules are auto-created if they don't exist. This helps users see all code related to a feature grouped together.
|
|
1251
|
+
|
|
1252
|
+
Example module names: "user-auth", "blog-posts", "product-catalog", "order-management", "admin-dashboard"`;
|
|
1376
1253
|
// Create MCP server
|
|
1377
1254
|
const server = new Server({
|
|
1378
1255
|
name: 'stellify-mcp',
|
|
@@ -1663,143 +1540,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1663
1540
|
],
|
|
1664
1541
|
};
|
|
1665
1542
|
}
|
|
1666
|
-
case 'list_globals': {
|
|
1667
|
-
const result = await stellify.listGlobals();
|
|
1668
|
-
return {
|
|
1669
|
-
content: [
|
|
1670
|
-
{
|
|
1671
|
-
type: 'text',
|
|
1672
|
-
text: JSON.stringify({
|
|
1673
|
-
success: true,
|
|
1674
|
-
message: `Found ${result.data?.length || 0} globals`,
|
|
1675
|
-
globals: result.data,
|
|
1676
|
-
}, null, 2),
|
|
1677
|
-
},
|
|
1678
|
-
],
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
|
-
case 'get_global': {
|
|
1682
|
-
const { uuid } = args;
|
|
1683
|
-
const result = await stellify.getGlobal(uuid);
|
|
1684
|
-
return {
|
|
1685
|
-
content: [
|
|
1686
|
-
{
|
|
1687
|
-
type: 'text',
|
|
1688
|
-
text: JSON.stringify({
|
|
1689
|
-
success: true,
|
|
1690
|
-
global: result,
|
|
1691
|
-
}, null, 2),
|
|
1692
|
-
},
|
|
1693
|
-
],
|
|
1694
|
-
};
|
|
1695
|
-
}
|
|
1696
|
-
case 'install_global': {
|
|
1697
|
-
const result = await stellify.installGlobal(args);
|
|
1698
|
-
return {
|
|
1699
|
-
content: [
|
|
1700
|
-
{
|
|
1701
|
-
type: 'text',
|
|
1702
|
-
text: JSON.stringify({
|
|
1703
|
-
success: true,
|
|
1704
|
-
message: `Installed global "${result.data?.file_name}" (${result.data?.methods_copied} methods, ${result.data?.statements_copied} statements)`,
|
|
1705
|
-
data: result.data,
|
|
1706
|
-
}, null, 2),
|
|
1707
|
-
},
|
|
1708
|
-
],
|
|
1709
|
-
};
|
|
1710
|
-
}
|
|
1711
|
-
case 'search_global_methods': {
|
|
1712
|
-
const result = await stellify.searchGlobalMethods(args);
|
|
1713
|
-
return {
|
|
1714
|
-
content: [
|
|
1715
|
-
{
|
|
1716
|
-
type: 'text',
|
|
1717
|
-
text: JSON.stringify({
|
|
1718
|
-
success: true,
|
|
1719
|
-
message: `Found ${result.data?.length || 0} global methods`,
|
|
1720
|
-
methods: result.data,
|
|
1721
|
-
}, null, 2),
|
|
1722
|
-
},
|
|
1723
|
-
],
|
|
1724
|
-
};
|
|
1725
|
-
}
|
|
1726
|
-
// Module handlers
|
|
1727
|
-
case 'list_modules': {
|
|
1728
|
-
const result = await stellify.listModules();
|
|
1729
|
-
return {
|
|
1730
|
-
content: [
|
|
1731
|
-
{
|
|
1732
|
-
type: 'text',
|
|
1733
|
-
text: JSON.stringify({
|
|
1734
|
-
success: true,
|
|
1735
|
-
message: `Found ${result.data?.length || 0} modules`,
|
|
1736
|
-
modules: result.data,
|
|
1737
|
-
}, null, 2),
|
|
1738
|
-
},
|
|
1739
|
-
],
|
|
1740
|
-
};
|
|
1741
|
-
}
|
|
1742
|
-
case 'get_module': {
|
|
1743
|
-
const { uuid } = args;
|
|
1744
|
-
const result = await stellify.getModule(uuid);
|
|
1745
|
-
return {
|
|
1746
|
-
content: [
|
|
1747
|
-
{
|
|
1748
|
-
type: 'text',
|
|
1749
|
-
text: JSON.stringify({
|
|
1750
|
-
success: true,
|
|
1751
|
-
module: result.module,
|
|
1752
|
-
files: result.files,
|
|
1753
|
-
}, null, 2),
|
|
1754
|
-
},
|
|
1755
|
-
],
|
|
1756
|
-
};
|
|
1757
|
-
}
|
|
1758
|
-
case 'create_module': {
|
|
1759
|
-
const result = await stellify.createModule(args);
|
|
1760
|
-
return {
|
|
1761
|
-
content: [
|
|
1762
|
-
{
|
|
1763
|
-
type: 'text',
|
|
1764
|
-
text: JSON.stringify({
|
|
1765
|
-
success: true,
|
|
1766
|
-
message: `Created module "${result.data?.name}"`,
|
|
1767
|
-
data: result.data,
|
|
1768
|
-
}, null, 2),
|
|
1769
|
-
},
|
|
1770
|
-
],
|
|
1771
|
-
};
|
|
1772
|
-
}
|
|
1773
|
-
case 'add_file_to_module': {
|
|
1774
|
-
const result = await stellify.addFileToModule(args);
|
|
1775
|
-
return {
|
|
1776
|
-
content: [
|
|
1777
|
-
{
|
|
1778
|
-
type: 'text',
|
|
1779
|
-
text: JSON.stringify({
|
|
1780
|
-
success: true,
|
|
1781
|
-
message: `Added "${result.data?.file_name}" to module (order: ${result.data?.order})`,
|
|
1782
|
-
data: result.data,
|
|
1783
|
-
}, null, 2),
|
|
1784
|
-
},
|
|
1785
|
-
],
|
|
1786
|
-
};
|
|
1787
|
-
}
|
|
1788
|
-
case 'install_module': {
|
|
1789
|
-
const result = await stellify.installModule(args);
|
|
1790
|
-
return {
|
|
1791
|
-
content: [
|
|
1792
|
-
{
|
|
1793
|
-
type: 'text',
|
|
1794
|
-
text: JSON.stringify({
|
|
1795
|
-
success: true,
|
|
1796
|
-
message: `Installed module "${result.data?.module_name}" (${result.data?.files_installed} files, ${result.data?.methods_copied} methods, ${result.data?.statements_copied} statements)`,
|
|
1797
|
-
data: result.data,
|
|
1798
|
-
}, null, 2),
|
|
1799
|
-
},
|
|
1800
|
-
],
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1803
1543
|
// Statement & File Management handlers
|
|
1804
1544
|
case 'get_statement': {
|
|
1805
1545
|
const result = await stellify.getStatement(args.uuid);
|
|
@@ -105,34 +105,6 @@ export declare class StellifyClient {
|
|
|
105
105
|
selection?: string;
|
|
106
106
|
test?: boolean;
|
|
107
107
|
}): Promise<any>;
|
|
108
|
-
listGlobals(): Promise<any>;
|
|
109
|
-
getGlobal(uuid: string): Promise<any>;
|
|
110
|
-
installGlobal(params: {
|
|
111
|
-
file_uuid: string;
|
|
112
|
-
directory_uuid: string;
|
|
113
|
-
}): Promise<any>;
|
|
114
|
-
searchGlobalMethods(params: {
|
|
115
|
-
query: string;
|
|
116
|
-
}): Promise<any>;
|
|
117
|
-
listModules(): Promise<any>;
|
|
118
|
-
getModule(module: string): Promise<any>;
|
|
119
|
-
createModule(params: {
|
|
120
|
-
name: string;
|
|
121
|
-
description?: string;
|
|
122
|
-
version?: string;
|
|
123
|
-
tags?: string[];
|
|
124
|
-
}): Promise<any>;
|
|
125
|
-
addFileToModule(params: {
|
|
126
|
-
module: string;
|
|
127
|
-
file: string;
|
|
128
|
-
order?: number;
|
|
129
|
-
}): Promise<any>;
|
|
130
|
-
removeFileFromModule(module: string, file: string): Promise<any>;
|
|
131
|
-
installModule(params: {
|
|
132
|
-
module: string;
|
|
133
|
-
directory: string;
|
|
134
|
-
}): Promise<any>;
|
|
135
|
-
deleteModule(uuid: string): Promise<any>;
|
|
136
108
|
getDirectory(uuid: string): Promise<any>;
|
|
137
109
|
createDirectory(params: {
|
|
138
110
|
name: string;
|
package/dist/stellify-client.js
CHANGED
|
@@ -103,52 +103,6 @@ export class StellifyClient {
|
|
|
103
103
|
const response = await this.client.post('/html/elements', params);
|
|
104
104
|
return response.data;
|
|
105
105
|
}
|
|
106
|
-
// Global methods (Application DB)
|
|
107
|
-
async listGlobals() {
|
|
108
|
-
const response = await this.client.get('/globals/');
|
|
109
|
-
return response.data;
|
|
110
|
-
}
|
|
111
|
-
async getGlobal(uuid) {
|
|
112
|
-
const response = await this.client.get(`/globals/file/${uuid}`);
|
|
113
|
-
return response.data;
|
|
114
|
-
}
|
|
115
|
-
async installGlobal(params) {
|
|
116
|
-
const response = await this.client.post('/globals/install', params);
|
|
117
|
-
return response.data;
|
|
118
|
-
}
|
|
119
|
-
async searchGlobalMethods(params) {
|
|
120
|
-
const response = await this.client.post('/method/search-global', params);
|
|
121
|
-
return response.data;
|
|
122
|
-
}
|
|
123
|
-
// Module methods (groups of globals)
|
|
124
|
-
async listModules() {
|
|
125
|
-
const response = await this.client.get('/modules/');
|
|
126
|
-
return response.data;
|
|
127
|
-
}
|
|
128
|
-
async getModule(module) {
|
|
129
|
-
const response = await this.client.get(`/modules/${module}`);
|
|
130
|
-
return response.data;
|
|
131
|
-
}
|
|
132
|
-
async createModule(params) {
|
|
133
|
-
const response = await this.client.post('/modules/', params);
|
|
134
|
-
return response.data;
|
|
135
|
-
}
|
|
136
|
-
async addFileToModule(params) {
|
|
137
|
-
const response = await this.client.post('/modules/add-file', params);
|
|
138
|
-
return response.data;
|
|
139
|
-
}
|
|
140
|
-
async removeFileFromModule(module, file) {
|
|
141
|
-
const response = await this.client.delete(`/modules/${module}/file/${file}`);
|
|
142
|
-
return response.data;
|
|
143
|
-
}
|
|
144
|
-
async installModule(params) {
|
|
145
|
-
const response = await this.client.post('/modules/install', params);
|
|
146
|
-
return response.data;
|
|
147
|
-
}
|
|
148
|
-
async deleteModule(uuid) {
|
|
149
|
-
const response = await this.client.delete(`/modules/${module}`);
|
|
150
|
-
return response.data;
|
|
151
|
-
}
|
|
152
106
|
// Directory methods
|
|
153
107
|
async getDirectory(uuid) {
|
|
154
108
|
const response = await this.client.get(`/directory/${uuid}`);
|
package/package.json
CHANGED