Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,35 @@ against the repos, don't guess):
| [abap2UI5/abap2UI5](https://github.com/abap2UI5/abap2UI5) | the framework itself, in ABAP. Downported and transpiled, it is published as `@abap2ui5/node-runtime` |
| [cap2UI5/docs](https://github.com/cap2UI5/docs) | this site |

On npm: `@cap2ui5/cds-plugin@0.5.0` (since 2026-10-14; Node ≥ 22, peer
On npm: `@cap2ui5/cds-plugin@0.6.0` (since 2026-11-16; Node ≥ 22, peer
`@sap/cds` ≥ 9), published by the npm organisation `cap2ui5`, and
`@cap2ui5/samples@0.3.0` (peer `^0.5.0`; 76 of abap2UI5's 138 samples). The
`@cap2ui5/samples@0.3.0` (76 of abap2UI5's 138 samples). The samples' peer
range is `^0.5.0`, which does **not** reach plugin 0.6.0: `npm add -D
@cap2ui5/samples` beside 0.6.0 fails with ERESOLVE (measured), and the
Quickstart says so until a samples release names 0.6. The
plugin pins one `@abap2ui5/node-runtime` release **exactly**: 0.4.0 pinned
1.146.0 (the first runtime whose frontend does the approuter's `X-CSRF-Token`
handshake and has `accelerate( )`), 0.5.0 pins 1.147.0, and cap2UI5's `main`
pins a later one — read it from `plugin/package.json` there; it moved twice
within a day of this being written, and the weekly check run exists to say
when it moves again.
handshake and has `accelerate( )`), 0.5.0 pinned 1.147.0, and 0.6.0 pins the
one cap2UI5's `main` names in `plugin/package.json` — 1.148.0, in between, was
only ever `main`'s pin.

**The site describes two things, and says which is which.** verify-refs
compares against cap2UI5's `main`, so `main`'s pin is the number it accepts
(read from `plugin/package.json`, not from the stand-in
`runtime/package.json`), and a reader installs the newest release on npm. What
is on `main` under the CHANGELOG's "Unreleased" — at the time of writing
`cds.requires.cap2ui5.timeout`, `purgeDrafts`, the queue warning, and
`client.window_bind_tab( )` / `window_get_row( )`, which come with the
runtime `main` pins — is documented, and marked **not released yet** wherever it
appears. Move the mark when the release happens; do not present an unreleased
thing as installable. Older pins are named only with the plugin version they
belong to, and are in `docs/.verify-refs-ignore` for that reason.
`runtime/package.json`), and a reader installs the newest release on npm.
What is on `main` under the CHANGELOG's "Unreleased" — nothing, right after
0.6.0 — is documented when it appears, and marked **not released yet**
wherever it stands. Move the mark when the release happens; do not present an
unreleased thing as installable. `main` can move within hours: its pin went
from 1.148.0 to 1.149.0 and 0.6.0 was released on the day this site caught up
with 0.5.0, which is what the weekly check run is for. Older pins are named
only with the plugin version they belong to, and are in
`docs/.verify-refs-ignore` for that reason.

0.6.0 added `cds.requires.cap2ui5.timeout` (an async `main( )` is given up
with a 504 after a minute), the warning when a roundtrip had to wait,
`purgeDrafts`, and `client.window_bind_tab( )` / `window_get_row( )`, which
need its runtime.

Since 0.5.0 the plugin also serves an MCP endpoint for AI agents
(`cds.requires.cap2ui5.agent`, off by default; `plugin/lib/agent/`, ADR-009),
Expand Down
4 changes: 2 additions & 2 deletions docs/.verify-refs-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ z2ui5_cl_caps_app_002 # cap2UI5/samples-stack's RFC sample, linked from exampl
# verify-refs reads the option names from package.json#cds.requires.cap2ui5,
# which holds apps, roles and routes. These two are read by
# plugin/lib/config.js, which holds their defaults (60000 ms; off).
cap2ui5.timeout # the ms an async main( ) may take — config.js timeoutOf( ); on cap2UI5's main, after 0.5.0
cap2ui5.timeout # the ms an async main( ) may take — config.js timeoutOf( ); since 0.6.0
cap2ui5.agent # the MCP endpoint's switch and settings — config.js / lib/agent/policy.js agentConfig( ), since 0.5.0

# --- release numbers that are NOT the pinned runtime release ----------------
Expand All @@ -50,6 +50,6 @@ cap2ui5.agent # the MCP endpoint's switch and settings — config.js /
# still called one of them the current pin would pass — so name them only
# together with the plugin version they belong to.
1.146.0 # the runtime plugin 0.4.0 pinned — history, in the plugin-to-runtime table
1.147.0 # the runtime plugin 0.5.0 pins, the newest release on npm — main has moved to the next one
1.147.0 # the runtime plugin 0.5.0 pinned — history, in the plugin-to-runtime table
1.143.0 # the upstream release where _bind/_bind_edit merged — history, stays true whatever the pin says
1.113.0 # an OpenUI5 release — a UI5 number, not a framework release
3 changes: 1 addition & 2 deletions docs/api/app-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ builder, see [Views](../guide/views) — and `z2ui5_if_client`, the client's
constants as an ABAP app reads them (`z2ui5_if_client.cs_event.set_title`).
For a project's own scheduled job there are two more:
[`purgeAgentLog`](../guide/agents#retention), since 0.5.0, and
[`purgeDrafts`](../reference/database#purgedrafts),
which is not released yet.
[`purgeDrafts`](../reference/database#purgedrafts), since 0.6.0.

## `defineApp(name, class, opts?)`

Expand Down
24 changes: 16 additions & 8 deletions docs/api/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,27 @@ runtime from before transitions existed — the one plugin 0.3.x pins —

## The windowed table

::: warning Not released yet
`client.window_bind_tab( )` and `client.window_get_row( )` are on cap2UI5's
`main`, after 0.5.0. They come with `@abap2ui5/node-runtime` `1.149.0`, the
release `main` pins; plugin 0.5.0 and its runtime have neither. On an older
runtime the client does not have the two methods, and a call throws, naming
the runtime in use:
Since plugin 0.6.0, whose runtime — `@abap2ui5/node-runtime` `1.149.0` — is
the first that has it. On an older runtime (an `overrides` to the one before,
say) the client does not have the two methods. A call throws, naming the
runtime in use, and the app's roundtrip fails with a 500:

```
client.window_bind_tab( ): z2ui5_if_client has no window_bind_tab in the abap2UI5 runtime this project runs on (@abap2ui5/node-runtime <version>) - it came with a later release
```

What follows is read from the plugin's code and abap2UI5's interface. It has
not been run for this page.
::: info What is measured here
With plugin 0.6.0 and the example app in cap2UI5
(`examples/bookshop/srv/apps/window.js` — 300 rows, a window of 50), on the
wire and in a headless browser: the first answer with 50 rows and the window's
state; the next window without `main( )` running; sorting and filtering from
the list and from the app; `window_get_row( )`; an edit in a sorted window
landing in its own row; a table inside a structure; the refusals; and the
error above on the older runtime. In the browser a growing `sap.m.Table` was
used — a scrolling `sap.ui.table.Table` was not run. One thing looked off
there: after the app's own filter cut the total from 300 to 100, the list's
counter still read `[ 100 / 300 ]`, though the server had answered a `TOTAL`
of 100. Whether that is the frontend or stale text was not followed up.
:::

They are abap2UI5's windowed table: a **large** table bound to a list control
Expand Down
10 changes: 6 additions & 4 deletions docs/guide/ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ abap2UI5 builds itself.

| | |
|---|---|
| `@cap2ui5/cds-plugin` | the plugin — about 4,800 lines of code on `main` (counted without comments and blank lines), some 2,000 of them the ABAP translator `abap2js`, plus about 1,950 vendored unchanged from abap2UI5's MCP server for the agent endpoint. Mounts the route, implements the draft store over a CDS entity, turns a JS class into something the runtime can call, and serves the [agent endpoint](./agents) |
| `@cap2ui5/cds-plugin` | the plugin — about 4,800 lines of code in 0.6.0 (counted without comments and blank lines), some 2,000 of them the ABAP translator `abap2js`, plus about 1,950 vendored unchanged from abap2UI5's MCP server for the agent endpoint. Mounts the route, implements the draft store over a CDS entity, turns a JS class into something the runtime can call, and serves the [agent endpoint](./agents) |
| `@abap2ui5/node-runtime` | abap2UI5: upstream's ABAP, downported and transpiled over open-abap, with the UI5 frontend embedded in the page its GET answers with — backend and frontend from one commit |
| `@cap2ui5/samples` | abap2UI5's samples as cap2UI5 apps. Optional: added to a project, they run beside its own apps — see [Apps from a package](./project-structure#apps-from-a-package) |

All three are on npm: `@cap2ui5/cds-plugin` 0.5.0 (Node ≥ 22, `@sap/cds` ≥ 9 as a peer),
All three are on npm: `@cap2ui5/cds-plugin` 0.6.0 (Node ≥ 22, `@sap/cds` ≥ 9 as a peer),
`@abap2ui5/node-runtime`, of which the plugin pins one release exactly —
`1.147.0` in 0.5.0, `1.149.0` on `main`, which is not released yet —
and `@cap2ui5/samples` 0.3.0, which needs plugin 0.5. `npm add @cap2ui5/cds-plugin` installs the first two — see the
`1.149.0` in 0.6.0 —
and `@cap2ui5/samples` 0.3.0, whose peer range is plugin `^0.5.0`: it does not
install beside plugin 0.6.0 yet (see the [Quickstart](./getting-started#the-samples)).
`npm add @cap2ui5/cds-plugin` installs the first two — see the
[Quickstart](./getting-started). Up to 0.2.0 the plugin was the unscoped
package `cap2ui5`. On npm that name is now only a deprecated placeholder that
installs nothing usable; its `cap2ui5` command prints where to go instead.
Expand Down
10 changes: 10 additions & 0 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,16 @@ npm add -D @cap2ui5/samples
cds watch
```

::: warning With plugin 0.6.0 this install fails today
`@cap2ui5/samples` 0.3.0 names plugin `^0.5.0` as its peer, and a caret range
below 1.0 does not reach 0.6.0. Measured in a project with plugin 0.6.0:
`npm add -D @cap2ui5/samples` stops with `ERESOLVE … peer
@cap2ui5/cds-plugin@"^0.5.0" from @cap2ui5/samples@0.3.0`. Until a samples
release names 0.6, either stay on plugin 0.5.0 for the samples or look at them
in their [repository](https://github.com/cap2UI5/samples). Forcing the install
with `--legacy-peer-deps` has not been tried here.
:::

The startup lines gain one line for the package, below `HELLO` and `BOOKS`:

```
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ open over lunch is fine; one left open overnight starts fresh. Both the sweep
and the framework's willingness to resume follow the same number, and your
[user exit](./user-exit#onroundtrip) sets it. Where nobody opens an app for a
while the expired rows wait; a job of your own can delete them with
`purgeDrafts` — not released yet, see
`purgeDrafts`, since 0.6.0 — see
[Database Model](../reference/database#purgedrafts).

## The database in development
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ same one:
```json
{
"cap2ui5": { "apps": "srv/apps" },
"peerDependencies": { "@cap2ui5/cds-plugin": "^0.5.0" }
"peerDependencies": { "@cap2ui5/cds-plugin": "^0.6.0" }
}
```

Expand Down
11 changes: 6 additions & 5 deletions docs/guide/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ AI agents operate apps as the logged-on user, with an audit log; runs the
roundtrips of a process one at a time; and keeps the session of a stateful
ABAP app per user.

**On `main`, not released yet:** a `timeout` for an app's async `main( )`
(504 after a minute), `purgeDrafts` for a scheduled job, and runtime 1.149.0
with `client.window_bind_tab( )` / `window_get_row( )` — abap2UI5's windowed
table. The details are in the plugin's
0.6.0 bounds an app's async `main( )` with a `timeout` (504 after a minute),
warns when a roundtrip had to wait, adds `purgeDrafts` for a scheduled job,
and hosts runtime 1.149.0 with `client.window_bind_tab( )` /
`window_get_row( )` — abap2UI5's windowed table. The details are in the plugin's
[CHANGELOG](https://github.com/cap2UI5/cap2UI5/blob/main/plugin/CHANGELOG.md).

## Known limits today
Expand All @@ -52,7 +52,8 @@ not run on BTP.

Since 0.5.0. A roundtrip costs milliseconds, so it is rarely felt — but an
app whose `main( )` awaits something slow holds everybody on that instance,
and the bound on it (`timeout`) is not released yet. A stateful ABAP app
until 0.6.0's `timeout` gives that roundtrip up — a minute unless set. A
synchronous `main( )` is not bounded at all. A stateful ABAP app
keeps its session in the process and needs sticky routing. See
[Deployment](../reference/deployment#scaling).

Expand Down
6 changes: 2 additions & 4 deletions docs/guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ the frontend in the runtime 0.3.x pins sends none. Upgrade to

## 504 on the roundtrip

::: info Not released yet
The 504 and the warning below are on cap2UI5's `main`, after 0.5.0. In 0.5.0 a
`main( )` that never settles holds the process's roundtrips with no limit.
:::
Since plugin 0.6.0. (In 0.5.0 a `main( )` that never settles holds the
process's roundtrips with no limit, and nothing answers 504.)

The response is `roundtrip timed out (<id>)`, and the log has the same id:

Expand Down
27 changes: 15 additions & 12 deletions docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ These ship in the plugin's own `package.json` and apply until you override one:
| `body_parser.limit` | the largest roundtrip body, a larger one gets 413. No default of its own: CAP's `cds.server.body_parser.limit` applies, else `10mb`. A roundtrip carries the app's whole model, so a table of a few thousand rows is an ordinary request |
| `compression` | `true`: the page and every roundtrip of 1 kB or more are gzipped where the browser accepts gzip — the page, which carries the whole UI5 frontend, goes out as 83 kB instead of 358 kB. Nothing is compressed twice behind an approuter or ingress that compresses too; `false` leaves the work to it |
| `accelerate` | `true`: the plugin calls the runtime's `accelerate( )` when the server starts, where the runtime has one (every runtime since plugin 0.4.0 does), and logs `runtime accelerations active`. `false` runs the runtime's own code — see [Performance](#performance) |
| `timeout` | **not released yet** — on cap2UI5's `main`, after 0.5.0. The milliseconds an app's async `main( )` may take: `60000` unless set, `0` or `false` for no limit. See [One roundtrip at a time](#one-roundtrip-at-a-time) |
| `timeout` | since 0.6.0. The milliseconds an app's async `main( )` may take: `60000` unless set, `0` or `false` for no limit. See [One roundtrip at a time](#one-roundtrip-at-a-time) |
| `agent` | since 0.5.0. Off unless set: `true`, or `{ path, apps, confirm, forbidden, retention }`, switches on the MCP endpoint AI agents operate apps through — see [Agents](../guide/agents) |

The first three have their defaults in the plugin's `package.json`; the rest
Expand Down Expand Up @@ -118,15 +118,15 @@ There is nothing to add to your own `package.json`.
|---|---|---|
| 0.4.0 | `1.146.0` | the frontend's `X-CSRF-Token` handshake with the approuter, `accelerate( )`, `view_display`'s transitions |
| 0.5.0 | `1.147.0` | flat tables written to JSON directly, the draft kept as a digest, the developer tools as a bundle of their own |
| `main`, not released yet | `1.149.0` | the windowed table behind `client.window_bind_tab( )` and `window_get_row( )` — see [`client`](../api/client#the-windowed-table). The eight obsolete invisible custom controls (`z2ui5.cc.Timer`, `Focus`, `Scrolling`, `Title`, `LPTitle`, `Favicon`, `History`, `Info`) are gone from the frontend: a view that still names one fails to load |
| 0.6.0 | `1.149.0` | the windowed table behind `client.window_bind_tab( )` and `window_get_row( )` — see [`client`](../api/client#the-windowed-table). The eight obsolete invisible custom controls (`z2ui5.cc.Timer`, `Focus`, `Scrolling`, `Title`, `LPTitle`, `Favicon`, `History`, `Info`) are gone from the frontend: a view that still names one fails to load |

The plugin's [CHANGELOG](https://github.com/cap2UI5/cap2UI5/blob/main/plugin/CHANGELOG.md)
has the full list per release. No plugin release pinned the runtime between
the last two rows.

The runtime resolves as the plugin's own dependency, at the pinned version.
To load another release, use npm `overrides` in your `package.json`. The log
names what was loaded at startup — for a checkout of `main`:
names what was loaded at startup — with plugin 0.6.0:

```
[cap2ui5] - @abap2ui5/node-runtime 1.149.0 from …/node_modules/@abap2ui5/node-runtime
Expand Down Expand Up @@ -169,28 +169,31 @@ answer holds **every other user's** roundtrip for as long. So keep the I/O in
`main( )` short, and scale with instances — see
[Deployment](./deployment#what-changes-in-production-and-what-does-not).

Two things on cap2UI5's `main` make that visible and bounded. They are **not
released yet** — 0.5.0 has the queue without them:
Since 0.6.0 two things make that visible and bounded — 0.5.0 has the queue
without them. Both are measured, with plugin 0.6.0 on localhost:

- **`timeout`.** An async `main( )` that takes longer than
`cds.requires.cap2ui5.timeout` milliseconds — a minute unless set — has its
roundtrip given up. The browser gets **504** with
`roundtrip timed out (<id>)`, the draft of that roundtrip is not written,
and the next roundtrip runs. `0` or `false` is no limit. A synchronous
`main( )` cannot be interrupted and is not timed, and neither is a
transpiled ABAP app.
transpiled ABAP app. Measured: with the limit at 1500 ms, a `main( )` that
waited 20 seconds was answered 504 after 1525 ms, the roundtrip of another
user queued behind it got its 200 right after, and the same user carried on
from the draft id they had. With the default, the 504 came after 60 seconds.
A synchronous `main( )` that spun for 3 seconds was not cut off.
- **A warning.** A roundtrip that waited a second or more for its turn is
logged, with the wait and how many were ahead of it — at most once every ten
seconds:

```
[cap2ui5] - a roundtrip waited 1840 ms behind 3 other(s): roundtrips run one at a time per process, so a slow main( ) holds everyone - look for the app that awaits, or run more instances
[cap2ui5] - a roundtrip waited 1213 ms behind 1 other(s): roundtrips run one at a time per process, so a slow main( ) holds everyone - look for the app that awaits, or run more instances
```

::: warning Upgrading past 0.5.0
An app whose async `main( )` legitimately takes longer than a minute will fail
with 504 once `timeout` is released. Raise the setting, or set it to `0`, for
that project.
::: warning Upgrading from 0.5.0
An app whose async `main( )` legitimately takes longer than a minute fails
with 504 from 0.6.0 on. Raise the setting, or set it to `0`, for that project.
:::

## What the plugin does not configure
Expand Down Expand Up @@ -219,7 +222,7 @@ An unhandled error in the roundtrip answers `500` with
0.5.0, to letters, digits and `. _ : -`, because CAP takes that id from a
request header when there is one. A `main( )` that ran out of
[time](#one-roundtrip-at-a-time) answers `504` with
`roundtrip timed out (<id>)` instead (not released yet). The detail — the stack, the SQL, the entity names —
`roundtrip timed out (<id>)` instead (since 0.6.0). The detail — the stack, the SQL, the entity names —
goes to the server log under the same id. That is deliberate: CDS and driver
messages carry entity names, SQL fragments and deployment paths, and none of it
belongs in an HTTP response.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ multitenant CAP app it is scoped by the tenant like every other `cds.run`.

### `purgeDrafts` — the same sweep from your own job {#purgedrafts}

**Not released yet** — on cap2UI5's `main`, after 0.5.0. For a project that
Since 0.6.0 — read from the plugin's code, not run for this page. For a project that
does not want expired drafts to wait for the next app start, the package
exports the same `DELETE`:

Expand Down
Loading
Loading