@dforge-core/dforge-mcp 0.2.22 → 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/CHANGELOG.md +117 -0
- package/dist/server.js +1638 -292
- package/package.json +3 -3
- package/resources/docs/dsl-reference.md +42 -39
- package/resources/schemas/card-layouts.schema.json +141 -0
- package/resources/schemas/data-views.schema.json +2 -14
- package/resources/schemas/entity.schema.json +45 -1
- package/resources/schemas/jobs.schema.json +2 -2
- package/resources/schemas/manifest.schema.json +4 -0
- package/skills/dforge-mcp-author/examples/matrix-budget/manifest.json +1 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,123 @@ 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.23
|
|
8
|
+
|
|
9
|
+
The DSL checker was written twice. This server had one — regexes over
|
|
10
|
+
blanked-out source, module-blind — and the language server behind the VS Code
|
|
11
|
+
and Zed extensions had another, built on a real lexer and able to see the
|
|
12
|
+
module. They shared three rules out of about twenty, so an editor hint and a
|
|
13
|
+
pre-pack failure could disagree about the same script, and each knew things the
|
|
14
|
+
other did not.
|
|
15
|
+
|
|
16
|
+
There is one engine now: `@dforge-core/metadata/dsl`, which both consume.
|
|
17
|
+
`src/tools/dsl-check.ts` is an adapter over it — it maps the tool options onto
|
|
18
|
+
the checker's context and its issues back onto the `{level, rule, message,
|
|
19
|
+
line}` shape the tools already report, so `dforge_action_add`,
|
|
20
|
+
`dforge_action_check` and `dforge_module_validate` keep their surfaces.
|
|
21
|
+
|
|
22
|
+
What this server gains is the half of the rules it never had, and they are the
|
|
23
|
+
module-aware ones: a `[field]` that is not a column on the action's entity, a
|
|
24
|
+
`params[x]` that no `params:` block declares, ref navigation that runs past the
|
|
25
|
+
DSL's single hop. `dforge_module_validate` now hands the checker the entity's
|
|
26
|
+
real columns — traits expanded — so these run at validate time rather than
|
|
27
|
+
failing at install. Rule ids are namespaced to match what the editor shows:
|
|
28
|
+
`dsl/unknown-column`, not `unknown-column`.
|
|
29
|
+
|
|
30
|
+
What the editor gains in return is this server's structural and SQL rules, and
|
|
31
|
+
being on a token stream rather than regexes made several of them sharper:
|
|
32
|
+
`::text` is no longer read as a `:name` placeholder, a statement built from a
|
|
33
|
+
variable is skipped instead of guessed at, and a declared helper — the method
|
|
34
|
+
shorthand `f(x) { … }` included — is no longer reported as an unknown built-in.
|
|
35
|
+
|
|
36
|
+
Two behaviours changed, both because the old rule described the wrong
|
|
37
|
+
mechanism. A header below `execute:` is not an ordering problem: `execute:`
|
|
38
|
+
matches to end-of-file, so the header never opens a block at all and runs as a
|
|
39
|
+
labelled statement that does nothing. That is `dsl/block-after-execute` now,
|
|
40
|
+
and a second `execute:` lands there too. And `#` was never a comment — the
|
|
41
|
+
compiler keeps a line as-is only when it starts with `//` — so the old checker
|
|
42
|
+
was blanking lines that actually reach Jint as a syntax error. `dforge://docs/dsl`
|
|
43
|
+
had been teaching `#` in its examples, the "RIGHT" ones included; those are `//`
|
|
44
|
+
now, and the file structure section says which markers the DSL actually has.
|
|
45
|
+
|
|
46
|
+
The three tools that check a DSL body now hand it the same context, so they
|
|
47
|
+
agree about one script. `dforge_action_check` and `dforge_action_add` resolve
|
|
48
|
+
the action's entity — traits expanded — the way `dforge_module_validate` does,
|
|
49
|
+
which is what turns the column rules on; action_check takes an `entityCode`
|
|
50
|
+
argument so a draft can be checked that way before it is registered. Given no
|
|
51
|
+
`moduleDir` the module-aware rules stand down and the text-only ones still run.
|
|
52
|
+
Before this, an author could fix everything action_check reported and still fail
|
|
53
|
+
at pack on a column only validate could see.
|
|
54
|
+
|
|
55
|
+
`executionMode` is matched case-insensitively — it is read straight off disk,
|
|
56
|
+
and nothing validates that key offline, so `Batch` used to fall through as "no
|
|
57
|
+
mode" and quietly stand down the record-context rules on the one mode that most
|
|
58
|
+
needs them. A value that is not a mode at all is reported as
|
|
59
|
+
`action/unknown-execution-mode` rather than checked as if it were `single`.
|
|
60
|
+
|
|
61
|
+
Two more gaps in that shared context closed with it. A scheduled job's action
|
|
62
|
+
was checked without its execution mode, so the checker fell back to `single` and
|
|
63
|
+
read `[TRUE]`, `[FALSE]` and `[NULL]` as record fields rather than the literals
|
|
64
|
+
batch mode makes them — `dforge_module_validate` failed a batch job that
|
|
65
|
+
`dforge_action_check`, which does pass the mode, had signed off on. And an action
|
|
66
|
+
naming its entity with its own module's prefix — `shop.product` inside `shop` —
|
|
67
|
+
was read as cross-module, which stands the column rules down: the same typo
|
|
68
|
+
passed or failed depending only on how the action spelled its entity. Both
|
|
69
|
+
spellings name one entity at install, and both resolve here now.
|
|
70
|
+
|
|
71
|
+
Fixed alongside: a module that ships its own `traits.json` had its traits
|
|
72
|
+
ignored here, exactly as they were in the editor. The installer overlays a
|
|
73
|
+
module's traits on the platform ones, and the three tools that expand traits —
|
|
74
|
+
`dforge_module_validate`, `dforge_seed_add` and `dforge_translation_sync` — now
|
|
75
|
+
do the same. An entity is no longer read as missing the columns install will
|
|
76
|
+
give it, a local trait code no longer reads as a typo that blocks seeding and
|
|
77
|
+
translation, and the "not a column" errors that followed are gone. A
|
|
78
|
+
`traits.json` that cannot be used is reported as the defect it is: nothing else
|
|
79
|
+
checks that file offline — its schema is validated only once the package reaches
|
|
80
|
+
the CLI — so swallowing it produced that same wall of column errors with nothing
|
|
81
|
+
pointing at the cause. That covers shape as well as syntax, because the likelier
|
|
82
|
+
mistake parses: `traits.json` IS the map of trait code → definition, so wrapping
|
|
83
|
+
it as `{"traits": {…}}` the way the module's other files are keyed used to
|
|
84
|
+
register one trait called `traits`, make every real local code read as a typo,
|
|
85
|
+
and then list `traits` among the valid codes in the error meant to name them.
|
|
86
|
+
All five tools that read the file report it — `dforge_action_check` alongside
|
|
87
|
+
its DSL issues, and `dforge_action_add` by refusing the call, since the column
|
|
88
|
+
rules stand down without those traits and the body would otherwise be written to
|
|
89
|
+
disk having been checked by less than it looks.
|
|
90
|
+
|
|
91
|
+
`dforge_seed_add` applies the rest of its rules to those columns too. Its
|
|
92
|
+
unknown-column check already counted a trait's columns, but the two rules that
|
|
93
|
+
catch a bad record — a value set on a virtual Reference column, a required column
|
|
94
|
+
left unset — read only the entity's authored fields, so a record the installer
|
|
95
|
+
rejects was waved through by the tool that had just confirmed the column exists.
|
|
96
|
+
Both now run against the merged set, which also brings `audit-full`'s
|
|
97
|
+
`created_by_user` and `last_updated_by_user` under the Reference rule; a value
|
|
98
|
+
set on one of those was silently dropped at install.
|
|
99
|
+
|
|
100
|
+
## 0.2.22
|
|
101
|
+
|
|
102
|
+
Security release. It carries no functional change over 0.2.19; it exists to
|
|
103
|
+
displace **0.2.21, which was published with a backdoor** and is no longer on
|
|
104
|
+
npm.
|
|
105
|
+
|
|
106
|
+
`@dforge-core/dforge-mcp@0.2.21` (published 2026-09-09, `latest` for roughly 33
|
|
107
|
+
minutes) shipped a `skills/indexe.cjs` that fetched remote JavaScript and
|
|
108
|
+
`eval`'d it. `package.json`'s `main` and both `bin` entries pointed at that
|
|
109
|
+
file, so **installing and starting the server was enough to run it** — including
|
|
110
|
+
via `npx @dforge-core/dforge-mcp@latest`. A symptom worth recognizing: the
|
|
111
|
+
`dforge` MCP server failing to connect (`CONNECTION_CLOSED`), because the bin
|
|
112
|
+
exited without an MCP handshake.
|
|
113
|
+
|
|
114
|
+
0.2.20 and 0.2.21 have been unpublished, and 0.2.22 is `latest`. **If you
|
|
115
|
+
installed either version in that window, assume the code ran on your machine:**
|
|
116
|
+
remove the package and your npm cache entry for it, and rotate any credential
|
|
117
|
+
readable by a process running as you — npm tokens in `~/.npmrc` first. An
|
|
118
|
+
advisory so `npm audit` and Dependabot flag `=0.2.21` is being filed separately;
|
|
119
|
+
unpublishing alone leaves that tooling silent.
|
|
120
|
+
|
|
121
|
+
The publish workflow, which the same commit had rewritten to auto-publish on
|
|
122
|
+
every push to `main`, is back to `workflow_dispatch` only.
|
|
123
|
+
|
|
7
124
|
## 0.2.19
|
|
8
125
|
|
|
9
126
|
A module could declare a dependency but not ship the contract the platform
|