@dforge-core/dforge-mcp 0.2.23 → 0.2.24

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/server.js CHANGED
@@ -31283,7 +31283,7 @@ function buildZedTasks() {
31283
31283
  var fs = __toESM(require("fs"));
31284
31284
  var path = __toESM(require("path"));
31285
31285
 
31286
- // node_modules/.pnpm/@dforge-core+metadata@0.0.26/node_modules/@dforge-core/metadata/dist/index.js
31286
+ // node_modules/.pnpm/@dforge-core+metadata@0.0.27/node_modules/@dforge-core/metadata/dist/index.js
31287
31287
  var AggType = {
31288
31288
  Sum: "sum",
31289
31289
  Count: "count",
@@ -34448,7 +34448,7 @@ function entityDelete(args) {
34448
34448
  // src/tools/action-add.ts
34449
34449
  var path9 = __toESM(require("path"));
34450
34450
 
34451
- // node_modules/.pnpm/@dforge-core+metadata@0.0.26/node_modules/@dforge-core/metadata/dist/dsl/index.js
34451
+ // node_modules/.pnpm/@dforge-core+metadata@0.0.27/node_modules/@dforge-core/metadata/dist/dsl/index.js
34452
34452
  var PUNCT3 = ["===", "!=="];
34453
34453
  var PUNCT2 = [
34454
34454
  "==",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dforge-core/dforge-mcp",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "MCP server for dForge module authoring. Exposes 34 scaffold/patch/validate/pack/install tools and schema resources so AI agents (Claude Code, Cursor, Zed) can create and ship dForge modules.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/iash44/dForge-core",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@dforge-core/dforge-cli": "^0.2.19",
39
- "@dforge-core/metadata": "^0.0.26",
39
+ "@dforge-core/metadata": "^0.0.27",
40
40
  "@modelcontextprotocol/sdk": "^1.30.0",
41
41
  "zod": "^4.4.3"
42
42
  },
@@ -0,0 +1,141 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "dForge Module Card Layouts",
4
+ "description": "Module-shipped card (form) layouts for a dForge module package (ui/card_layouts.json). Each key is the layout_name stored in dForge.entity_view_layout. Rows written from here carry module_id, so they are recreated on every install and removed on uninstall; a layout the tenant drew in the card editor has module_id NULL and is never touched.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "type": "object",
8
+ "properties": {
9
+ "entity": {
10
+ "type": "string",
11
+ "description": "Entity code the layout belongs to. Unqualified means this module owns the entity; the cross-module form 'module.entity' targets another module's entity (a bridge module shipping a layout for its host)."
12
+ },
13
+ "view": {
14
+ "type": "string",
15
+ "default": "default",
16
+ "description": "Entity view the layout hangs off, matching an entity_view row's view_name. Defaults to 'default' — the same fallback entity.getLayouts and entity.saveLayout use for an entity with no folder binding of its own. Matched against the entity's declared views case-insensitively, and filed under their spelling; the installer creates the view row only when nothing matches."
17
+ },
18
+ "isDefault": {
19
+ "type": "boolean",
20
+ "default": false,
21
+ "description": "Whether this layout opens by default. Honoured on FIRST install only, and only when the view has no default layout yet — once a tenant has chosen their own default, an upgrade does not take it back."
22
+ },
23
+ "description": {
24
+ "type": "string",
25
+ "description": "Human-readable note for the package author. Not stored."
26
+ },
27
+ "layout": {
28
+ "$ref": "#/$defs/cardLayout",
29
+ "description": "The layout body, stored verbatim into entity_view_layout.layout. Same shape the card editor saves."
30
+ }
31
+ },
32
+ "required": ["entity", "layout"],
33
+ "additionalProperties": false
34
+ },
35
+ "$defs": {
36
+ "cardLayout": {
37
+ "type": "object",
38
+ "properties": {
39
+ "sections": {
40
+ "type": "array",
41
+ "description": "Ordered sections rendered down the card.",
42
+ "items": { "$ref": "#/$defs/section" }
43
+ },
44
+ "sets": {
45
+ "type": "object",
46
+ "description": "Per-set-field view config, keyed by the set column code. Chooses the renderer a detail grid uses ('grid' or 'list') and its persisted options.",
47
+ "additionalProperties": {
48
+ "type": "object",
49
+ "properties": {
50
+ "viewType": {
51
+ "type": "string",
52
+ "enum": ["grid", "list"],
53
+ "description": "Set renderer. Defaults to the column's own metadata."
54
+ },
55
+ "options": {
56
+ "type": "object",
57
+ "description": "Opaque per-renderer options, passed verbatim to the set registration."
58
+ }
59
+ },
60
+ "additionalProperties": false
61
+ }
62
+ }
63
+ },
64
+ "required": ["sections"],
65
+ "additionalProperties": false
66
+ },
67
+ "section": {
68
+ "oneOf": [
69
+ { "$ref": "#/$defs/columnGroupSection" },
70
+ { "$ref": "#/$defs/setSection" },
71
+ { "$ref": "#/$defs/tabGroupSection" }
72
+ ]
73
+ },
74
+ "columnGroupSection": {
75
+ "type": "object",
76
+ "description": "A group of fields laid out in 1, 2 or 3 columns.",
77
+ "properties": {
78
+ "type": { "const": "columnGroup" },
79
+ "code": { "type": "string", "description": "Section code, unique within the layout." },
80
+ "label": { "type": "string", "description": "Section heading, in the module's authoring language. The installer gives it an entity_column_group row keyed on this section's code, so translations/<locale>.json localizes it under entities.<entity>.columnGroups.<code>.label and the card shows the localized heading." },
81
+ "cols": { "type": "integer", "minimum": 1, "maximum": 3, "description": "Field columns across the group. Defaults to the card's own setting." },
82
+ "columns": {
83
+ "type": "array",
84
+ "description": "Fields in the group, in render order. A bare string is the column code; the object form adds pixel sizing.",
85
+ "items": {
86
+ "oneOf": [
87
+ { "type": "string" },
88
+ {
89
+ "type": "object",
90
+ "properties": {
91
+ "column_cd": { "type": "string", "description": "Column code on this entity." },
92
+ "width": { "type": "integer", "minimum": 1, "description": "Field width in px." },
93
+ "height": { "type": "integer", "minimum": 1, "description": "Field height in px — for multiline/textarea fields." }
94
+ },
95
+ "required": ["column_cd"],
96
+ "additionalProperties": false
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ },
102
+ "required": ["type", "code", "columns"],
103
+ "additionalProperties": false
104
+ },
105
+ "setSection": {
106
+ "type": "object",
107
+ "description": "An embedded detail grid for a 1:N set column — the master/detail building block. The label comes from the column's own metadata.",
108
+ "properties": {
109
+ "type": { "const": "set" },
110
+ "code": { "type": "string", "description": "Section code, unique within the layout." },
111
+ "setField": { "type": "string", "description": "Set column code on this entity (columnType 'S')." }
112
+ },
113
+ "required": ["type", "code", "setField"],
114
+ "additionalProperties": false
115
+ },
116
+ "tabGroupSection": {
117
+ "type": "object",
118
+ "description": "A tab bar whose tabs are other sections. This is how a record shows several detail grids without stacking them down one long form.",
119
+ "properties": {
120
+ "type": { "const": "tabGroup" },
121
+ "code": { "type": "string", "description": "Section code, unique within the layout." },
122
+ "tabs": {
123
+ "type": "array",
124
+ "minItems": 1,
125
+ "description": "Tabs in order. Each references a columnGroup section by its code, or a set column by its column code.",
126
+ "items": {
127
+ "type": "object",
128
+ "properties": {
129
+ "type": { "type": "string", "enum": ["section", "set"] },
130
+ "code": { "type": "string", "description": "The referenced section's code, or the set column's code." }
131
+ },
132
+ "required": ["type", "code"],
133
+ "additionalProperties": false
134
+ }
135
+ }
136
+ },
137
+ "required": ["type", "code", "tabs"],
138
+ "additionalProperties": false
139
+ }
140
+ }
141
+ }
@@ -14,7 +14,7 @@
14
14
  "properties": {
15
15
  "viewType": {
16
16
  "type": "string",
17
- "enum": ["grid", "list", "kanban", "calendar", "gallery", "tree-grid", "diagram", "master-detail", "library", "matrix"],
17
+ "enum": ["grid", "list", "kanban", "calendar", "gallery", "tree-grid", "diagram", "library", "matrix"],
18
18
  "default": "grid",
19
19
  "description": "View display type. Optional — omitted or unknown values fall back to 'grid' at runtime."
20
20
  },
@@ -57,7 +57,6 @@
57
57
  { "$ref": "#/$defs/rules/tree-grid" },
58
58
  { "$ref": "#/$defs/rules/list" },
59
59
  { "$ref": "#/$defs/rules/diagram" },
60
- { "$ref": "#/$defs/rules/master-detail" },
61
60
  { "$ref": "#/$defs/rules/matrix" }
62
61
  ]
63
62
  },
@@ -118,17 +117,6 @@
118
117
  }
119
118
  }
120
119
  },
121
- "master-detail": {
122
- "if": {
123
- "properties": { "viewType": { "const": "master-detail" } },
124
- "required": ["viewType"]
125
- },
126
- "then": {
127
- "properties": {
128
- "dataSources": { "minItems": 2 }
129
- }
130
- }
131
- },
132
120
  "matrix": {
133
121
  "if": {
134
122
  "properties": { "viewType": { "const": "matrix" } },
@@ -493,7 +481,7 @@
493
481
  },
494
482
  "label": {
495
483
  "type": "string",
496
- "description": "Human-readable label for this data source (used in master-detail tabs)"
484
+ "description": "Human-readable label for this data source"
497
485
  },
498
486
  "columns": {
499
487
  "type": "array",
@@ -38,6 +38,10 @@
38
38
  "toString": {
39
39
  "description": "Display pattern using column placeholders, e.g. \"{first_name} {last_name}\". Optional in extension entities (with `extends`). No `type` constraint here because `toString` collides with Object.prototype.toString in JSON validators — they read the inherited function and reject it, even when the property is absent from the JSON."
40
40
  },
41
+ "comments": {
42
+ "type": "boolean",
43
+ "description": "Records of this entity accept comments \u2014 the composer and thread appear on the record card, beside the audit history. Opt-in per entity; `comments` in the manifest sets a module-wide default that this overrides in both directions."
44
+ },
41
45
  "traits": {
42
46
  "type": "array",
43
47
  "description": "Entity traits expanded during module install (authoring shortcut). Trait definitions loaded from DB (seeded by metadata module).",
@@ -221,9 +225,48 @@
221
225
  },
222
226
  "additionalProperties": false
223
227
  },
228
+ "registryColumnParams": {
229
+ "type": "object",
230
+ "description": "params of an accumulation (A) or ledger (L) registry column. The lock lists are what BOTH generated guards freeze — the posted-document guard while the document is posted, the period guard while its period is closed — and they are required: install refuses a registry column that omits or empties them. The header's periodDateField and the state column are watched in addition, whatever the list says.",
231
+ "required": ["lockedFields"],
232
+ "properties": {
233
+ "lockedFields": {
234
+ "type": "array",
235
+ "minItems": 1,
236
+ "items": { "type": "string", "minLength": 1 },
237
+ "description": "Header fields frozen while the document is posted and while its period is closed. Required. [\"*\"] freezes the whole row."
238
+ },
239
+ "lockedLineFields": {
240
+ "type": "array",
241
+ "minItems": 1,
242
+ "items": { "type": "string", "minLength": 1 },
243
+ "description": "Line fields frozen under a posted or period-closed header. Required when lineEntity is declared, rejected when it is not. [\"*\"] freezes the whole row; the line's foreign key to the header is watched in addition."
244
+ },
245
+ "lineEntity": { "type": "string", "description": "The line entity, defined in this module. Declare together with lineField and lockedLineFields, or none of the three for a document without lines." },
246
+ "lineField": { "type": "string", "description": "The line's foreign-key column(s) to the header, comma-separated in the header's key order for a composite key." },
247
+ "stateField": { "type": "string", "description": "The bool column that records the posted state, when it is not the registry column itself. Written only by the register engine." },
248
+ "periodEntity": { "type": "string", "description": "Period entity this registry closes against — one of this module's, or 'module.entity' from a dependency." },
249
+ "periodDateField": { "type": "string", "description": "Header date column that resolves the period." },
250
+ "periodKeyField": { "type": "string", "default": "period_key" },
251
+ "periodClosedField": { "type": "string", "default": "closed" }
252
+ },
253
+ "dependencies": {
254
+ "lineEntity": ["lineField", "lockedLineFields"],
255
+ "lineField": ["lineEntity"],
256
+ "lockedLineFields": ["lineEntity"],
257
+ "periodEntity": ["periodDateField"]
258
+ },
259
+ "additionalProperties": true
260
+ },
224
261
  "field": {
225
262
  "type": "object",
226
263
  "description": "Entity column/field definition",
264
+ "allOf": [
265
+ {
266
+ "if": { "required": ["columnType"], "properties": { "columnType": { "enum": ["A", "L"] } } },
267
+ "then": { "required": ["params"], "properties": { "params": { "$ref": "#/$defs/registryColumnParams" } } }
268
+ }
269
+ ],
227
270
  "properties": {
228
271
  "dbDatatype": {
229
272
  "type": "string",
@@ -551,8 +594,9 @@
551
594
  "sign": { "$ref": "#/$defs/signConfig", "description": "Dynamic sign based on a field value (alternative to direction)" },
552
595
  "autoCreateBalance": { "type": "boolean", "default": true },
553
596
  "allowNegative": { "type": "boolean", "default": true },
554
- "lockedFields": { "type": "array", "items": { "type": "string" }, "description": "Document fields locked when posted" }
597
+ "lockedFields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "Document fields locked when posted. Required; [\"*\"] freezes the whole row." }
555
598
  },
599
+ "required": ["lockedFields"],
556
600
  "additionalProperties": false
557
601
  },
558
602
  "signConfig": {
@@ -107,6 +107,10 @@
107
107
  "enum": ["none", "minimal", "full"],
108
108
  "description": "Default audit history mode for entities in this module ('full' captures every field change; 'minimal' captures only inserts/deletes; 'none' disables). Individual entities can override."
109
109
  },
110
+ "comments": {
111
+ "type": "boolean",
112
+ "description": "Default for `comments` on every entity in this module. Individual entities override it, including overriding true with false."
113
+ },
110
114
  "entities": {
111
115
  "type": "object",
112
116
  "description": "Entity definitions and extensions: entity code → relative path to entity JSON file. Dotted keys (e.g. 'fin.invoice') indicate extensions of other modules' entities (the entity file must have an 'extends' property).",