@stellisoft/stellify-mcp 0.1.22 → 0.1.23

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 CHANGED
@@ -72,6 +72,10 @@ Use this tool when you need to:
72
72
  - Verify method names before generating code
73
73
  - Understand the full API surface
74
74
 
75
+ IMPORTANT - Stellify Framework Import:
76
+ The npm package is "stellify-framework" (NOT @stellify/core).
77
+ Import like: import { Http, List, Form } from 'stellify-framework';
78
+
75
79
  IMPORTANT - List class and Vue reactivity:
76
80
  The List class methods return List instances, NOT plain arrays.
77
81
  Vue's v-for directive cannot iterate over List instances directly.
@@ -1390,14 +1394,22 @@ Key concepts:
1390
1394
 
1391
1395
  ## Vue Component Workflow
1392
1396
 
1393
- 1. get_project → find 'js' directory UUID
1394
- 2. create_file → type='js', extension='vue'
1395
- 3. Create statements for imports: "import { ref } from 'vue';" (REQUIRED for ref())
1397
+ 1. get_project → find 'js' directory UUID (or create it)
1398
+ 2. create_file → type='js', extension='vue' for the component
1399
+ 3. Create statements for imports:
1400
+ - "import { ref } from 'vue';" (REQUIRED for ref())
1401
+ - "import { Http, List } from 'stellify-framework';" (for Stellify classes)
1402
+ NOTE: The npm package is "stellify-framework" (NOT @stellify/core)
1396
1403
  4. Create statements for data: "const count = ref(0);"
1397
1404
  5. create_method + add_method_body → functions
1398
1405
  6. html_to_elements → template (no 'page' param for components)
1399
1406
  7. update_element → wire click handlers to method UUIDs
1400
1407
  8. save_file with: extension='vue', template=[elementUuid], data=[methodUuids], statements=[importUuids, refUuids]
1408
+ 9. **MANDATORY: Create app.js entry file** (see "CRITICAL: JavaScript Entry File" section below)
1409
+ 10. Create web route for the page
1410
+ 11. **MANDATORY: Add a div with id="app"** to the page using html_to_elements:
1411
+ - html_to_elements with page=routeUuid and elements='<div id="app"></div>'
1412
+ - This is where Vue mounts the component. Without it, nothing renders!
1401
1413
 
1402
1414
  ## Real-Time UI (broadcast_element_command)
1403
1415
 
@@ -1406,6 +1418,9 @@ Use html_to_elements/update_element for permanent/saved changes.
1406
1418
 
1407
1419
  ## Common Pitfalls
1408
1420
 
1421
+ - **Stellify imports:** Use "stellify-framework" package (NOT @stellify/core)
1422
+ CORRECT: import { Http, List, Form } from 'stellify-framework';
1423
+ WRONG: import { Http } from '@stellify/core';
1409
1424
  - v-model requires ref(), NOT Form class: const formData = ref({title: ''})
1410
1425
  - List.from() returns List, not array - use .toArray() for v-for
1411
1426
  - add_method_body APPENDS, doesn't replace - create new method to replace
@@ -1446,11 +1461,63 @@ When building features, group related files by passing a "module" parameter.
1446
1461
  - create_file(..., module: "blog-posts") - auto-groups file
1447
1462
  - create_route(..., module: "blog-posts") - auto-groups route
1448
1463
 
1449
- Modules are auto-created if they don't exist. This helps users see all code related to a feature grouped together.`;
1464
+ Modules are auto-created if they don't exist. This helps users see all code related to a feature grouped together.
1465
+
1466
+ ## CRITICAL: JavaScript Entry File (app.js)
1467
+
1468
+ **You MUST have a JS entry file to register Vue components for use on pages.**
1469
+
1470
+ ### First component in a project:
1471
+ 1. Create app.js in the 'js' directory:
1472
+ - create_file with type='js', extension='js', name='app'
1473
+ 2. Add statements:
1474
+ - "import { createApp } from 'vue';"
1475
+ - "import NotesApp from './NotesApp.vue';"
1476
+ - "createApp(NotesApp).mount('#app');"
1477
+ 3. save_file with all statement UUIDs
1478
+
1479
+ ### Adding more components (app.js already exists):
1480
+ 1. **search_files** for "app" to find existing app.js
1481
+ 2. **get_file** to retrieve current statements
1482
+ 3. Add ONLY the new import statement:
1483
+ - "import Counter from './Counter.vue';"
1484
+ 4. Update the mount code to register the new component:
1485
+ - Create new statement: "app.component('Counter', Counter);"
1486
+ - Or recreate the initialization to include all components
1487
+ 5. save_file with updated statements array
1488
+
1489
+ **DO NOT create duplicate app.js files or duplicate createApp imports!**
1490
+
1491
+ ### Page mount point (div#app):
1492
+ Each page that uses Vue components needs a \`<div id="app"></div>\`.
1493
+
1494
+ - **First time on a page:** html_to_elements(page=routeUuid, elements='<div id="app"></div>')
1495
+ - **Page already has it:** Do NOT add another one. Check with get_route first if unsure.
1496
+
1497
+ **Without app.js AND div#app, Vue components will NOT render!**
1498
+
1499
+ Example app.js with multiple components:
1500
+ \`\`\`javascript
1501
+ import { createApp } from 'vue';
1502
+ import NotesApp from './NotesApp.vue';
1503
+ import Counter from './Counter.vue';
1504
+
1505
+ const app = createApp({});
1506
+ app.component('NotesApp', NotesApp);
1507
+ app.component('Counter', Counter);
1508
+ app.mount('#app');
1509
+ \`\`\`
1510
+
1511
+ ## Efficiency Tips
1512
+
1513
+ - **Move elements between routes:** Use \`update_element\` to change \`routeParent\` - don't delete/recreate
1514
+ - **Reparent elements:** Update \`parent\` attribute instead of recreating
1515
+ - **Reorder children:** Update parent's \`data\` array with new UUID order
1516
+ - Always prefer updating over deleting and recreating`;
1450
1517
  // Create MCP server
1451
1518
  const server = new Server({
1452
1519
  name: 'stellify-mcp',
1453
- version: '0.1.22',
1520
+ version: '0.1.23',
1454
1521
  }, {
1455
1522
  capabilities: {
1456
1523
  tools: {},
@@ -1892,7 +1959,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
1892
1959
  }
1893
1960
  case 'save_statement': {
1894
1961
  const { uuid, ...data } = args;
1895
- const result = await stellify.saveStatement(uuid, data);
1962
+ const result = await stellify.saveStatement(uuid, { uuid, ...data });
1896
1963
  return {
1897
1964
  content: [
1898
1965
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellisoft/stellify-mcp",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "mcpName": "io.github.MattStellisoft/stellify-mcp",
5
5
  "description": "MCP server for Stellify - AI-native code generation platform",
6
6
  "main": "dist/index.js",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/Stellify-Software-Ltd/stellify-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.22",
9
+ "version": "0.1.23",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@stellisoft/stellify-mcp",
14
- "version": "0.1.22",
14
+ "version": "0.1.23",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },