Total.js ForgeDocumentation
English

Documentation

What is new in Total.js 5 0.0.20

Total.js 5 · total5@0.0.20 guidereleasechangelogmcp

Total.js 5 0.0.20 is in the official repository (0.0.20-1) and is not published on npm yet. This page lists what it adds and fixes. The recipes marked since 0.0.20 run against that source; the rest of the cookbook is executed against the published total5@0.0.19. When 0.0.20 is published, run npm install total5@0.0.20 and the whole cookbook is checked against it.

What it adds

AdditionWhat it doesRecipe
mcp moduleActions with mcp: true become tools of a built-in MCP server at POST /$mcp/ (enabled with CONF.$mcp), with the schema generated from input, query, params and output; Total.mcp.auth checks the callermcp-tools-from-actions
JSONSchema.toAITool(name), JSONSchema.toAIObject(name, description) and action.toAITool()Describe a function or a structured output for an AI model from a compact schema or from an actionjson-schema-for-ai-tools
QueryBuilder.autoqueryjson($, column, schema, defsort, maxlimit)Like autoquery() for the properties of a JSON or JSONB column, with an allowlist; the adapter writes the SQLquery-builder-json-columns
$.content(value, contentType)Sends a string or a Buffer with the content type you chooseresponse-content-type
cache option of NEWACTION()Keeps the response for the same query, params, input, user or language, and skips the middleware and the action while the entry livesaction-cache-option
U.validhost(host) and U.tohost(host)Accept only plain hostnames and canonical IP literals, and return the canonical ASCII form of a hosthostname-validation
Compact schema types json and ipThe values are validated (a JSON text and an IP address) instead of being plain stringsschema-enums-and-formats
Total.FsPromisesA link to node:fs/promisesTotal.FsPromises.readFile(filename, 'utf8')
reset event of a FlowStreamEmitted when the FlowStream receives the reset message, which also clears its error listflow.on('reset', function() {})

What it fixes

  • CRON() with the step form (*/15, 5/20) matches the values of the step and not every value.
  • The limit argument of setTimeout2() works. See debounce-timers.
  • AJAX() settles for answers of type application/xml and text/xml. See ajax-requests.
  • IMPORT() gives an error for an answer with the status 400 or more, or for a file that is not a module. See import-remote-module.
  • F.python() without a callback resolves its promise with the output, and F.pipinstall() works without a callback.
  • LOGMAIL() accepts an object as the body. See logmail.
  • $.href() of a controller works. See upload-lifecycle-and-href.
  • QueryBuilder.gridfields() applies the accepted fields. See query-builder-contract.
  • LDAP() gives an error when a bind answers with a status other than 0, even when the server sends no text. See ldap-openldap.
  • The mail: attachmentfs() reads the file of the storage as a Buffer and completes the message, attachment() with a Buffer encodes the whole Buffer as one Base64 text, and the server is normalized (an invalid hostname answers Invalid SMTP server hostname.).
  • The view engine command @{hostname()}, the tunnel client messages error and abort, and the handling of pending requests.
  • AIPARSER() with tool calling.
  • Security: the hostnames are normalized and validated in the framework itself because of the Node.js security release of 2026-10-21 (CVE-2026-105482, CVE-2026-105483, CVE-2026-106069 and CVE-2026-106072). U.resolve() and U.connect() reject an invalid hostname. The framework does not require a specific version of Node.js. The Brotli issue CVE-2026-111497 does not affect it, because only gzip and deflate are decompressed, and the keep-alive socket issue CVE-2026-105481 is fixed by updating Node.js.

Pages that describe 0.0.19

Eight recipes document, and test, the behavior of the published total5@0.0.19 where 0.0.20 changed it: ajax-requests, debounce-timers, import-remote-module, ldap-openldap, logmail, query-builder-contract, schema-enums-and-formats and upload-lifecycle-and-href. Their statements are right for 0.0.19. The cache option of NEWACTION() listed in action-options also has an effect only from 0.0.20.