suppa-mcp-2 1.16.0 → 1.16.1
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": "suppa-mcp-2",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"description": "MCP server for the Suppa platform (modern.suppa.me) — Tasks, Docs/Pages, Entities & Schema, Forms, Automations, and file attachments, with multi-tenant Google auth. Node port of PyPI suppa-mcp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -175,8 +175,10 @@ function gateRoots(roots) {
|
|
|
175
175
|
const notes = [];
|
|
176
176
|
for (const root of [...new Set(roots)]) {
|
|
177
177
|
const r = runGate(root);
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
// "could not run" and "nothing to run on" are not the same answer, and the
|
|
179
|
+
// two layers that decide what LANDS have to tell them apart.
|
|
180
|
+
if (r.toolchain) notes.push({ kind: "toolchain", root, text: `${root}: ${r.toolchain}` });
|
|
181
|
+
else if (r.skipped) notes.push({ kind: "skipped", root, text: `${root}: ${r.skipped}` });
|
|
180
182
|
else if (!r.ok) failures.push({ root, lines: r.lines });
|
|
181
183
|
}
|
|
182
184
|
return { failures, notes };
|
|
@@ -268,7 +270,7 @@ function postToolUse() {
|
|
|
268
270
|
if (notes.length) {
|
|
269
271
|
emitHookJson(
|
|
270
272
|
"PostToolUse",
|
|
271
|
-
`The entity-code gate could not run: ${notes.join("; ")}. Run it yourself before reporting ` +
|
|
273
|
+
`The entity-code gate could not run: ${notes.map((n) => n.text).join("; ")}. Run it yourself before reporting ` +
|
|
272
274
|
`this file done — suppa_validate_entity_code(path=<app-root>).`,
|
|
273
275
|
);
|
|
274
276
|
}
|
|
@@ -293,10 +295,39 @@ function stop() {
|
|
|
293
295
|
return 2;
|
|
294
296
|
}
|
|
295
297
|
|
|
298
|
+
/**
|
|
299
|
+
* A gate that could not run must never answer "clean".
|
|
300
|
+
*
|
|
301
|
+
* The checker parses with the TypeScript OF THE REPO it is checking, and a repo
|
|
302
|
+
* without one makes validateSchema throw. That arrived here as a note, was
|
|
303
|
+
* dropped, and the commit hook printed "suppa entity-code gate: clean" over
|
|
304
|
+
* schema code nothing had looked at. The hooks stay fail-open on purpose — they
|
|
305
|
+
* advise an agent mid-edit and must not wall off every write — but the two
|
|
306
|
+
* layers that decide what LANDS refuse instead.
|
|
307
|
+
*/
|
|
308
|
+
function toolchainRefusal(notes) {
|
|
309
|
+
const broken = notes.filter((n) => n.kind === "toolchain");
|
|
310
|
+
if (!broken.length) return null;
|
|
311
|
+
return (
|
|
312
|
+
"suppa entity-code gate: COULD NOT RUN — " +
|
|
313
|
+
broken.map((n) => n.text).join("; ") +
|
|
314
|
+
"\nNothing was checked, so nothing can be called clean. The checker parses with the " +
|
|
315
|
+
"application repo's own TypeScript: install it there (npm i -D typescript@5) and try again."
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
|
|
296
319
|
function preCommit() {
|
|
297
320
|
const files = stagedSchemaFiles(process.cwd()).filter((f) => !isIgnored(appRootFor(f), f));
|
|
298
321
|
if (!files.length) return 0;
|
|
299
|
-
const { failures } = gateRoots(files.map(appRootFor));
|
|
322
|
+
const { failures, notes } = gateRoots(files.map(appRootFor));
|
|
323
|
+
const broken = toolchainRefusal(notes);
|
|
324
|
+
if (broken) {
|
|
325
|
+
process.stderr.write(
|
|
326
|
+
`${broken}\nCommit refused. Pass --no-verify only if you mean to commit schema code that ` +
|
|
327
|
+
`nothing verified.\n`,
|
|
328
|
+
);
|
|
329
|
+
return 1;
|
|
330
|
+
}
|
|
300
331
|
if (!failures.length) {
|
|
301
332
|
process.stdout.write("suppa entity-code gate: clean\n");
|
|
302
333
|
return 0;
|
|
@@ -311,7 +342,12 @@ function preCommit() {
|
|
|
311
342
|
function ci(args) {
|
|
312
343
|
const roots = args.length ? args.map((p) => resolve(p)) : [process.cwd()];
|
|
313
344
|
const { failures, notes } = gateRoots(roots);
|
|
314
|
-
for (const n of notes) process.stdout.write(`note: ${n}\n`);
|
|
345
|
+
for (const n of notes) process.stdout.write(`note: ${n.text}\n`);
|
|
346
|
+
const broken = toolchainRefusal(notes);
|
|
347
|
+
if (broken) {
|
|
348
|
+
process.stdout.write(`${broken}\n`);
|
|
349
|
+
return 1;
|
|
350
|
+
}
|
|
315
351
|
if (!failures.length) {
|
|
316
352
|
process.stdout.write("suppa entity-code gate: clean\n");
|
|
317
353
|
return 0;
|