@compilr-dev/factory 0.1.1 → 0.1.2

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.
@@ -112,7 +112,18 @@ function createAppModelGetTool(config) {
112
112
  function createAppModelUpdateTool(config) {
113
113
  return defineTool({
114
114
  name: 'app_model_update',
115
- description: `Apply a semantic operation to the Application Model. Operations: addEntity, updateEntity, removeEntity, renameEntity, reorderEntities, addField, updateField, removeField, renameField, addRelationship, removeRelationship, updateIdentity, updateLayout, updateFeatures, updateTheme, updateTechStack. If no model exists, one is created automatically with the first addEntity.`,
115
+ description: `Apply a semantic operation to the Application Model. If no model exists, one is created automatically.
116
+
117
+ EXAMPLES:
118
+ - updateIdentity: { "op": "updateIdentity", "updates": { "name": "My App", "description": "A task manager" } }
119
+ - updateTechStack: { "op": "updateTechStack", "updates": { "toolkit": "react-node" } }
120
+ - addEntity: { "op": "addEntity", "entity": { "name": "Task", "pluralName": "Tasks", "icon": "📋", "fields": [{ "name": "title", "label": "Title", "type": "string", "required": true }], "views": ["list", "detail", "card"], "relationships": [] } }
121
+ - addField: { "op": "addField", "entity": "Task", "field": { "name": "dueDate", "label": "Due Date", "type": "date", "required": false } }
122
+ - addRelationship: { "op": "addRelationship", "entity": "Task", "relationship": { "type": "belongsTo", "target": "Project" } }
123
+ - updateFeatures: { "op": "updateFeatures", "updates": { "dashboard": true, "darkMode": true } }
124
+ - updateTheme: { "op": "updateTheme", "updates": { "primaryColor": "#1976D2" } }
125
+ - updateLayout: { "op": "updateLayout", "updates": { "shell": "sidebar-header" } }
126
+ - removeEntity: { "op": "removeEntity", "entity": "Task", "force": true }`,
116
127
  inputSchema: {
117
128
  type: 'object',
118
129
  properties: {
@@ -143,14 +154,17 @@ function createAppModelUpdateTool(config) {
143
154
  description: 'Expected current revision for optimistic locking. Optional.',
144
155
  },
145
156
  entity: {
146
- description: 'Entity name (string) or full entity object (for addEntity).',
157
+ oneOf: [{ type: 'string' }, { type: 'object', additionalProperties: true }],
158
+ description: 'Entity name (string) for most ops, or full entity object (for addEntity). Entity object requires: name (PascalCase), pluralName, icon, fields array, views array, relationships array.',
147
159
  },
148
160
  field: {
149
- description: 'Field name (string) or full field object (for addField).',
161
+ oneOf: [{ type: 'string' }, { type: 'object', additionalProperties: true }],
162
+ description: 'Field name (string) for updateField/removeField/renameField, or full field object (for addField). Field object requires: name (camelCase), label, type (string|number|boolean|date|enum), required.',
150
163
  },
151
164
  relationship: {
152
165
  type: 'object',
153
- description: 'Relationship object for addRelationship.',
166
+ additionalProperties: true,
167
+ description: 'Relationship object for addRelationship. Requires: type ("belongsTo" or "hasMany"), target (entity name). Optional: fieldName.',
154
168
  properties: {
155
169
  type: { type: 'string', enum: ['belongsTo', 'hasMany'] },
156
170
  target: { type: 'string' },
@@ -159,7 +173,8 @@ function createAppModelUpdateTool(config) {
159
173
  },
160
174
  updates: {
161
175
  type: 'object',
162
- description: 'Partial updates for update operations.',
176
+ additionalProperties: true,
177
+ description: 'Partial updates object for updateIdentity, updateLayout, updateFeatures, updateTheme, updateTechStack, updateEntity.',
163
178
  },
164
179
  newName: {
165
180
  type: 'string',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/factory",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "AI-driven application scaffolder for the compilr-dev ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",