@formio/uag 1.12.3 → 1.13.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 +29 -2
- package/lib/index.js +14 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
<img src="./examples/images/logo-formio-uag.png" alt="The Form.io Universal Agent Gateway (UAG)" width="40%">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/@formio/uag"><img src="https://img.shields.io/npm/v/%40formio%2Fuag?label=%40formio%2Fuag" alt="npm: @formio/uag"></a>
|
|
7
|
+
<a href="https://hub.docker.com/r/formio/uag"><img src="https://img.shields.io/docker/v/formio/uag?label=docker&sort=semver" alt="Docker: formio/uag"></a>
|
|
8
|
+
<a href="https://registry.modelcontextprotocol.io/v0/servers?search=io.form/formio-uag"><img src="https://img.shields.io/badge/MCP%20Registry-io.form%2Fformio--uag-blue" alt="MCP Registry: io.form/formio-uag"></a>
|
|
9
|
+
<a href="./LICENSE.txt"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
5
12
|
The Universal Agent Gateway (UAG) leverages the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) to enable in-process agentic automation using Form.io. It provides to an AI Agent the same thing that our [JavaScript Renderer](https://github.com/formio/formio.js) provides to a human; an interpretation of the Form JSON schema into an understandable format. In the case of UAG, it transforms the Form JSON model into an AI readible markdown format so that the Agent can easily understand the purpose and structure of the data that needs to be collected.
|
|
6
13
|
|
|
7
14
|

|
|
@@ -163,6 +170,26 @@ These integrations can be found within the **integrations** folder. The followin
|
|
|
163
170
|
|
|
164
171
|
Please click on one of these integration links to read how they work.
|
|
165
172
|
|
|
173
|
+
### Integration Version Compatibility
|
|
174
|
+
|
|
175
|
+
Integrations are **versioned independently of the UAG**. They share no code with it — each one runs its own MCP client and talks to the UAG over MCP/HTTP — so an integration release does not imply a UAG release, and vice versa. Matching version numbers between the two would be misleading rather than helpful.
|
|
176
|
+
|
|
177
|
+
Use this matrix to pick a compatible pair. Each row records the UAG range an integration version is known to work against:
|
|
178
|
+
|
|
179
|
+
| Integration | Version | Compatible UAG versions | Notes |
|
|
180
|
+
| ----------- | ------- | ----------------------- | ----- |
|
|
181
|
+
| `@formio/uag-claude` | 1.3.x | >= 1.12.0 | Current. |
|
|
182
|
+
| `@formio/uag-claude` | 1.2.x | 1.10.0 – 1.11.x | |
|
|
183
|
+
|
|
184
|
+
Both artifacts are published on every release where their own version changed:
|
|
185
|
+
|
|
186
|
+
- npm: [`@formio/uag`](https://www.npmjs.com/package/@formio/uag), [`@formio/uag-claude`](https://www.npmjs.com/package/@formio/uag-claude)
|
|
187
|
+
- Docker Hub: [`formio/uag`](https://hub.docker.com/r/formio/uag), [`formio/uag-claude`](https://hub.docker.com/r/formio/uag-claude)
|
|
188
|
+
|
|
189
|
+
**When adding a row:** bump the integration's own `package.json` version. CI publishes it to npm and Docker Hub on the next release tag, and skips it automatically when that version is already published — so a core-only release does not rebuild an unchanged integration.
|
|
190
|
+
|
|
191
|
+
The `examples/` compose files reference `formio/uag` and `formio/uag-claude` without a tag, so they always pull the current release and cannot drift out of date. If you need a reproducible stack, pin both images to a compatible pair from the matrix above.
|
|
192
|
+
|
|
166
193
|
---
|
|
167
194
|
|
|
168
195
|
## Technical Overview
|
|
@@ -402,7 +429,7 @@ This module can be configured in many ways. One of those ways is through the use
|
|
|
402
429
|
|
|
403
430
|
| Variable | Description | Example |
|
|
404
431
|
|----------|-------------|---------|
|
|
405
|
-
| PROJECT | The API Endpoint to either an Enterprise project endpoint, or the OSS server url. | http://localhost:3000 |
|
|
432
|
+
| PROJECT | **Required.** The API Endpoint to either an Enterprise project endpoint, or the OSS server url. | http://localhost:3000 |
|
|
406
433
|
| PROJECT_KEY | (Enterprise Only) The API Key of the project this UAG is bound to, found in **Project Settings → API Keys**. Open Source deployments use `ADMIN_KEY` instead. | CHANGEME |
|
|
407
434
|
| ADMIN_KEY | (Open Source Only) Allows you to provide the ADMIN_KEY to install and connect to the OSS Server. | CHANGEME |
|
|
408
435
|
| UAG_LICENSE | The license to run the UAG against a Form.io Enterprise Deployment. | |
|
|
@@ -410,7 +437,7 @@ This module can be configured in many ways. One of those ways is through the use
|
|
|
410
437
|
| PORT | The port you wish to run the server on. | 3200 |
|
|
411
438
|
| DEBUG | Variable used to perform debug logs of server activity | formio.* |
|
|
412
439
|
| PORTAL_SECRET | Enterprise Only: Allows you to connect to the UAG from the Form.io Enterprise Portal. | CHANGEME |
|
|
413
|
-
| JWT_SECRET | A secret used to generate and validate JWT tokens generated through the authentication process of the UAG. This does not need to match the JWT_SECRET of the Enterprise Server that it is connected to. | CHANGEME |
|
|
440
|
+
| JWT_SECRET | **Required.** A secret used to generate and validate JWT tokens generated through the authentication process of the UAG. This does not need to match the JWT_SECRET of the Enterprise Server that it is connected to. | CHANGEME |
|
|
414
441
|
| JWT_EXPIRE_TIME | The expiration for the jwt secret. | 3600 |
|
|
415
442
|
| MONGO | (Enterprise Only) Allows you to connect the UAG directly to a mongo database, rather than having to redirect the submissions to the Form.io Submission APIs. | |
|
|
416
443
|
| MONGO_CONFIG | JSON configuration for the Node.js Mongo Driver. | |
|
package/lib/index.js
CHANGED
|
@@ -26,6 +26,10 @@ class UAGServer extends appserver_1.Server {
|
|
|
26
26
|
super((0, lodash_1.defaultsDeep)(config || {}, {
|
|
27
27
|
baseUrl: (0, lodash_1.get)(process.env, 'BASE_URL', '').toString(),
|
|
28
28
|
license: (0, lodash_1.get)(process.env, 'UAG_LICENSE', '').toString(),
|
|
29
|
+
// A project that is still starting up (a Form.io server in the same compose
|
|
30
|
+
// file, for example) is retried with backoff before the load is given up on.
|
|
31
|
+
retries: parseInt((0, lodash_1.get)(process.env, 'PROJECT_RETRIES', 5).toString(), 10),
|
|
32
|
+
retryDelay: parseInt((0, lodash_1.get)(process.env, 'PROJECT_RETRY_DELAY', 5000).toString(), 10),
|
|
29
33
|
submissionProxy: true,
|
|
30
34
|
processAsClient: true,
|
|
31
35
|
auth: { pkce: true }
|
|
@@ -38,6 +42,16 @@ class UAGServer extends appserver_1.Server {
|
|
|
38
42
|
async router() {
|
|
39
43
|
const router = await super.router();
|
|
40
44
|
const uagProject = Object.values(this.projectRouter?.projects || {})[0];
|
|
45
|
+
// Without a project there are no forms to expose, so there is nothing to
|
|
46
|
+
// serve. Say why: this used to throw "Cannot read properties of undefined
|
|
47
|
+
// (reading 'uagRouter')", which told the operator nothing about the
|
|
48
|
+
// misconfiguration that caused it.
|
|
49
|
+
if (!uagProject) {
|
|
50
|
+
throw new Error('No Form.io project could be loaded, so the UAG has nothing to serve. Check that PROJECT ' +
|
|
51
|
+
'points at a reachable Form.io deployment, and that it is paired with the right ' +
|
|
52
|
+
'credential — ADMIN_KEY for an Open Source server, or PROJECT_KEY plus UAG_LICENSE for ' +
|
|
53
|
+
'an Enterprise project. Earlier log lines report why the project load failed.');
|
|
54
|
+
}
|
|
41
55
|
router.use(uagProject.uagRouter());
|
|
42
56
|
return router;
|
|
43
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/uag",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"mcpName": "io.form/formio-uag",
|
|
5
5
|
"description": "The Form.io Universal Agent Gateway (UAG).",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "Form.io Developers",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@formio/appserver": "^2.
|
|
33
|
+
"@formio/appserver": "^2.14.0",
|
|
34
34
|
"@formio/core": "2.8.0",
|
|
35
35
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
36
36
|
"cors": "^2.8.6",
|