@golemui/gui-mcp 1.5.0 → 1.5.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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## 1.5.1-rc.0 (2026-09-23)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **gui-mcp:** declare @golemui/dx as a dependency ([5d43a4f0](https://github.com/golemui/golemui/commit/5d43a4f0))
6
+ - **gui-components:** show a restored mid-upload file as failed without emitting a change at mount ([f3597275](https://github.com/golemui/golemui/commit/f3597275))
7
+
8
+ ### ❤️ Thank You
9
+
10
+ - Raúl Jiménez @Elecash
11
+
12
+ ## 1.5.0 (2026-09-14)
13
+
14
+ ### 🚀 Features
15
+
16
+ - **gui-components:** surface upload errors via validation injection and icon retry button ([#357](https://github.com/golemui/golemui/pull/357))
17
+ - **lit:** shim querySelector and export safeDefine for SSR ([#351](https://github.com/golemui/golemui/pull/351))
18
+ - **vue:** nuxt support ([#335](https://github.com/golemui/golemui/pull/335))
19
+ - **gui-components:** add file upload widgets ([#332](https://github.com/golemui/golemui/pull/332))
20
+
21
+ ### 🩹 Fixes
22
+
23
+ - **gui-components:** add interrupted message and reconcile file upload queue ([#359](https://github.com/golemui/golemui/pull/359))
24
+
25
+ ### ❤️ Thank You
26
+
27
+ - Raúl Jiménez @Elecash
28
+
1
29
  ## 1.5.0-rc.2 (2026-09-14)
2
30
 
3
31
  This was a version bump only for gui-mcp to align it with other projects, there were no code changes.
package/cli.js CHANGED
@@ -5,8 +5,8 @@ import { fileURLToPath } from "node:url";
5
5
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
8
- import { d as checkDxCode, r as resolveDxFramework, f as listDxFactoriesCatalog, b as DX_LIST_FACTORIES_TOOL, g as getDxSpec, a as DX_GET_SPEC_TOOL, D as DX_CHECK_CODE_TOOL } from "./list-dx-factories-hQNWmAmY.js";
9
- import { v as validateFormDefinition, c as JSON_VALIDATE_FORM_DEFINITION_TOOL, g as generateFromJsonSchema, a as JSON_GENERATE_FROM_SCHEMA_TOOL, d as generateFromOpenapi, J as JSON_GENERATE_FROM_OPENAPI_TOOL, f as getWidgetSpec, b as JSON_GET_WIDGET_SPEC_TOOL, e as getConcept, G as GET_CONCEPT_TOOL } from "./get-concept-CsLx7Y5b.js";
8
+ import { d as checkDxCode, r as resolveDxFramework, f as listDxFactoriesCatalog, b as DX_LIST_FACTORIES_TOOL, g as getDxSpec, a as DX_GET_SPEC_TOOL, D as DX_CHECK_CODE_TOOL } from "./list-dx-factories-D3u4qsn1.js";
9
+ import { v as validateFormDefinition, c as JSON_VALIDATE_FORM_DEFINITION_TOOL, g as generateFromJsonSchema, a as JSON_GENERATE_FROM_SCHEMA_TOOL, d as generateFromOpenapi, J as JSON_GENERATE_FROM_OPENAPI_TOOL, f as getWidgetSpec, b as JSON_GET_WIDGET_SPEC_TOOL, e as getConcept, G as GET_CONCEPT_TOOL } from "./get-concept-MFKfeD4D.js";
10
10
  const USAGE = `Usage: golemui-mcp [command]
11
11
 
12
12
  Validate GolemUI forms from the command line (no MCP client needed).
@@ -2888,13 +2888,15 @@ const NOTES = {
2888
2888
  fileUpload: [
2889
2889
  "Single-file upload rendered as a one-line input: the box is the drop target and holds the upload button; while the file uploads the box itself becomes the progress bar; once done it shows the file name with a remove button.",
2890
2890
  'REQUIRES a host transport in the form init config: `dependencies: { uploadService: { upload(file, { id, path, onProgress, signal }) => Promise<unknown>, remove?(item) => Promise<void> } }` (a sibling of `dependencies.markdown`). Keep the object reference stable — a new config identity re-initializes the form. Without it the widget renders disabled with an inline error. Call `get_concept({ concept: "host-services" })`.',
2891
- 'The value is a plain envelope, never the `File`: `{ id, name, size, type, status: "uploading" | "uploaded" | "error", error?, data? }` where `data` is exactly what `upload` resolved with. Preload from the server with `status: "uploaded"`. Removing awaits `uploadService.remove(item)` (when provided) before clearing. An item restored with `status: "uploading"` cannot resume — the `File` only existed in the session that picked it — so the widget commits it back as `"error"` with `props.interruptedMessage` (default: `{name} was not uploaded. Remove it and pick the file again.`).',
2891
+ 'The value is a plain envelope, never the `File`: `{ id, name, size, type, status: "uploading" | "uploaded" | "error", error?, data? }` where `data` is exactly what `upload` resolved with. Preload from the server with `status: "uploaded"`. Removing awaits `uploadService.remove(item)` (when provided) before clearing. An item restored with `status: "uploading"` cannot resume — the `File` only existed in the session that picked it — so the widget shows it as failed with `props.interruptedMessage` (default: `{name} was not uploaded. Remove it and pick the file again.`) but leaves the stored value untouched: no `change` fires until the user removes it.',
2892
+ 'Server file cleanup is the HOST\'s job. `uploadService.remove` runs only on an explicit user removal and when this widget replaces its file with a new pick (not awaited, failure only logged). A deleted repeater row, a field pruned by a state, `setData`, a config replacement or an abandoned form all leave the file on the server — the widget cannot know which of those makes it unwanted. Treat every `upload` result as provisional and reconcile server files against the submitted value (promote what the payload references, sweep the rest, e.g. with a TTL). Call `get_concept({ concept: "host-services" })`.',
2892
2893
  'Validate with a `fileValidator`: `{ type: "file", required, blockPendingUploads }`. `blockPendingUploads` defaults to true and fails while the file is uploading or failed, so an unfinished upload cannot be submitted. Message keys: `invalid`, `required`, `pendingUploads`.',
2893
2894
  '`props.accept` (`[".pdf", "image/*"]`) and `props.maxSize` (bytes) are checked BEFORE uploading; a refused or failed file stays in the box with retry/remove icon buttons — never dropped silently. The reason (server `reject(new Error(...))` message, or the default) surfaces in the standard error area below the input, like a date widget\'s invalid-date error. Text props: `buttonLabel`, `acceptMessage`, `maxSizeMessage`, `missingServiceMessage`, `removeAriaLabel`, `cancelAriaLabel`, `retryAriaLabel`, `uploadedMessage`, `removedMessage`, `failedMessage` (`{name}` token); icon overrides: `removeIcon`, `retryIcon`.'
2894
2895
  ],
2895
2896
  multiFileUpload: [
2896
2897
  "The array variant of `fileUpload`: same box, button, progress bar and `uploadService`. Files upload ONE AT A TIME; every finished file becomes a pill inside the box and the value is an array of envelopes.",
2897
2898
  "A failed file pauses the queue until it is retried or removed. The count is never silently blocked — cap it with `maxItems` so the user is told why.",
2899
+ "Same cleanup contract as `fileUpload`: `uploadService.remove` runs only when the user removes a pill; every other way an envelope leaves the array keeps the file on the server, so the HOST reconciles uploads against the submitted value.",
2898
2900
  'Validate with a `filesValidator`: `{ type: "files", required, minItems, maxItems, blockPendingUploads }`. Message keys: `invalid`, `required`, `minItems`, `maxItems`, `pendingUploads`.'
2899
2901
  ],
2900
2902
  dropdown: [
@@ -3671,7 +3673,7 @@ const HOST_SERVICES_CONCEPT = {
3671
3673
  patterns: [
3672
3674
  {
3673
3675
  name: "Inject an upload transport for the file upload widgets",
3674
- description: "`uploadService.upload(file, ctx)` is called as soon as a file is picked; whatever it resolves with is stored verbatim in the field value as `item.data` (a URL, an id, an object). `ctx` carries the item `id`, the form `path`, an `onProgress(percentage)` callback for the progress bar, and an `AbortSignal` that fires when the user cancels. The optional `remove(item)` is awaited when the user removes an uploaded file, before the value is cleared; if it rejects the file stays with the error and a retry. Rejecting `upload` marks the file as failed (the message becomes `item.error`).",
3676
+ description: "`uploadService.upload(file, ctx)` is called as soon as a file is picked; whatever it resolves with is stored verbatim in the field value as `item.data` (a URL, an id, an object). `ctx` carries the item `id`, the form `path`, an `onProgress(percentage)` callback for the progress bar, and an `AbortSignal` that fires when the user cancels. The optional `remove(item)` is awaited when the user removes an uploaded file, before the value is cleared; if it rejects the file stays with the error and a retry. Rejecting `upload` marks the file as failed (the message becomes `item.error`). Server file cleanup is the host's job, not the widget's: `remove` runs on exactly two paths — the explicit user removal above, and the single-file widget replacing its file with a new pick (not awaited, a failure is only logged). Every other way a value disappears leaves the file on the server: a deleted repeater row, a field pruned because its state hid it, `setData` or a config replacement, and a form the user abandons without submitting. The widget cannot tell which of those makes the file unwanted, so treat every `upload` result as provisional and reconcile server files against the submitted value (promote what the payload references, sweep the rest, e.g. with a TTL on unreferenced uploads). `remove` is a courtesy on the two paths above, not the cleanup mechanism.",
3675
3677
  example: {
3676
3678
  // Host side (TypeScript), not part of the form definition:
3677
3679
  // const uploadService = {
@@ -3700,7 +3702,8 @@ const HOST_SERVICES_CONCEPT = {
3700
3702
  "Keep the `dependencies` object reference stable (module level or memoized): the form re-initializes whenever its `config` identity changes, and an inline object literal in JSX or a template is a new identity on every render.",
3701
3703
  'A widget that needs a missing service does not break the form: `fileUpload` renders disabled with an inline "not configured" error and logs to the console; `markdown` renders blank.',
3702
3704
  "Never put a `File` object in the form value — the value is the plain envelope the widget builds from the `upload` result; form events and submit payloads deep-clone data, which turns non-plain objects into `{}`.",
3703
- "`dependencies` is merged shallowly: widget-set defaults, then the DX `formConfig.dependencies`, then the init config `dependencies`; the last one wins per key."
3705
+ "`dependencies` is merged shallowly: widget-set defaults, then the DX `formConfig.dependencies`, then the init config `dependencies`; the last one wins per key.",
3706
+ "The host owns server file cleanup. `uploadService.remove` is called only on an explicit user removal and when the single-file widget replaces its file; a deleted repeater row, a hidden-field prune, `setData`, a config replacement or an abandoned form all leave the file on the server. Treat uploads as provisional and reconcile them against the submitted value."
3704
3707
  ]
3705
3708
  };
3706
3709
  const CONCEPTS = {
package/json.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-CsLx7Y5b.js";
1
+ import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-MFKfeD4D.js";
2
2
  export {
3
3
  G as GET_CONCEPT_TOOL,
4
4
  J as JSON_GENERATE_FROM_OPENAPI_TOOL,
package/lib.js CHANGED
@@ -1,5 +1,5 @@
1
- import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-CsLx7Y5b.js";
2
- import { D, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, l, f as f2, t } from "./list-dx-factories-hQNWmAmY.js";
1
+ import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-MFKfeD4D.js";
2
+ import { D, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, l, f as f2, t } from "./list-dx-factories-D3u4qsn1.js";
3
3
  export {
4
4
  D as DX_CHECK_CODE_TOOL,
5
5
  a2 as DX_GET_SPEC_TOOL,
@@ -1,4 +1,4 @@
1
- import { h as checkReactiveExpression, i as checkBooleanValidatorRules } from "./get-concept-CsLx7Y5b.js";
1
+ import { h as checkReactiveExpression, i as checkBooleanValidatorRules } from "./get-concept-MFKfeD4D.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import { createRequire } from "node:module";
4
4
  import { resolve, join, dirname } from "node:path";
@@ -795,7 +795,8 @@ const INPUTS = [
795
795
  notes: [
796
796
  "Single-file upload rendered as a one-line input: the box is the drop target and holds the upload button; while the file uploads the box itself becomes the progress bar, and once done it shows the file name with a remove button.",
797
797
  "REQUIRES a host transport: pass `dependencies: { uploadService: { upload(file, { id, path, onProgress, signal }) => Promise<unknown>, remove?(item) => Promise<void> } }` in the init config (next to `markdown`). Keep the object reference stable (module level) — a new `config` identity re-initializes the form. Without it the widget renders disabled with an inline error.",
798
- 'The value is a plain envelope, never the `File`: `{ id, name, size, type, status: "uploading" | "uploaded" | "error", error?, data? }` where `data` is exactly what `upload` resolved with. Preload a value from the server with `status: "uploaded"`. Removing awaits `uploadService.remove(item)` (when provided) before clearing. An item restored with `status: "uploading"` cannot resume — the `File` only existed in the session that picked it — so the widget commits it back as `"error"` with `interruptedMessage` (default: `{name} was not uploaded. Remove it and pick the file again.`).',
798
+ 'The value is a plain envelope, never the `File`: `{ id, name, size, type, status: "uploading" | "uploaded" | "error", error?, data? }` where `data` is exactly what `upload` resolved with. Preload a value from the server with `status: "uploaded"`. Removing awaits `uploadService.remove(item)` (when provided) before clearing. An item restored with `status: "uploading"` cannot resume — the `File` only existed in the session that picked it — so the widget shows it as failed with `interruptedMessage` (default: `{name} was not uploaded. Remove it and pick the file again.`) but leaves the stored value untouched: no `change` fires until the user removes it.',
799
+ "Server file cleanup is the HOST's job. `uploadService.remove` runs only on an explicit user removal and when this widget replaces its file with a new pick (not awaited, failure only logged). A deleted repeater row, a field pruned by a state, `setData`, a config replacement or an abandoned form all leave the file on the server — the widget cannot know which of those makes it unwanted. Treat every `upload` result as provisional and reconcile server files against the submitted value (promote what the payload references, sweep the rest, e.g. with a TTL).",
799
800
  "The validator auto-supplies `type: 'file'`. `blockPendingUploads` (default true) fails while the file is still uploading or failed, so a half-finished upload can never be submitted; message keys: `invalid`, `required`, `pendingUploads`.",
800
801
  '`accept` (`[".pdf", "image/*", "application/pdf"]`) and `maxSize` (bytes) are checked BEFORE uploading; a refused or failed file stays in the box with retry/remove icon buttons — it is never dropped silently. The reason (server `reject(new Error(...))` message, or the default) surfaces in the standard error area below the input, like a date widget\'s invalid-date error. Messages: `acceptMessage`, `maxSizeMessage`; accessible names: `removeAriaLabel`, `cancelAriaLabel`, `retryAriaLabel` (`{name}` token); icon overrides: `removeIcon`, `retryIcon`.'
801
802
  ]
@@ -809,6 +810,7 @@ const INPUTS = [
809
810
  notes: [
810
811
  "The array variant of `fileUpload` (same box, button, progress bar and `uploadService`). Files upload ONE AT A TIME; every finished file becomes a pill inside the box and the value is an array of envelopes.",
811
812
  "A failed file pauses the queue until it is retried or removed. The count is never silently blocked: cap it with `maxItems` so the user is told why.",
813
+ "Same cleanup contract as `fileUpload`: `uploadService.remove` runs only when the user removes a pill; every other way an envelope leaves the array keeps the file on the server, so the HOST reconciles uploads against the submitted value.",
812
814
  "The validator auto-supplies `type: 'files'`; rules: `required` (non-empty), `minItems`, `maxItems`, `blockPendingUploads` (default true); message keys: `invalid`, `required`, `minItems`, `maxItems`, `pendingUploads`."
813
815
  ]
814
816
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemui/gui-mcp",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -43,10 +43,11 @@
43
43
  "ajv": "^8.17.1",
44
44
  "ajv-formats": "^3.0.1",
45
45
  "typescript": "^5.9.2",
46
- "@golemui/gui-schemas": "1.5.0",
47
- "@golemui/gui-shared": "1.5.0",
48
- "@golemui/gui-validators": "1.5.0",
49
- "@golemui/core": "1.5.0",
46
+ "@golemui/gui-schemas": "1.5.1",
47
+ "@golemui/gui-shared": "1.5.1",
48
+ "@golemui/gui-validators": "1.5.1",
49
+ "@golemui/dx": "1.5.1",
50
+ "@golemui/core": "1.5.1",
50
51
  "@modelcontextprotocol/sdk": "^1.0.0",
51
52
  "zod": "^4.0.0",
52
53
  "@standard-schema/spec": "^1.0.0"