@dforge-core/dforge-mcp 0.2.30 → 0.2.31
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ All notable changes to `@dforge-core/dforge-mcp`. This project uses semver-ish
|
|
|
4
4
|
`0.1.0-rc.N` pre-release tags; the published version is set at publish time via
|
|
5
5
|
the release workflow, so committed `package.json` versions are placeholders.
|
|
6
6
|
|
|
7
|
+
## 0.2.31
|
|
8
|
+
|
|
9
|
+
**`dforge://reference/formulas` showed check constraints in formula syntax**
|
|
10
|
+
(dForge-core#1263). Its examples were `[quantity] > 0` and `[end_date] >= [start_date]`,
|
|
11
|
+
but a check constraint's `expression` is copied into a PostgreSQL `CHECK (...)` as is. A
|
|
12
|
+
module written from the reference passed `dforge_module_validate` and then failed the
|
|
13
|
+
install with `syntax error at or near "["`. The reference now shows plain SQL over real
|
|
14
|
+
column names, with `IS NULL` / `IS NOT NULL` instead of the formula engine's `= null`.
|
|
15
|
+
|
|
16
|
+
- With `@dforge-core/dforge-cli` 0.2.24 or later, `dforge_module_validate` also reports
|
|
17
|
+
both mistakes as errors under `cli: check constraints`: a `[field]` reference, and a
|
|
18
|
+
comparison with `null`, which in SQL never fails the CHECK. An older CLI skips the check.
|
|
19
|
+
|
|
7
20
|
## 0.2.28
|
|
8
21
|
|
|
9
22
|
**`dforge_module_validate` reported a clean module that `pack` then rejected**
|
package/dist/server.js
CHANGED
|
@@ -31002,7 +31002,7 @@ var import_node_crypto = require("crypto");
|
|
|
31002
31002
|
var fs2 = __toESM(require("fs"));
|
|
31003
31003
|
var path2 = __toESM(require("path"));
|
|
31004
31004
|
|
|
31005
|
-
// node_modules/.pnpm/@dforge-core+dforge-cli@0.2.
|
|
31005
|
+
// node_modules/.pnpm/@dforge-core+dforge-cli@0.2.24/node_modules/@dforge-core/dforge-cli/dist/lib.mjs
|
|
31006
31006
|
function buildManifest(opts, moduleId) {
|
|
31007
31007
|
const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
31008
31008
|
const manifest = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dforge-core/dforge-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"description": "MCP server for dForge module authoring. Exposes 35 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",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=18"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dforge-core/dforge-cli": "^0.2.
|
|
29
|
+
"@dforge-core/dforge-cli": "^0.2.24",
|
|
30
30
|
"@dforge-core/metadata": "^0.0.30",
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
32
32
|
"zod": "^4.4.3"
|
|
@@ -246,14 +246,21 @@ In modules that use settings, formulas can reference setting values with `$[Sett
|
|
|
246
246
|
|
|
247
247
|
## Validation and CHECK constraints
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
A check constraint's `expression` is **not** a formula. It is copied verbatim into a
|
|
250
|
+
PostgreSQL `CHECK (...)`, so write plain SQL over real column names — no `[brackets]`, and
|
|
251
|
+
`IS NULL` / `IS NOT NULL` instead of the formula engine's null-safe `= null` / `!= null`:
|
|
250
252
|
|
|
251
253
|
```
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
quantity > 0
|
|
255
|
+
end_date IS NULL OR end_date >= start_date
|
|
256
|
+
cancelled = false OR cancel_reason_id IS NOT NULL
|
|
255
257
|
```
|
|
256
258
|
|
|
259
|
+
`module validate` rejects both formula habits: `[field]` fails the install with
|
|
260
|
+
`syntax error at or near "["`, and `x != null` is never true in SQL, so the CHECK would
|
|
261
|
+
always pass. The client pre-validates only a subset of SQL (comparisons, `AND`/`OR`/`NOT`,
|
|
262
|
+
`IN`, `BETWEEN`, `IS [NOT] NULL`, arithmetic, regex `~`); the database enforces the rest.
|
|
263
|
+
|
|
257
264
|
The constraint's `message` (the violation text shown to users) is **localizable** — add a per-locale override at `entities.<entityCd>.constraints.<constraintName>.message` in each `translations/<locale>.json`. The base `message` in the entity JSON is the fallback. See `translations.md` → "Constraint violation messages ARE translatable".
|
|
258
265
|
|
|
259
266
|
## Examples — full formula columns
|