@dforge-core/dforge-mcp 0.1.8 → 0.1.10
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 +54 -0
- package/dist/server.js +298 -291
- package/package.json +4 -4
- package/resources/docs/dsl-reference.md +16 -3
- package/resources/schemas/entity.schema.json +10 -0
- package/resources/schemas/triggers.schema.json +1 -1
- package/skills/dforge-mcp-author/SKILL.md +3 -3
- package/skills/dforge-mcp-author/references/action-dsl.md +2 -1
- package/skills/dforge-mcp-author/references/column-types.md +29 -19
- package/skills/dforge-mcp-author/references/field-types.md +6 -4
- package/skills/dforge-mcp-author/references/formulas.md +22 -9
- package/skills/dforge-mcp-author/references/validation-checklist.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,60 @@ 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.1.10
|
|
8
|
+
|
|
9
|
+
### Schema
|
|
10
|
+
- **`entity.schema.json`: `references` gains `onDelete` / `onUpdate`.** Both
|
|
11
|
+
accept `cascade` | `setNull` | `restrict` | `noAction` (omitted = `noAction`,
|
|
12
|
+
a plain FK). `setNull` requires a nullable FK column; `onUpdate` is a no-op for
|
|
13
|
+
immutable `cuid` PKs but matters for entities keyed on a natural/mutable PK.
|
|
14
|
+
The keys were already documented in the skill (0.1.6) but rejected by the
|
|
15
|
+
vendored schema — `dforge_module_validate` now accepts them.
|
|
16
|
+
- **`triggers.schema.json`: clarified `async` semantics.** The description now
|
|
17
|
+
spells out that `async: false` runs the action *synchronously inside the
|
|
18
|
+
triggering transaction* (an `error()` rolls the whole mutation back and
|
|
19
|
+
surfaces to the caller), while `async: true` commits first and only logs
|
|
20
|
+
failures — so `async: false` actions must stay fast.
|
|
21
|
+
|
|
22
|
+
### Skill
|
|
23
|
+
- `dforge-mcp-author`: **corrected roll-up totals — use a Generated (`G`) column,
|
|
24
|
+
not a Formula (`F`) column.** Previous guidance (0.1.x) told authors to put
|
|
25
|
+
`SUM([set].[field])` in an `F` column; the formula runtime has no
|
|
26
|
+
`SUM`/`COUNT`/`AVG` and its nav resolution only walks single-hop N:1
|
|
27
|
+
references, so an `F` set-aggregate **silently renders empty** with no error.
|
|
28
|
+
The correct shape is a `G` column with `dbDatatype` + `formula` (no `link` /
|
|
29
|
+
`baseDatatypeCd`), which the installer maintains with a DB trigger on the child
|
|
30
|
+
table — stored, so it is filterable and sortable. The pre-existing rule still
|
|
31
|
+
holds: aggregate only a **physical** child column (`D`, or a same-row `G`);
|
|
32
|
+
a virtual `F`/`R`/`S` child fails install with
|
|
33
|
+
`db_error: column old.<field> does not exist`. Also documents the supported
|
|
34
|
+
aggregates (`SUM`/`COUNT`/`AVG`/`MIN`/`MAX`), empty-set results (`SUM`/`COUNT`
|
|
35
|
+
→ `0`; `MIN`/`MAX`/`AVG` → `NULL`), the same-set restriction, and that
|
|
36
|
+
`COUNT(*)` is rejected in favour of `COUNT([lines])`
|
|
37
|
+
(`column-types.md`, `formulas.md`, `SKILL.md`, `validation-checklist.md`).
|
|
38
|
+
|
|
39
|
+
## 0.1.9
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
- Bumped `@dforge-core/metadata` to `^0.0.8` (re-vendored schemas).
|
|
43
|
+
|
|
44
|
+
### Skill
|
|
45
|
+
- `dforge-mcp-author`: documentation updates to the action-DSL and field-type
|
|
46
|
+
references (no tool/behavior changes).
|
|
47
|
+
- **`getRecord` throws; `getRecordOrNull` is the nullable variant.** Corrected
|
|
48
|
+
the docs: `getRecord(entityCd, key)` raises a localized "not found" error
|
|
49
|
+
instead of returning `null`, so the old `if (rec == null)` guard was dead
|
|
50
|
+
code — use `getRecordOrNull(entityCd, key)` when absence is an expected
|
|
51
|
+
outcome (optional lookup, upsert probe). Also documents compound keys
|
|
52
|
+
(`getRecord('gl.tag', { tag_group: 'REGION', tag_code: 'EU' })`), dot /
|
|
53
|
+
`.get()` field access, and that the returned snapshot is **read-only**
|
|
54
|
+
(`dsl-reference.md`, `action-dsl.md`).
|
|
55
|
+
- **`file` / `image` columns are stored as `jsonb`, not `bytea`.** Despite the
|
|
56
|
+
`binary` base datatype, the column holds a JSON metadata reference
|
|
57
|
+
(`{ storagePath, fileName, … }`) while the bytes live in file storage — the
|
|
58
|
+
field tools derive `jsonb`, so never set `dbDatatype: "bytea"`
|
|
59
|
+
(`field-types.md`).
|
|
60
|
+
|
|
7
61
|
## 0.1.8
|
|
8
62
|
|
|
9
63
|
### Added
|