@dforge-core/dforge-mcp 0.1.0-rc.1 → 0.1.0-rc.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dforge-core/dforge-mcp",
3
- "version": "0.1.0-rc.1",
3
+ "version": "0.1.0-rc.2",
4
4
  "description": "MCP server for dForge module authoring. Exposes scaffold/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",
@@ -27,7 +27,7 @@
27
27
  "typecheck": "tsc --noEmit"
28
28
  },
29
29
  "dependencies": {
30
- "@dforge-core/dforge-cli": "0.1.0-rc.6",
30
+ "@dforge-core/dforge-cli": "0.1.0-rc.7",
31
31
  "@modelcontextprotocol/sdk": "^1.0.4",
32
32
  "zod": "^3.24.1"
33
33
  },
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dforge.dev/schemas/folders.schema.json",
4
+ "title": "dForge Folders",
5
+ "description": "Folder definitions for a dForge module",
6
+ "type": "object",
7
+ "additionalProperties": {
8
+ "$ref": "#/$defs/folder"
9
+ },
10
+ "$defs": {
11
+ "folder": {
12
+ "type": "object",
13
+ "required": ["label"],
14
+ "properties": {
15
+ "label": {
16
+ "type": "string",
17
+ "description": "Folder display name"
18
+ },
19
+ "description": {
20
+ "type": "string",
21
+ "description": "Optional description text (shown in breadcrumb/header area)"
22
+ },
23
+ "parentCode": {
24
+ "type": ["string", "null"],
25
+ "description": "Parent folder code (null for root folders)"
26
+ },
27
+ "folderPath": {
28
+ "type": "string",
29
+ "description": "URL-friendly folder path"
30
+ },
31
+ "color": {
32
+ "type": "string",
33
+ "description": "Folder accent color (hex)"
34
+ },
35
+ "inheritSecurity": {
36
+ "type": "boolean",
37
+ "description": "Whether to inherit security from parent folder"
38
+ },
39
+ "entities": {
40
+ "type": "object",
41
+ "description": "Entity code → folder-entity config",
42
+ "additionalProperties": {
43
+ "$ref": "#/$defs/folderEntity"
44
+ }
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "folderEntity": {
50
+ "type": "object",
51
+ "properties": {
52
+ "viewName": {
53
+ "type": "string",
54
+ "description": "Entity view name to use in this folder"
55
+ },
56
+ "quickAdd": {
57
+ "type": "boolean",
58
+ "description": "Enable quick-add for this entity in this folder"
59
+ },
60
+ "rowFilter": {
61
+ "description": "Row-level filter criteria for this entity in this folder"
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "dForge Module Scheduled Jobs",
4
+ "description": "Cron job declarations for a dForge module package (logic/jobs.json). The dForge.Scheduler service polls these and fires each job on its schedule.",
5
+ "type": "object",
6
+ "required": ["jobs"],
7
+ "properties": {
8
+ "jobs": {
9
+ "type": "array",
10
+ "maxItems": 50,
11
+ "description": "At most 50 jobs per module — guard against accidental fan-out from generated declarations.",
12
+ "items": {
13
+ "type": "object",
14
+ "required": ["code", "action", "schedule", "timeout"],
15
+ "properties": {
16
+ "code": {
17
+ "type": "string",
18
+ "maxLength": 100,
19
+ "pattern": "^[a-z][a-z0-9_]*$",
20
+ "description": "Unique identifier within the module."
21
+ },
22
+ "description": {
23
+ "type": "string",
24
+ "description": "Human-readable description of what the job does."
25
+ },
26
+ "action": {
27
+ "type": "string",
28
+ "description": "Action code in this module (e.g. 'generate_invoices'). The scheduler resolves it to action_implementation.impl_id at install time."
29
+ },
30
+ "schedule": {
31
+ "type": "string",
32
+ "description": "Five-field cron expression (minute granularity). Sub-minute schedules are rejected.",
33
+ "pattern": "^\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+$"
34
+ },
35
+ "params": {
36
+ "type": "object",
37
+ "description": "Static parameters passed to the action as __params. Folder-scoped overrides go through module settings, not here.",
38
+ "additionalProperties": true
39
+ },
40
+ "timeout": {
41
+ "type": "integer",
42
+ "minimum": 1,
43
+ "maximum": 3600,
44
+ "description": "Hard timeout in seconds. Required — there is no implicit default. Must be > 300 only if class = 'long_running' (60-minute hard ceiling)."
45
+ },
46
+ "concurrency": {
47
+ "type": "integer",
48
+ "minimum": 1,
49
+ "maximum": 5,
50
+ "default": 1,
51
+ "description": "Max parallel runs. 1 means single-instance; the scheduler skips a new fire if a previous one is still in flight (Phase 3 enforcement)."
52
+ },
53
+ "idempotencyKey": {
54
+ "type": "string",
55
+ "description": "Template like '{job_cd}:{run.month}'. Resolved at fire time. A successful run with the same key blocks re-dispatch (Phase 3 enforcement)."
56
+ },
57
+ "class": {
58
+ "type": "string",
59
+ "enum": ["standard", "long_running"],
60
+ "default": "standard",
61
+ "description": "Routing class. 'long_running' is opt-in and required for any timeout > 300 seconds."
62
+ },
63
+ "timeZone": {
64
+ "type": "string",
65
+ "description": "IANA tz name (e.g. 'Asia/Tokyo'). Overrides the tenant default. Omit to fall back to auth.tenant.time_zone."
66
+ },
67
+ "enabled": {
68
+ "type": "boolean",
69
+ "default": true,
70
+ "description": "Master switch. False fully disables (no scheduler, no manual trigger)."
71
+ },
72
+ "paused": {
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "Soft pause. Scheduler skips firing, but admin 'trigger now' still works."
76
+ }
77
+ },
78
+ "additionalProperties": false
79
+ }
80
+ }
81
+ },
82
+ "additionalProperties": false
83
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dforge.dev/schemas/menus.schema.json",
4
+ "title": "dForge Menus",
5
+ "description": "Menu definitions for a dForge module",
6
+ "type": "object",
7
+ "additionalProperties": {
8
+ "$ref": "#/$defs/menu"
9
+ },
10
+ "$defs": {
11
+ "menu": {
12
+ "type": "object",
13
+ "required": ["label", "items"],
14
+ "properties": {
15
+ "label": {
16
+ "type": "string",
17
+ "description": "Menu display name"
18
+ },
19
+ "description": {
20
+ "type": "string",
21
+ "description": "Optional description text (tooltip, subtitle)"
22
+ },
23
+ "folders": {
24
+ "type": "array",
25
+ "items": { "type": "string" },
26
+ "description": "Folder codes where this menu is available"
27
+ },
28
+ "items": {
29
+ "type": "object",
30
+ "description": "Menu items keyed by item code",
31
+ "additionalProperties": {
32
+ "$ref": "#/$defs/menuItem"
33
+ }
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "menuItem": {
39
+ "type": "object",
40
+ "required": ["orderNum", "label"],
41
+ "properties": {
42
+ "itemType": {
43
+ "type": ["string", "null"],
44
+ "enum": ["V", "D", "R", null],
45
+ "description": "Item type: V=Data View, D=Document, R=Report, null=folder/section"
46
+ },
47
+ "dataViewCode": {
48
+ "type": "string",
49
+ "description": "Data view code (when itemType is 'V')"
50
+ },
51
+ "documentCode": {
52
+ "type": "string",
53
+ "description": "Document code (when itemType is 'D')"
54
+ },
55
+ "reportCode": {
56
+ "type": "string",
57
+ "description": "Report code (when itemType is 'R')"
58
+ },
59
+ "orderNum": {
60
+ "type": "integer",
61
+ "description": "Display order"
62
+ },
63
+ "label": {
64
+ "type": "string",
65
+ "description": "Menu item display text"
66
+ },
67
+ "description": {
68
+ "type": "string",
69
+ "description": "Optional description text (tooltip, subtitle)"
70
+ },
71
+ "icon": {
72
+ "type": "string",
73
+ "description": "Bootstrap icon name"
74
+ },
75
+ "children": {
76
+ "type": "object",
77
+ "description": "Child menu items (for folder/section items)",
78
+ "additionalProperties": {
79
+ "$ref": "#/$defs/menuItem"
80
+ }
81
+ }
82
+ },
83
+ "additionalProperties": false
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dforge.dev/schemas/roles.schema.json",
4
+ "title": "dForge Roles",
5
+ "description": "Role definitions with entity rights for a dForge module",
6
+ "type": "object",
7
+ "additionalProperties": {
8
+ "$ref": "#/$defs/role"
9
+ },
10
+ "$defs": {
11
+ "role": {
12
+ "type": "object",
13
+ "required": ["description", "rights"],
14
+ "properties": {
15
+ "description": {
16
+ "type": "string",
17
+ "description": "Role display name"
18
+ },
19
+ "rights": {
20
+ "type": "object",
21
+ "description": "Entity rights: entity code → rights string",
22
+ "additionalProperties": {
23
+ "type": "string",
24
+ "pattern": "^[SIUDCE]*$",
25
+ "description": "Rights: S=Select, I=Insert, U=Update, D=Delete, C=Clone, E=Execute"
26
+ }
27
+ }
28
+ },
29
+ "additionalProperties": false
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dforge.dev/schemas/seed_data.schema.json",
4
+ "title": "dForge Seed Data",
5
+ "description": "Seed data records for a dForge entity",
6
+ "type": "object",
7
+ "required": ["entityCode", "records"],
8
+ "properties": {
9
+ "entityCode": {
10
+ "type": "string",
11
+ "description": "Target entity code to insert records into"
12
+ },
13
+ "records": {
14
+ "type": "array",
15
+ "description": "Array of records, each record is an object with column_code → value",
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": true
19
+ }
20
+ }
21
+ },
22
+ "additionalProperties": false
23
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dforge.dev/schemas/traits.schema.json",
4
+ "title": "dForge Trait Definitions",
5
+ "description": "Defines entity traits that expand into fields, references, and constraints during module install. Shipped as traits.json at module root.",
6
+ "type": "object",
7
+ "additionalProperties": {
8
+ "$ref": "#/$defs/traitDefinition"
9
+ },
10
+ "$defs": {
11
+ "traitDefinition": {
12
+ "type": "object",
13
+ "description": "A single trait definition",
14
+ "properties": {
15
+ "description": {
16
+ "type": "string",
17
+ "description": "Human-readable description of the trait"
18
+ },
19
+ "includes": {
20
+ "type": "array",
21
+ "items": { "type": "string" },
22
+ "description": "Other trait names to include (inherit fields from). Expanded recursively with circular reference protection."
23
+ },
24
+ "fields": {
25
+ "type": "object",
26
+ "description": "Field definitions to add to entities using this trait. Keys support {entity}/{Entity} placeholders for parametric names.",
27
+ "additionalProperties": {
28
+ "$ref": "#/$defs/traitField"
29
+ }
30
+ },
31
+ "references": {
32
+ "type": "object",
33
+ "description": "FK reference definitions to add. Keys support {Entity} placeholder.",
34
+ "additionalProperties": {
35
+ "$ref": "#/$defs/traitReference"
36
+ }
37
+ },
38
+ "constraints": {
39
+ "type": "object",
40
+ "description": "Constraint definitions to add. Keys support {Entity} placeholder (e.g. 'UQ_{Entity}_period_key')."
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ },
45
+ "traitField": {
46
+ "type": "object",
47
+ "description": "Field definition within a trait. Same shape as entity field definitions.",
48
+ "properties": {
49
+ "dbDatatype": { "type": "string" },
50
+ "columnType": { "type": "string" },
51
+ "fieldTypeCd": { "type": "string" },
52
+ "flags": { "type": "string" },
53
+ "isPk": { "type": "boolean" },
54
+ "isIdentity": { "type": "boolean" },
55
+ "isNullable": { "type": "boolean" },
56
+ "formula": { "type": "string" },
57
+ "orderNum": { "type": "integer" },
58
+ "description": { "type": "string", "description": "Supports {entity}/{Entity} placeholders" },
59
+ "maxLen": { "type": "integer" },
60
+ "link": {
61
+ "type": "object",
62
+ "properties": {
63
+ "entity": { "type": "string" },
64
+ "thisKey": { "type": "string" },
65
+ "otherKey": { "type": "string" }
66
+ },
67
+ "required": ["entity", "thisKey", "otherKey"],
68
+ "additionalProperties": false
69
+ }
70
+ },
71
+ "additionalProperties": false
72
+ },
73
+ "traitReference": {
74
+ "type": "object",
75
+ "description": "FK reference definition within a trait",
76
+ "required": ["from", "to"],
77
+ "properties": {
78
+ "from": {
79
+ "type": "object",
80
+ "required": ["field"],
81
+ "properties": {
82
+ "field": { "type": "string" }
83
+ },
84
+ "additionalProperties": false
85
+ },
86
+ "to": {
87
+ "type": "object",
88
+ "required": ["entity", "field"],
89
+ "properties": {
90
+ "entity": { "type": "string" },
91
+ "field": { "type": "string" }
92
+ },
93
+ "additionalProperties": false
94
+ }
95
+ },
96
+ "additionalProperties": false
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "dForge Module Webhooks",
4
+ "description": "Webhook subscription definitions for a dForge module package (webhooks.json)",
5
+ "type": "object",
6
+ "required": ["subscriptions"],
7
+ "properties": {
8
+ "subscriptions": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "required": ["code", "description", "entity", "event"],
13
+ "properties": {
14
+ "code": {
15
+ "type": "string",
16
+ "maxLength": 100,
17
+ "pattern": "^[a-z][a-z0-9_]*$",
18
+ "description": "Unique identifier within the module"
19
+ },
20
+ "description": {
21
+ "type": "string",
22
+ "description": "Human-readable description"
23
+ },
24
+ "entity": {
25
+ "type": "string",
26
+ "description": "Entity code that triggers this webhook"
27
+ },
28
+ "event": {
29
+ "type": "string",
30
+ "enum": ["insert", "update", "delete", "status_change", "any"],
31
+ "description": "Event type that fires this webhook"
32
+ },
33
+ "condition": {
34
+ "type": "string",
35
+ "description": "Formula evaluated against the record. Webhook fires only if true."
36
+ },
37
+ "endpointUrl": {
38
+ "type": "string",
39
+ "format": "uri",
40
+ "description": "Default endpoint URL. Integration modules ship with this pre-configured; admin can override."
41
+ },
42
+ "secretCd": {
43
+ "type": "string",
44
+ "description": "Secret code for API key (from dforge.secret table, admin-configured)"
45
+ },
46
+ "payload": {
47
+ "type": "object",
48
+ "properties": {
49
+ "include": {
50
+ "type": "array",
51
+ "items": { "type": "string" },
52
+ "description": "Field codes to include. If omitted, include all visible fields."
53
+ },
54
+ "includeOld": {
55
+ "type": "boolean",
56
+ "default": false,
57
+ "description": "Include previous field values on update/status_change events"
58
+ }
59
+ },
60
+ "additionalProperties": false
61
+ },
62
+ "enabled": {
63
+ "type": "boolean",
64
+ "default": true,
65
+ "description": "Can be set to false to disable without removing"
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ }
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ }