suppa-mcp-2 1.40.6 → 1.42.0
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/README.md +38 -11
- package/dist/bin.js +68 -1
- package/dist/config.js +30 -1
- package/dist/customFieldHints.js +19 -22
- package/dist/readEconomy.js +32 -3
- package/dist/server.js +105 -32
- package/dist/toolTable.js +1 -1
- package/dist/tools/customFieldSets.js +5 -2
- package/dist/tools/customFieldsAsCode.js +51 -16
- package/dist/tools/entity.js +376 -114
- package/dist/tools/fieldTypeChange.js +364 -0
- package/dist/tools/formLifecycle.js +89 -9
- package/dist/tools/formV2.js +274 -55
- package/dist/tools/nameMap.js +24 -4
- package/dist/tools/query.js +10 -0
- package/package.json +3 -1
- package/skills/suppa-cli/SKILL.md +1 -1
- package/skills/suppa-entity-code/SKILL.md +458 -416
- package/skills/suppa-entity-code/references/custom-fields.md +4 -1
- package/skills/suppa-entity-code/references/enforcement.md +2 -1
- package/skills/suppa-entity-code/references/entities.md +503 -482
- package/skills/suppa-entity-code/references/extensions.md +1 -1
- package/skills/suppa-entity-code/references/registration.md +66 -16
- package/skills/suppa-entity-code/references/runtime.md +136 -0
- package/skills/suppa-entity-code/references/seeds.md +38 -1
- package/skills/suppa-entity-code/references/tabular-parts.md +11 -11
- package/skills/suppa-entity-code/references/v1-mapping.md +1 -1
- package/skills/suppa-entity-code/scripts/house-rules.mjs +7 -1
- package/skills/suppa-entity-code/scripts/validate-suppa-schema.mjs +1104 -38
- package/skills/suppa-entity-code/templates/AGENTS.entity-code.md +9 -6
- package/skills/suppa-entity-code/templates/custom-fields.template.ts +5 -3
- package/skills/suppa-entity-code/templates/entity-extension.template.ts +3 -0
- package/skills/suppa-entity-code/templates/relation-target-stub.template.ts +7 -1
- package/skills/suppa-entity-code/templates/seed.template.ts +27 -12
- package/skills/suppa-entity-code/templates/tabular-part.template.ts +14 -13
- package/skills/suppa-form-v2/SKILL.md +11 -7
- package/skills/suppa-form-v2/VUE_COMPILER.json +9 -0
- package/skills/suppa-form-v2/data/component-index.json +1 -1
- package/skills/suppa-form-v2/data/component-props.json +2 -1
- package/skills/suppa-form-v2/notes/chart.md +2 -0
- package/skills/suppa-form-v2/notes/embeddedForm.md +6 -4
- package/skills/suppa-form-v2/notes/table.md +1 -1
- package/skills/suppa-form-v2/references/charts.md +2 -1
- package/skills/suppa-form-v2/references/custom-chart.md +121 -0
- package/skills/suppa-form-v2/references/layout.md +2 -2
- package/skills/suppa-form-v2/references/publishing.md +21 -11
- package/skills/suppa-form-v2/references/tables.md +7 -7
- package/skills/suppa-form-v2/scripts/form-rules.mjs +13 -7
- package/skills/suppa-form-v2/scripts/manifest-corrections.mjs +56 -0
- package/skills/suppa-form-v2/scripts/validate-form-schema.mjs +220 -18
- package/skills/suppa-form-v2/scripts/vue-compiler.mjs +34 -0
- package/skills/suppa-form-v2/scripts/widget-code.mjs +404 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ No API key needed to start — the server authenticates interactively via the `s
|
|
|
30
30
|
|
|
31
31
|
## The `suppa` command
|
|
32
32
|
|
|
33
|
-
The same
|
|
33
|
+
The same 104 operations the MCP server exposes are available as a command, for
|
|
34
34
|
shells, scripts and CI:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
@@ -87,8 +87,8 @@ All variables are optional — the server works out of the box and authenticates
|
|
|
87
87
|
| `SUPPA_API_KEY` | (none) | JWT / API key; skips interactive login when set (CI) |
|
|
88
88
|
| `SUPPA_REFRESH_TOKEN` | (none) | Refresh token; paired with `SUPPA_API_KEY` for long-lived CI sessions |
|
|
89
89
|
| `SUPPA_LANG` | `en` | Language (`en` / `uk`) |
|
|
90
|
-
| `SUPPA_LANGS` | (auto) | Languages a multi-language title/Name is written into. When unset, resolved from the platform
|
|
91
|
-
| `SUPPA_TZ` | `Europe/Kyiv` | Timezone |
|
|
90
|
+
| `SUPPA_LANGS` | (auto) | Languages a multi-language title/Name is written into. When unset, resolved from the platform: the languages the tenant has enabled (`SystemPreferences.availableLanguages`, what the builder UI reads), else the language keys of existing entity titles, falling back to `en,uk`. Only the 24 `Localizations` language columns are kept, and `en` is always included. Set e.g. `en,uk` to force it. |
|
|
91
|
+
| `SUPPA_TZ` | `Europe/Kyiv` | Timezone, sent as `X-Timezone`. Must be an IANA name (`Europe/Kyiv`, `UTC`): the platform refuses an offset such as `+03:00` on every request, so an invalid value falls back to the default with a warning on stderr. |
|
|
92
92
|
| `SUPPA_MCP_LOGIN_PORT` | `8080` | Local loopback port for the browser login callback |
|
|
93
93
|
| `SUPPA_MCP_HOME` | `~/.suppa-mcp` | Directory for the tenant registry |
|
|
94
94
|
| `SUPPA_HTTP_TIMEOUT` | `60` | Per-request timeout, seconds |
|
|
@@ -200,6 +200,31 @@ Add to `.vscode/mcp.json`:
|
|
|
200
200
|
|
|
201
201
|
Then run **`suppa_login`** once per tenant to authenticate.
|
|
202
202
|
|
|
203
|
+
### Windows: prefer `node` over `npx`
|
|
204
|
+
|
|
205
|
+
On Windows `npx` runs through a `.cmd` shim, so a host that starts the server that way gets a chain
|
|
206
|
+
of processes — `cmd` → `npx` → `node` — and ends only the first one. The server exits on its own
|
|
207
|
+
once its client is gone (its stdin closes), and `npx` follows it; but a direct launch has no chain
|
|
208
|
+
to leave behind and starts faster. Install once and point the host at the entry file:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
npm i -g suppa-mcp-2
|
|
212
|
+
npm root -g # e.g. C:\Users\<you>\AppData\Roaming\npm\node_modules
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"mcpServers": {
|
|
218
|
+
"suppa-2.0": {
|
|
219
|
+
"command": "node",
|
|
220
|
+
"args": ["C:\\Users\\<you>\\AppData\\Roaming\\npm\\node_modules\\suppa-mcp-2\\dist\\bin.js"]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Update with `npm i -g suppa-mcp-2@latest`; the path stays the same.
|
|
227
|
+
|
|
203
228
|
---
|
|
204
229
|
|
|
205
230
|
## Which version is running (and is it current)
|
|
@@ -354,9 +379,10 @@ live 2.0 tenant. The first two are refusals that name the next step; the rest ar
|
|
|
354
379
|
call, or you will be told the old field list for the next minute.
|
|
355
380
|
- **Removal is reversible.** `suppa_remove_custom_field` soft-deletes the metadata and the
|
|
356
381
|
platform *renames* the column to `<name>_<timestamp>` rather than dropping it, so
|
|
357
|
-
`suppa_restore_custom_field` brings the field and every value back. The NAME
|
|
358
|
-
|
|
359
|
-
|
|
382
|
+
`suppa_restore_custom_field` brings the field and every value back. The NAME is freed
|
|
383
|
+
(entity-builder, 2026-09-25): a new field can take it, but that field starts empty, and the
|
|
384
|
+
removed one can then not be restored while its twin lives. `suppa_apply_custom_fields`
|
|
385
|
+
therefore never re-creates a removed field — it reports it under `parked`.
|
|
360
386
|
- **Restoring a record restores its values with it.** Deleting a record soft-deletes the row
|
|
361
387
|
holding its custom values; the platform's own restore does not clear that row, which reads
|
|
362
388
|
back as stale values (or as none, with `include_deleted_relations=false`) and makes the next
|
|
@@ -388,7 +414,7 @@ extension table is created outside that check and is not subject to it.
|
|
|
388
414
|
|
|
389
415
|
## Available tools
|
|
390
416
|
|
|
391
|
-
|
|
417
|
+
104 tools across the areas below.
|
|
392
418
|
|
|
393
419
|
### Session & identity
|
|
394
420
|
|
|
@@ -461,7 +487,8 @@ extension table is created outside that check and is not subject to it.
|
|
|
461
487
|
| `suppa_create_tabular_part` | Create a tabular part (owned rows) of a parent |
|
|
462
488
|
| `suppa_add_field` | Add a field to an entity (`options_json`: searchable / showInTable / canFilter …) |
|
|
463
489
|
| `suppa_update_field` | Edit an existing field — name, title, flags, options, encryption (confirm-gated) |
|
|
464
|
-
| `
|
|
490
|
+
| `suppa_change_field_type` | Change a field's type, converting every row — the platform's plan first, a refused plan never sent, a loss (locale loss, restoring an earlier column) sent only when accepted by name, a default the new type cannot hold replaced in the same call (confirm-gated) |
|
|
491
|
+
| `suppa_update_entity_options` | Toggle the 20 per-entity features — comments, hierarchy, approvals, customFields … (confirm-gated) |
|
|
465
492
|
| `suppa_add_enum_values` | Add values to an enum field — the group is read from the field's subType |
|
|
466
493
|
| `suppa_resolve_custom_fields` | Which custom fields are live for a record or context, and their values |
|
|
467
494
|
| `suppa_add_custom_field` | Create a custom field in one context (its set is created if missing) |
|
|
@@ -519,11 +546,11 @@ the `schema` column on the row since 2.1, 58 component types — and is served b
|
|
|
519
546
|
| Tool | Description |
|
|
520
547
|
|---|---|
|
|
521
548
|
| `suppa_form_kb` | The 2.0 form knowledge base: the 58 element types, one type's prop table, a behaviour note, a reference topic, a template |
|
|
522
|
-
| `suppa_validate_form_schema` | Run the 2.0 form gate over a draft before writing it — 37 structural error codes (the authoring lints live in the source agent, not here) |
|
|
523
|
-
| `suppa_write_form_draft` | Save a checked draft through the builder's own save (`PUT /core/forms/:id/schema`) — gated first, guarded by the form's revision, recorded in History; `variables` only when the draft lists some. It never publishes |
|
|
549
|
+
| `suppa_validate_form_schema` | Run the 2.0 form gate over a draft before writing it — 37 structural error codes (the authoring lints live in the source agent, not here), each chart's and each custom chart source's readiness, and widget code: every widget template is compiled with the builder's own compiler (`@vue/compiler-dom` 3.5.12, browser production build) into the `compiledRender` the runtime executes, and checked against the widget sandbox |
|
|
550
|
+
| `suppa_write_form_draft` | Save a checked draft through the builder's own save (`PUT /core/forms/:id/schema`) — gated first against the live form (what the form already has does not block), guarded by the form's revision, recorded in History; saves the widget renders the gate compiled, never a hand-written one; `variables` only when the draft lists some. It never publishes |
|
|
524
551
|
| `suppa_create_form_v2` | Create a 2.0 form (create / update / custom) with its draft in one transaction — the routing flag and default variable the builder adds, optionally filed into a folder (confirm-gated) |
|
|
525
552
|
| `suppa_form_versions` | A form's published versions, the component diff between two of them, and a summary of recent draft saves (read-only) |
|
|
526
|
-
| `suppa_form_lifecycle` | Publish, roll back (restore + publish), discard (unrecoverable) or promote — gated on the form gate and on the version belonging to the form (confirm-gated) |
|
|
553
|
+
| `suppa_form_lifecycle` | Publish, roll back (restore + publish), discard (unrecoverable) or promote — gated on the form gate (a stored widget with an empty render is refused) and on the version belonging to the form (confirm-gated) |
|
|
527
554
|
|
|
528
555
|
### Migration (Suppa 1.0 → 2.0) & workspace
|
|
529
556
|
|
package/dist/bin.js
CHANGED
|
@@ -23,6 +23,71 @@ process.on("unhandledRejection", (reason) => {
|
|
|
23
23
|
process.on("uncaughtException", (err) => {
|
|
24
24
|
process.stderr.write(`[suppa-mcp] uncaught exception (ignored): ${err instanceof Error ? err.stack || err.message : String(err)}\n`);
|
|
25
25
|
});
|
|
26
|
+
/**
|
|
27
|
+
* Exit when the client is gone — do not linger as an orphan.
|
|
28
|
+
*
|
|
29
|
+
* A host that starts this server through `npx` on Windows gets a chain, cmd → npx → node, and ends
|
|
30
|
+
* only its direct child; this process then kept running (a token-refresh timer, a keep-alive socket
|
|
31
|
+
* or the background version check is enough to hold the event loop open), `npx` kept waiting on it,
|
|
32
|
+
* and the orphans piled up until the machine slowed down (reported 2026-09-30). The signal that
|
|
33
|
+
* reaches this process whoever was killed is its stdin reaching end-of-file — the host holds the
|
|
34
|
+
* only write end of that pipe — and a write to a stdout nobody reads failing with EPIPE. Neither is
|
|
35
|
+
* handled by the SDK's StdioServerTransport, which listens for `data` and `error` only. Once this
|
|
36
|
+
* process exits, the `npx` waiting on it exits too.
|
|
37
|
+
*
|
|
38
|
+
* End-of-file on stdin is not the end of the work, though: `printf <requests> | suppa-mcp` closes
|
|
39
|
+
* stdin right after its last request, and an answer still waiting on its HTTP call was dropped. So
|
|
40
|
+
* the requests in flight are answered first (for at most DRAIN_MS); a stdout nobody reads ends the
|
|
41
|
+
* process at once, since no answer can arrive anyway.
|
|
42
|
+
*/
|
|
43
|
+
const DRAIN_MS = 30_000;
|
|
44
|
+
function exitWhenClientIsGone(transport) {
|
|
45
|
+
const inFlight = new Set();
|
|
46
|
+
let leaving = false;
|
|
47
|
+
const done = () => process.exit(0);
|
|
48
|
+
const deliver = transport.onmessage;
|
|
49
|
+
transport.onmessage = (message, extra) => {
|
|
50
|
+
if (message && message.method !== undefined && message.id !== undefined)
|
|
51
|
+
inFlight.add(message.id);
|
|
52
|
+
deliver?.call(transport, message, extra);
|
|
53
|
+
};
|
|
54
|
+
const send = transport.send.bind(transport);
|
|
55
|
+
transport.send = async (message, options) => {
|
|
56
|
+
try {
|
|
57
|
+
await send(message, options);
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
if (message && message.method === undefined && message.id !== undefined) {
|
|
61
|
+
inFlight.delete(message.id);
|
|
62
|
+
if (leaving && inFlight.size === 0)
|
|
63
|
+
done();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const leave = (why, drain) => {
|
|
68
|
+
if (!drain) {
|
|
69
|
+
process.stderr.write(`[suppa-mcp] ${why} — the client is gone; exiting.\n`);
|
|
70
|
+
done();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (leaving)
|
|
74
|
+
return;
|
|
75
|
+
leaving = true;
|
|
76
|
+
const waiting = inFlight.size;
|
|
77
|
+
process.stderr.write(`[suppa-mcp] ${why} — the client is gone; exiting` +
|
|
78
|
+
(waiting ? ` once ${waiting} request(s) in flight are answered.\n` : ".\n"));
|
|
79
|
+
if (waiting === 0)
|
|
80
|
+
done();
|
|
81
|
+
else
|
|
82
|
+
setTimeout(done, DRAIN_MS).unref();
|
|
83
|
+
};
|
|
84
|
+
process.stdin.on("end", () => leave("stdin reached end-of-file", true));
|
|
85
|
+
process.stdin.on("close", () => leave("stdin closed", true));
|
|
86
|
+
process.stdout.on("error", (e) => {
|
|
87
|
+
if (e?.code === "EPIPE" || e?.code === "ERR_STREAM_DESTROYED")
|
|
88
|
+
leave("stdout closed", false);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
26
91
|
// Startup is the one place a failure SHOULD stop the process — if the server
|
|
27
92
|
// can't build or connect, there's nothing to serve. What it must not do is stop
|
|
28
93
|
// without saying why.
|
|
@@ -31,7 +96,9 @@ try {
|
|
|
31
96
|
const { buildServer } = await import("./server.js");
|
|
32
97
|
const { refreshLatestVersionInBackground } = await import("./version.js");
|
|
33
98
|
const server = buildServer();
|
|
34
|
-
|
|
99
|
+
const transport = new StdioServerTransport();
|
|
100
|
+
await server.connect(transport);
|
|
101
|
+
exitWhenClientIsGone(transport);
|
|
35
102
|
// Only once the server is actually serving, and detached: refresh the cached
|
|
36
103
|
// "newest published version" so the NEXT session's instructions can say the
|
|
37
104
|
// running build is behind. Never awaited, never fatal, skipped entirely when
|
package/dist/config.js
CHANGED
|
@@ -117,7 +117,36 @@ const BASE_URL = (process.env.SUPPA_BASE_URL || "https://modern.suppa.me").repla
|
|
|
117
117
|
const API_KEY = process.env.SUPPA_API_KEY || process.env.SUPPA_TOKEN || "";
|
|
118
118
|
const REFRESH_TOKEN = process.env.SUPPA_REFRESH_TOKEN || "";
|
|
119
119
|
const LANG = process.env.SUPPA_LANG || "en";
|
|
120
|
-
|
|
120
|
+
/**
|
|
121
|
+
* `tz` when it is an IANA zone name the platform accepts, else null. entity-builder refuses any other
|
|
122
|
+
* X-Timezone with 400 `request.invalid_timezone` on every request (timezone.util.ts, c2dcf582) — and
|
|
123
|
+
* Node's Intl accepts offsets ("+03:00") that it does not, so both are asked.
|
|
124
|
+
*/
|
|
125
|
+
export function ianaZoneOrNull(tz) {
|
|
126
|
+
const zone = (tz ?? "").trim();
|
|
127
|
+
if (!zone || /^[+-]\d/.test(zone) || /^(utc|gmt)[+-]/i.test(zone))
|
|
128
|
+
return null;
|
|
129
|
+
try {
|
|
130
|
+
new Intl.DateTimeFormat("en-US", { timeZone: zone }).format(0);
|
|
131
|
+
return zone;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function timeZoneEnv(name, fallback) {
|
|
138
|
+
const raw = process.env[name];
|
|
139
|
+
if (raw === undefined || raw.trim() === "")
|
|
140
|
+
return fallback;
|
|
141
|
+
const zone = ianaZoneOrNull(raw);
|
|
142
|
+
if (!zone) {
|
|
143
|
+
process.stderr.write(`suppa-mcp: ${name}=${JSON.stringify(raw)} is not an IANA time zone name (e.g. "Europe/Kyiv") — ` +
|
|
144
|
+
`the platform refuses any other on every request; using ${fallback}.\n`);
|
|
145
|
+
return fallback;
|
|
146
|
+
}
|
|
147
|
+
return zone;
|
|
148
|
+
}
|
|
149
|
+
const TZ = timeZoneEnv("SUPPA_TZ", "Europe/Kyiv");
|
|
121
150
|
/**
|
|
122
151
|
* A positive integer from the environment, or the fallback.
|
|
123
152
|
*
|
package/dist/customFieldHints.js
CHANGED
|
@@ -52,33 +52,30 @@ const ERROR_HINTS = [
|
|
|
52
52
|
"or edit the one that is there with suppa_update_field(entity_name='<Entity>CustomFields').",
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"suppa_restore_custom_field (its values come with it), or choose a different name.",
|
|
55
|
+
// Since entity-builder 08258a57 (2026-09-25) the name guard reads LIVE fields only: a removed
|
|
56
|
+
// field no longer holds its name. "already taken by field X (id N)" therefore means a live field
|
|
57
|
+
// has it — on an add or a rename, or on the restore of a removed field whose name was re-used.
|
|
58
|
+
match: /is already taken by field/i,
|
|
59
|
+
hint: "A LIVE field on the same entity already has that name — the platform names it and its id. On " +
|
|
60
|
+
"an add, pick another name. On a restore, the removed field's name was re-used since: its " +
|
|
61
|
+
"values can come back only after the live one is renamed (suppa_update_field) or removed.",
|
|
63
62
|
},
|
|
64
63
|
{
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
// '
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
// 2026-09-10 13:41. builder.txt:56 still says 'title | object | Localization
|
|
72
|
-
// object', so this is the platform, not the contract.
|
|
64
|
+
// The title reached the builder as a Localizations RECORD rather than as translations: an object
|
|
65
|
+
// with `id` is read as a reference ("must contain an integer id"), one with `key`/`category` as a
|
|
66
|
+
// new record. Measured 2026-09-11 and read as a backend regression; found 2026-09-30 to be this
|
|
67
|
+
// server's own doing — the tenant languages were taken from /schema title keys, which are
|
|
68
|
+
// `{id, key, en, name}` now, so every title went out as `{id: "<text>", key: …}`.
|
|
69
|
+
// resolvePlatformLanguages now keeps language columns only (entity.ts PLATFORM_LANGUAGES).
|
|
73
70
|
// The message arrives inside a stringified JSON body, so the quotes around
|
|
74
71
|
// the field name may carry a backslash: \"title\", \"key\".
|
|
75
72
|
match: /.?"title.?" must contain an integer id|invalid_relation_value[^]*"path":"title"|Field .?"(key|category).?" is required/i,
|
|
76
|
-
hint: "
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
73
|
+
hint: "NOTHING was created. The title reached the builder as a Localizations RECORD, not as " +
|
|
74
|
+
"translations: an object carrying `id` is read as a reference to an existing row, one carrying " +
|
|
75
|
+
"`key`/`category` as a new record. A title must hold language keys only (en, uk, pl, …). This " +
|
|
76
|
+
"server takes them from the tenant's enabled languages — check that SUPPA_LANGS, if set, lists " +
|
|
77
|
+
"language codes only (e.g. en,uk,pl,ro), and that a title object you pass has nothing else in " +
|
|
78
|
+
"it. Re-sending WITHOUT title also works; set the label afterwards with suppa_update_field.",
|
|
82
79
|
},
|
|
83
80
|
{
|
|
84
81
|
match: /HTTP 409|statusCode":409/,
|
package/dist/readEconomy.js
CHANGED
|
@@ -48,8 +48,26 @@ const FIELD_FLAG_DEFAULTS = Object.freeze({
|
|
|
48
48
|
notNull: false,
|
|
49
49
|
decimalPlaces: 0,
|
|
50
50
|
});
|
|
51
|
-
/**
|
|
52
|
-
|
|
51
|
+
/**
|
|
52
|
+
* The keys of a platform localisation record that are bookkeeping, not text: every non-language
|
|
53
|
+
* column of Localizations (entity-builder localizations entity), plus the row's timestamps.
|
|
54
|
+
*/
|
|
55
|
+
const I18N_BOOKKEEPING = new Set([
|
|
56
|
+
"id",
|
|
57
|
+
"key",
|
|
58
|
+
"name",
|
|
59
|
+
"application",
|
|
60
|
+
"category",
|
|
61
|
+
"entity",
|
|
62
|
+
"field",
|
|
63
|
+
"form",
|
|
64
|
+
"initiator",
|
|
65
|
+
"parent",
|
|
66
|
+
"children",
|
|
67
|
+
"createdAt",
|
|
68
|
+
"updatedAt",
|
|
69
|
+
"deletedAt",
|
|
70
|
+
]);
|
|
53
71
|
export const SCHEMA_LEGEND = "Compact schema: a field omits constraints that are null, flags that are false/0 " +
|
|
54
72
|
"(isArray, isPrimary, isOnlyPositive, unique, notNull, decimalPlaces) and options at the " +
|
|
55
73
|
"platform defaults (canGroup/canSort/showInTable/editFromTable/canFilter true; " +
|
|
@@ -63,13 +81,24 @@ export const SCHEMA_LEGEND = "Compact schema: a field omits constraints that are
|
|
|
63
81
|
export function slimTitle(title) {
|
|
64
82
|
if (!isObj(title))
|
|
65
83
|
return title;
|
|
84
|
+
const out = titleLanguages(title);
|
|
85
|
+
return Object.keys(out).length > 0 ? out : title;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Only the translations of a title — `{}` when it has none. What search and naming read: an
|
|
89
|
+
* untranslated record's key "entity.<Name>" and name "Entity: <Name>" are not its label, and
|
|
90
|
+
* slimTitle's "left whole" fallback (right for display) would make them one.
|
|
91
|
+
*/
|
|
92
|
+
export function titleLanguages(title) {
|
|
66
93
|
const out = {};
|
|
94
|
+
if (!isObj(title))
|
|
95
|
+
return out;
|
|
67
96
|
for (const [k, v] of Object.entries(title)) {
|
|
68
97
|
if (I18N_BOOKKEEPING.has(k) || v === null || v === undefined)
|
|
69
98
|
continue;
|
|
70
99
|
out[k] = v;
|
|
71
100
|
}
|
|
72
|
-
return
|
|
101
|
+
return out;
|
|
73
102
|
}
|
|
74
103
|
/** Field options with the platform defaults removed. */
|
|
75
104
|
export function compactOptions(options) {
|
package/dist/server.js
CHANGED
|
@@ -18,6 +18,7 @@ import * as customFieldsAsCode from "./tools/customFieldsAsCode.js";
|
|
|
18
18
|
import * as entityCode from "./tools/entityCode.js";
|
|
19
19
|
import * as formV2 from "./tools/formV2.js";
|
|
20
20
|
import * as formLifecycle from "./tools/formLifecycle.js";
|
|
21
|
+
import * as fieldTypeChange from "./tools/fieldTypeChange.js";
|
|
21
22
|
import { houseRulesDigest } from "./tools/entityCode.js";
|
|
22
23
|
import * as files from "./tools/files.js";
|
|
23
24
|
import * as forms from "./tools/forms.js";
|
|
@@ -203,9 +204,9 @@ const EntityOptionsJson = z
|
|
|
203
204
|
'"hierarchy": "multi"}. Keys: comments, reactions, hierarchy ("single"|"multi"), ' +
|
|
204
205
|
'folders ("single"|"multi"), trackChangeHistory, browsingHistory (boolean or number), ' +
|
|
205
206
|
"globalSearch, timeTracking, favorites, pinned, approvals, checklists, recurrence, " +
|
|
206
|
-
"reminders, notificationMutes, customFields
|
|
207
|
-
|
|
208
|
-
"
|
|
207
|
+
"reminders, notificationMutes, customFields, stateHistory (booleans), hierarchyDepthLimit " +
|
|
208
|
+
'(integer 1-20, needs hierarchy), commentsPrivacy (object), externalSource ({"sourceEntity": <id>}). ' +
|
|
209
|
+
"Unknown keys are refused (the platform would drop them silently). " +
|
|
209
210
|
"Enabling an option creates the side table that backs it, and recurrence, reminders, " +
|
|
210
211
|
"notificationMutes, timeTracking and pinned also refresh the corresponding system " +
|
|
211
212
|
"entity's cache — so this is not a free toggle. Options can also be changed later " +
|
|
@@ -1097,12 +1098,12 @@ export function buildToolTable() {
|
|
|
1097
1098
|
" NOT A FREE TOGGLE: enabling an option CREATES the side table that backs it, and\n" +
|
|
1098
1099
|
" recurrence / reminders / notificationMutes / timeTracking / pinned also refresh\n" +
|
|
1099
1100
|
" the cache of the corresponding system entity. It is a schema change.\n\n" +
|
|
1100
|
-
" RESTRICTIONS
|
|
1101
|
-
"
|
|
1102
|
-
"
|
|
1103
|
-
" (reserved suffix
|
|
1104
|
-
"
|
|
1105
|
-
"
|
|
1101
|
+
" RESTRICTIONS: on an entity the tenant does not own (initiator 'system' or\n" +
|
|
1102
|
+
" 'application') only options.stateHistory and options.externalSource may change —\n" +
|
|
1103
|
+
" the platform answers 403 to the rest, so this server refuses the call first. A\n" +
|
|
1104
|
+
" system-GENERATED entity (a reserved suffix: Comments, Folders, CustomFields…)\n" +
|
|
1105
|
+
" refuses comments, customFields and six more — refused here too. The platform\n" +
|
|
1106
|
+
" answers with the APPLIED options, which\n" +
|
|
1106
1107
|
" may be a subset of the request — anything missing is called out in the result.\n\n" +
|
|
1107
1108
|
" APPROVAL GATE: without confirm=true this returns a confirmation request and changes nothing.",
|
|
1108
1109
|
inputSchema: {
|
|
@@ -1113,8 +1114,9 @@ export function buildToolTable() {
|
|
|
1113
1114
|
"Keys: comments, reactions, hierarchy (\"single\"|\"multi\"), folders " +
|
|
1114
1115
|
'("single"|"multi"), trackChangeHistory, browsingHistory (boolean or number), ' +
|
|
1115
1116
|
"globalSearch, timeTracking, favorites, pinned, approvals, checklists, " +
|
|
1116
|
-
"recurrence, reminders, notificationMutes, customFields
|
|
1117
|
-
"
|
|
1117
|
+
"recurrence, reminders, notificationMutes, customFields, stateHistory (booleans), " +
|
|
1118
|
+
"hierarchyDepthLimit (integer 1-20), commentsPrivacy (object), externalSource " +
|
|
1119
|
+
'({"sourceEntity": <id>}). Unknown keys are refused (the platform would ' +
|
|
1118
1120
|
"drop them silently). Enabling an option creates the side table that backs it, " +
|
|
1119
1121
|
"and recurrence/reminders/notificationMutes/timeTracking/pinned also refresh the " +
|
|
1120
1122
|
"corresponding system entity's cache — so this is not a free toggle."),
|
|
@@ -1123,6 +1125,11 @@ export function buildToolTable() {
|
|
|
1123
1125
|
annotations: _MUT,
|
|
1124
1126
|
}, async (a) => {
|
|
1125
1127
|
if (!a.confirm) {
|
|
1128
|
+
// Refuse in the preview what the confirmed call would refuse — never ask a user to approve
|
|
1129
|
+
// a call that is malformed or that the platform answers 403.
|
|
1130
|
+
const refusal = await entity.entityOptionsRefusal(a.entity_name, a.options_json);
|
|
1131
|
+
if (refusal)
|
|
1132
|
+
return text(refusal);
|
|
1126
1133
|
return text(confirmRequired("update entity options", { entity: a.entity_name }, {
|
|
1127
1134
|
options: a.options_json,
|
|
1128
1135
|
side_effects: "Enabling an option creates the side table that backs it; recurrence, reminders, " +
|
|
@@ -1181,7 +1188,7 @@ export function buildToolTable() {
|
|
|
1181
1188
|
" parameters — read them; enum/multi-enum take no sub_type (the platform sets it).\n" +
|
|
1182
1189
|
" Constraints: max_length/min_length (text),\n" +
|
|
1183
1190
|
" decimal_places / min_value / max_value / only_positive (numeric). Options can be\n" +
|
|
1184
|
-
" changed later with suppa_update_field;
|
|
1191
|
+
" changed later with suppa_update_field; a plain TYPE with suppa_change_field_type.\n" +
|
|
1185
1192
|
" required=true makes the column NOT NULL. Where a defaultValue APPLIES it is\n" +
|
|
1186
1193
|
" also required, and the call is refused before any request if missing — no\n" +
|
|
1187
1194
|
" default is ever invented for you. defaultValue does NOT apply to relations,\n" +
|
|
@@ -1313,16 +1320,15 @@ export function buildToolTable() {
|
|
|
1313
1320
|
" searchable (+searchPriority), or turning one of the others OFF.\n\n" +
|
|
1314
1321
|
" WHAT THE PLATFORM DOES NOT ALLOW (refused here BEFORE any request, so a rejected\n" +
|
|
1315
1322
|
" call changes nothing):\n" +
|
|
1316
|
-
" - The TYPE
|
|
1317
|
-
"
|
|
1318
|
-
" -
|
|
1319
|
-
"
|
|
1320
|
-
" encrypt=false clears it. A date/time choice is fixed at creation.\n" +
|
|
1323
|
+
" - The TYPE (and a timestamp's date/time/timestamp) is NOT changed here — use\n" +
|
|
1324
|
+
" suppa_change_field_type, which shows the platform's conversion plan first.\n" +
|
|
1325
|
+
" - Of the other subtypes only encryption toggles: encrypt=true sets 'encrypted',\n" +
|
|
1326
|
+
" encrypt=false clears it.\n" +
|
|
1321
1327
|
" - 'encrypted' is only allowed on a TEXT field, and it forces searchable, canFilter,\n" +
|
|
1322
1328
|
" canSort and canGroup off (plus unique, max_length, min_length, mask), so it\n" +
|
|
1323
1329
|
" cannot be combined with them in one call. Encrypting rewrites the existing rows.\n" +
|
|
1324
|
-
" - A
|
|
1325
|
-
"
|
|
1330
|
+
" - A field the tenant does not own (initiator 'system' or 'application') takes only\n" +
|
|
1331
|
+
" a title and options.trackStateHistory; the platform answers 403 to the rest.\n" +
|
|
1326
1332
|
" Removing a CORE field is still UI-only — this server has no remove-field call for\n" +
|
|
1327
1333
|
" one. A CUSTOM field is different: suppa_remove_custom_field parks it reversibly.\n" +
|
|
1328
1334
|
" This tool edits a custom field too — pass entity_name='<Entity>CustomFields'.\n\n" +
|
|
@@ -1382,7 +1388,7 @@ export function buildToolTable() {
|
|
|
1382
1388
|
.default(null)
|
|
1383
1389
|
.describe('Field options as a JSON object, e.g. {"searchable": true, "searchPriority": 3} ' +
|
|
1384
1390
|
'or {"showInTable": false}. Keys: searchable, searchPriority (1-4), readOnly, ' +
|
|
1385
|
-
"canGroup, canSort, showInTable, editFromTable, canFilter. Send only what " +
|
|
1391
|
+
"canGroup, canSort, showInTable, editFromTable, canFilter, trackStateHistory. Send only what " +
|
|
1386
1392
|
"CHANGES — the platform already applies canGroup/canSort/showInTable/" +
|
|
1387
1393
|
"editFromTable/canFilter true and readOnly/searchable false, so restating one " +
|
|
1388
1394
|
"of those is a no-op. Unknown keys are refused (the platform would drop them " +
|
|
@@ -1414,10 +1420,7 @@ export function buildToolTable() {
|
|
|
1414
1420
|
changes.encrypt = a.encrypt;
|
|
1415
1421
|
if (a.options_json !== null)
|
|
1416
1422
|
changes.options = a.options_json;
|
|
1417
|
-
|
|
1418
|
-
return text(confirmRequired("update field", { entity: a.entity_name, field: a.field_name }, changes));
|
|
1419
|
-
}
|
|
1420
|
-
return text(await entity.updateField(a.entity_name, a.field_name, {
|
|
1423
|
+
const opts = {
|
|
1421
1424
|
newName: a.new_name,
|
|
1422
1425
|
title: a.title,
|
|
1423
1426
|
required: a.required,
|
|
@@ -1429,8 +1432,72 @@ export function buildToolTable() {
|
|
|
1429
1432
|
isArray: a.is_array,
|
|
1430
1433
|
encrypt: a.encrypt,
|
|
1431
1434
|
options: a.options_json,
|
|
1432
|
-
}
|
|
1435
|
+
};
|
|
1436
|
+
if (!a.confirm) {
|
|
1437
|
+
// Refuse in the preview what the confirmed call would refuse (reads only).
|
|
1438
|
+
const refusal = await entity.updateFieldRefusal(a.entity_name, a.field_name, opts);
|
|
1439
|
+
if (refusal)
|
|
1440
|
+
return text(refusal);
|
|
1441
|
+
return text(confirmRequired("update field", { entity: a.entity_name, field: a.field_name }, changes));
|
|
1442
|
+
}
|
|
1443
|
+
return text(await entity.updateField(a.entity_name, a.field_name, opts));
|
|
1433
1444
|
});
|
|
1445
|
+
reg("suppa_change_field_type", {
|
|
1446
|
+
description: "Change a field's TYPE, converting every row (POST /core/builder/<entity>/<field>/\n" +
|
|
1447
|
+
" update-field, planned first by /change-plan). Converts only plain types: text,\n" +
|
|
1448
|
+
" numeric, integer, boolean, timestamp, json, icon, uuid, multi-language — never a\n" +
|
|
1449
|
+
" relation, enum, file, serial or multi-type (add a new field instead). sub_type\n" +
|
|
1450
|
+
" date|time|timestamp on a timestamp field is a type change too.\n\n" +
|
|
1451
|
+
" Without confirm it is a DRY RUN: the platform's own plan comes back — decision\n" +
|
|
1452
|
+
" (ready / needs-input / refused), rows, and every conflict with sample values and\n" +
|
|
1453
|
+
" what it does. A refused plan is never sent. A LOSS is sent only when accepted by\n" +
|
|
1454
|
+
" name: accept_locale_loss (multi-language → text keeps one language per row; json\n" +
|
|
1455
|
+
" keeps all), accept_stash_restore (changing BACK to an earlier type restores the\n" +
|
|
1456
|
+
" column saved then — later edits reverted, newer rows NULL). A default the new type\n" +
|
|
1457
|
+
" cannot hold needs default_value or drop_default in the same call. The column\n" +
|
|
1458
|
+
" converts under an ACCESS EXCLUSIVE lock, and even the dry run holds that lock while\n" +
|
|
1459
|
+
" it scans; tables over 500,000 rows are refused. Show the plan to the user first.\n\n" +
|
|
1460
|
+
" APPROVAL GATE: without confirm=true this returns a confirmation request and changes nothing.",
|
|
1461
|
+
inputSchema: {
|
|
1462
|
+
entity_name: EntityName,
|
|
1463
|
+
field_name: z.string().describe("The field to convert."),
|
|
1464
|
+
type: z
|
|
1465
|
+
.string()
|
|
1466
|
+
.describe("The new field type — 'timestamp' too when only a timestamp's sub_type changes."),
|
|
1467
|
+
sub_type: z
|
|
1468
|
+
.enum(["date", "time", "timestamp"])
|
|
1469
|
+
.nullable()
|
|
1470
|
+
.default(null)
|
|
1471
|
+
.describe("A timestamp field's new subtype (date → timestamp converts; the reverse is refused)."),
|
|
1472
|
+
default_value: z
|
|
1473
|
+
.string()
|
|
1474
|
+
.nullable()
|
|
1475
|
+
.default(null)
|
|
1476
|
+
.describe("New default, sent with the change. Omit to keep the stored one."),
|
|
1477
|
+
drop_default: z
|
|
1478
|
+
.boolean()
|
|
1479
|
+
.default(false)
|
|
1480
|
+
.describe("Drop the default with the change."),
|
|
1481
|
+
accept_locale_loss: z
|
|
1482
|
+
.boolean()
|
|
1483
|
+
.default(false)
|
|
1484
|
+
.describe("Accept that multi-language → text keeps one language per row."),
|
|
1485
|
+
accept_stash_restore: z
|
|
1486
|
+
.boolean()
|
|
1487
|
+
.default(false)
|
|
1488
|
+
.describe("Accept restoring the column saved at an earlier conversion."),
|
|
1489
|
+
confirm: Confirm,
|
|
1490
|
+
},
|
|
1491
|
+
annotations: _MUT,
|
|
1492
|
+
}, async (a) => text(await fieldTypeChange.changeFieldType(a.entity_name, a.field_name, {
|
|
1493
|
+
type: a.type,
|
|
1494
|
+
subType: a.sub_type,
|
|
1495
|
+
defaultValue: a.default_value,
|
|
1496
|
+
dropDefault: a.drop_default,
|
|
1497
|
+
acceptLocaleLoss: a.accept_locale_loss,
|
|
1498
|
+
acceptStashRestore: a.accept_stash_restore,
|
|
1499
|
+
confirm: a.confirm,
|
|
1500
|
+
})));
|
|
1434
1501
|
reg("suppa_add_enum_values", {
|
|
1435
1502
|
description: "Add values to an enum (lookup table). values: comma-separated 'code' or\n" +
|
|
1436
1503
|
" 'code:Label' — a value with no label is stored with the code as its label.\n" +
|
|
@@ -1603,8 +1670,8 @@ export function buildToolTable() {
|
|
|
1603
1670
|
' declaration: {"entity","context_field","fields":[{"name","type","title","contexts":["PL"]}]}.\n' +
|
|
1604
1671
|
" Idempotent — a second run answers already_converged. Creates per context in ONE atomic\n" +
|
|
1605
1672
|
" batch, then links existing fields into their other contexts.\n" +
|
|
1606
|
-
" NEVER deletes (a dropped field
|
|
1607
|
-
"
|
|
1673
|
+
" NEVER deletes (a dropped field → not_declared), never re-creates a REMOVED one (→ parked:\n" +
|
|
1674
|
+
" restore it) and never changes a type (type_drift — that is a data migration).\n" +
|
|
1608
1675
|
" Dry run by default; confirm=true applies.",
|
|
1609
1676
|
inputSchema: {
|
|
1610
1677
|
declaration: z
|
|
@@ -1740,7 +1807,7 @@ export function buildToolTable() {
|
|
|
1740
1807
|
" this server does not expose; every delete tool here is the reversible one.\n\n" +
|
|
1741
1808
|
" Removes a single instance, not the entity/schema. Entities and fields are\n" +
|
|
1742
1809
|
" created with suppa_create_entity / suppa_add_field and edited with\n" +
|
|
1743
|
-
" suppa_update_field (
|
|
1810
|
+
" suppa_update_field (its type with suppa_change_field_type); REMOVING a core field\n" +
|
|
1744
1811
|
" is UI-only. Custom fields have their own reversible pair:\n" +
|
|
1745
1812
|
" suppa_remove_custom_field / suppa_restore_custom_field.\n\n" +
|
|
1746
1813
|
" APPROVAL GATE: without confirm=true this returns a confirmation request and deletes nothing.",
|
|
@@ -2502,7 +2569,8 @@ export function buildToolTable() {
|
|
|
2502
2569
|
description: "The Suppa 2.0 (entity-builder) FORM knowledge base. Offline; touches no tenant.\n\n" +
|
|
2503
2570
|
" components the 58 element types (start here) api prop table for the types you name\n" +
|
|
2504
2571
|
" base props every element supports note one type's BEHAVIOUR\n" +
|
|
2505
|
-
" ref layout|binding|tables|charts|conditions|styling|publishing
|
|
2572
|
+
" ref layout|binding|tables|charts|custom-chart|conditions|styling|publishing|\n" +
|
|
2573
|
+
" choosing-elements\n" +
|
|
2506
2574
|
" template a starting draft by name rules the nine rules and what blocks\n\n" +
|
|
2507
2575
|
" No mode returns all 58 prop tables: they are 13,412 tokens stripped, and not carrying\n" +
|
|
2508
2576
|
" them is what this skill is for. Full skill: skills/suppa-form-v2/SKILL.md.",
|
|
@@ -2551,7 +2619,9 @@ export function buildToolTable() {
|
|
|
2551
2619
|
description: "Save a Suppa 2.0 form as a DRAFT on the tenant, through the builder's own save\n" +
|
|
2552
2620
|
" (PUT /core/forms/:id/schema). It never publishes: what others see stays the published\n" +
|
|
2553
2621
|
" version; a published form reads `editing`. The save appears in the builder's History.\n\n" +
|
|
2554
|
-
" The gate runs first
|
|
2622
|
+
" The gate runs first, judged against the live form: what the form already has does not\n" +
|
|
2623
|
+
" block, a refusal or an error the draft adds and nothing is written. It compiles each\n" +
|
|
2624
|
+
" widget's compiledRender from its template; a hand-written one is never saved.\n" +
|
|
2555
2625
|
" The row is read first and a read that does not clearly succeed ABORTS — merging over a\n" +
|
|
2556
2626
|
" failed read is how a saved mobile layout and code-form vanish on a call returning 200.\n" +
|
|
2557
2627
|
" Writes schema and settings; `variables` only when the draft lists some — the list is the\n" +
|
|
@@ -2851,7 +2921,8 @@ export function buildServer() {
|
|
|
2851
2921
|
},
|
|
2852
2922
|
}, (a) => `Write Suppa 2.0 application schema code for: ${a.entity_purpose}\n\n` +
|
|
2853
2923
|
"Follow the bundled 'suppa-entity-code' skill (skills/suppa-entity-code/SKILL.md inside the installed suppa-mcp-2 package):\n" +
|
|
2854
|
-
"1. Pre-flight: the target app repo exists,
|
|
2924
|
+
"1. Pre-flight: the target app repo exists, its src/index.ts exports a named AppModule, @suppa/sdk is in dependencies at the version extension-runner ships (1.38.7 as of 2026-09-29 — newer APIs compile but are missing at runtime), " +
|
|
2925
|
+
"every runtime import is in dependencies, imports are relative (the platform build ignores the app tsconfig's paths/baseUrl), and its tsconfig enables experimentalDecorators + emitDecoratorMetadata for local tsc.\n" +
|
|
2855
2926
|
"2. Resolve the blocking questions BEFORE writing any file: importKeyFields (the stable business key — wrong means duplicate seed rows on every restart), " +
|
|
2856
2927
|
"representativeFieldName, and per-field nullable.\n" +
|
|
2857
2928
|
"3. Write src/common/database/entities/*.entity.ts — @Entity class extending SystemBaseEntity; scalars via @Column({ type: FieldTypeEnum.X }); " +
|
|
@@ -2876,7 +2947,8 @@ export function buildServer() {
|
|
|
2876
2947
|
"6. Gate before claiming done: node node_modules/suppa-mcp-2/skills/suppa-entity-code/scripts/validate-suppa-schema.mjs <app-root> " +
|
|
2877
2948
|
"(strict by default — restated default options and unreferenced enum global names fail it, exit 1) " +
|
|
2878
2949
|
"(or the skills/ dir of a checkout) reports 0 errors; npx tsc --noEmit passes; " +
|
|
2879
|
-
"push, reload (POST /core/applications/:appId/reload),
|
|
2950
|
+
"push, reload (POST /core/applications/:appId/reload), then read the Applications row (suppa_search_records on 'Applications': status, statusDetails, buildStatus, buildError, buildVersion — artifactRef is sudo-only and never comes back) " +
|
|
2951
|
+
"until buildStatus = ready and status = running — FAIL on status = failed or a statusDetails starting with 'Migration failed:', 'Migration did not run:' or 'Entity/Seeds import failed:' — and only then verify with suppa_describe_entity — " +
|
|
2880
2952
|
"the gate fails with E301 if anything is unregistered — run it, do not assume.\n" +
|
|
2881
2953
|
"Porting from Suppa 1.0? Read the schema with suppa_read_v1_entity_props / suppa_read_v1_enum and map per references/v1-mapping.md — " +
|
|
2882
2954
|
"never invent a mapping; record data stays with suppa_migrate_entities_from_v1.");
|
|
@@ -2911,6 +2983,7 @@ async function healthCheck(deep = true) {
|
|
|
2911
2983
|
// first gate call.
|
|
2912
2984
|
form_v2_core: await formV2.coreStatus(),
|
|
2913
2985
|
form_v2_gate: formV2.skillFile("scripts", "validate-form-schema.mjs") ? "present" : "MISSING",
|
|
2986
|
+
form_v2_widget_compiler: await formV2.widgetCompilerStatus(),
|
|
2914
2987
|
entity_code_validator: await entityCode.validatorStatus(),
|
|
2915
2988
|
},
|
|
2916
2989
|
};
|
package/dist/toolTable.js
CHANGED
|
@@ -3,7 +3,7 @@ export const PROFILES = {
|
|
|
3
3
|
data: ["search_records", "get_record", "create_record", "update_record", "delete_record", "restore_record", "copy_record", "validate_select", "query", "search_entities", "list_entities", "describe_entity", "search_users"],
|
|
4
4
|
tasks: ["search_tasks", "get_task", "create_task", "update_task", "close_task", "delete_task", "move_task", "count_tasks", "list_stages", "list_task_types", "list_workflows", "add_comment", "get_comments", "create_workspace", "add_menu_item"],
|
|
5
5
|
files: ["attach_file", "attach_file_to_record", "download_file", "download_files_zip", "list_record_files"],
|
|
6
|
-
schema: ["create_entity", "add_field", "update_field", "update_entity_options", "set_title_field", "create_tabular_part", "list_tabular_parts", "list_field_types", "add_enum_values", "add_custom_field", "add_custom_fields_batch", "remove_custom_field", "restore_custom_field", "resolve_custom_fields", "link_custom_field", "apply_custom_fields", "validate_entity_code", "migrate_entities_from_v1", "read_v1_entities", "read_v1_entity_props", "read_v1_enum"],
|
|
6
|
+
schema: ["create_entity", "add_field", "update_field", "change_field_type", "update_entity_options", "set_title_field", "create_tabular_part", "list_tabular_parts", "list_field_types", "add_enum_values", "add_custom_field", "add_custom_fields_batch", "remove_custom_field", "restore_custom_field", "resolve_custom_fields", "link_custom_field", "apply_custom_fields", "validate_entity_code", "migrate_entities_from_v1", "read_v1_entities", "read_v1_entity_props", "read_v1_enum"],
|
|
7
7
|
docs: ["create_doc", "get_doc", "list_docs", "update_doc", "delete_doc", "create_page", "get_page", "list_pages", "read_page", "update_page", "delete_page", "create_blocks", "get_blocks", "insert_block", "update_block", "delete_block", "reorder_blocks"],
|
|
8
8
|
// Two form PRODUCTS live in this group, and the split is the thing to know before reading the
|
|
9
9
|
// list. The first seven are Suppa 1.0: they read and write `data.formShema` (the platform's
|