[data-reveal]{opacity:1!important;transform:none!important}
AntelopeJS DMS
DocumentationRequests a built block sends

Requests a built block sends

Which routes a block that an agent builds through the DMS MCP tools may send writes to, which links it may hold, and how the tools refuse the rest.

A block runs in the person's browser, with the person's session. A form an agent wrote could post to a route such as /api/builder/database/connections/check and hand it a URL the person never typed. So the builder tools refuse a block that sends a request outside the page's own data API.

Write targets

builder_add_block, builder_compose_page and builder_configure_block refuse with invalid_config, and write nothing, when one of these options points outside the project's data API:

  • A submitUrl, or a secret field's rotateUrl.
  • A fetchUrl whose fetchUrlMethod is not GET.
  • The url of an api or exportJob action target, such as a TableView custom row action.

Each must be a DataAPI endpoint of one of the project's resources, such as /api/<resource>/new, /edit, /delete, /archive, /restore, /export/start, or a read. A route under the page's own slug is refused too, even a query the page declares, since a query answers reads.

The path holds plain segments only. A {{token}}, a dot segment, a % escape or another origin is refused. Put a record id in the query string, such as /api/orders/edit?id={{params.id}}.

A to link, and the url of a page or external action target, is refused when:

  • It names a scheme other than http, https, mailto or tel. The check reads the link as a browser does, so javascript: cannot hide behind a tab or a leading space.
  • It writes no scheme and has a {{token}} before its first /, ? or #. An empty token could join a scheme back together.
  • It is a single token, such as {{row.invoiceUrl}}, since the row would pick the scheme.

A token after a written-out scheme is fine, such as mailto:{{row.email}}.

How a patch is judged

The builder judges the options as it writes them, after its version check.

  • builder_configure_block is judged on the merged options. A patch of fetchUrlMethod: "POST" alone turns the block's fetchUrl into a write, and is refused unless that URL is allowed.
  • A URL the patch leaves as it was is not judged, so a block that its author pointed elsewhere can still be edited.
  • When the builder would not edit the block, or the URL is written in code, a patch that touches any of these options is refused, with the pointer /path.
  • Two patches sent at once are judged in order, so two halves cannot together turn a read into a write.

builder_compose_page judges each block with its query's route in the option query.into names, fetchUrl by default. A query written into submitUrl, or into a fetchUrl sent with POST, is refused.

builder_add_block also refuses a block name that is not an identifier, with the pointer /name, as builder_compose_page does.

mockup_apply_to_page judges the blocks it writes the same way, on the options it changes, and answers invalid with the draft pointer, such as /blocks/0/config/fetchUrl.

The refusal's pointer names the option, such as /config/submitUrl. A request to any other route is the person's to add in code.