@fleetless/contracts 15.3.0 → 15.5.0-next.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
@@ -9,6 +9,57 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ### Changed
13
+
14
+ - **The default app mails carry an HTML part with the app's brand**
15
+ (fleetless/fleetless#1155). `DEFAULT_MAIL_TEMPLATES[kind].html` is a
16
+ string now, typed `string` and no longer `null`: a Liquid template that
17
+ lays out the same words as the text part, with the app's name, logo or
18
+ initials and accent at the head, as the hosted pages show them, and under
19
+ the sheet the app's legal links when both are set and `Secured by
20
+ Fleetless`. Light only: both colour-scheme metas say `light only` and no
21
+ rule follows the reader's system. The four strings are generated from the
22
+ cloud's mail layout into `src/app-mail-html.ts`, exported as
23
+ `DEFAULT_MAIL_HTML`; `scripts/write-app-mail-html.ts` writes that file
24
+ from the cloud's printer. Subjects and text do not change. A custom
25
+ template is sent exactly as written, with or without HTML.
26
+ - `MAIL_TEMPLATE_VARIABLES` gains five names after the eleven, in this
27
+ order: `app.accent` (`#rrggbb`, the app's accent where its plan includes
28
+ `hosted_logo`, otherwise `#161616`), `app.on_accent` (`#000000` or
29
+ `#ffffff`, whichever reads better on it), `app.initials` (one or two
30
+ letters, as on the hosted pages), `app.logo_src` (what to put into an
31
+ `<img src>`, or null when the app has no logo to show in a mail) and
32
+ `app.logo_shape` (`square`, `wide` or null). Sixteen in all. A consumer
33
+ that checks a template against the list accepts them; one that typed
34
+ `html` as `null` reads a string.
35
+
36
+ ## [15.4.0] — 2026-11-13
37
+
38
+ ### Changed
39
+
40
+ - **A hardware encoder takes no camera of odd size**
41
+ (fleetless/fleetless#1143). With `live.encoder` present and not
42
+ `software`, `robotConfigDoc` refuses every camera whose `width` or `height`
43
+ is odd, passthrough cameras included: one issue per odd key, at
44
+ `cameras.<slug>.width` or `cameras.<slug>.height`, with zod's `custom` code
45
+ and a sentence that names the setting, the odd value and the two ways out.
46
+ Such a camera was accepted before and gave no picture: H.264 as the bridge
47
+ sends it has no odd size, in a hardware encoder or in the software H.264 it
48
+ falls back to. `software` and an absent key accept an odd size as before.
49
+ The rule spans two sections, so it is a refinement on the document and not
50
+ in the JSON Schema export. It is reported beside the document's other
51
+ refusals, except a fraction on an integer key anywhere in the document,
52
+ which zod treats as final: the finding then arrives once the fraction is
53
+ fixed.
54
+ - With that refinement on it, zod refuses to derive from `robotConfigDoc`:
55
+ `.pick()`, `.omit()`, `.partial()`, `.merge()` and `.extend()` of a key it
56
+ already has throw at runtime, and the type does not show it. `.shape`,
57
+ `.safeExtend()` and `.extend()` with a new key still work. The type and
58
+ the JSON Schema are unchanged.
59
+ - The descriptions of a camera's `width` and `height` and of `live.encoder`
60
+ say the rule. The description of `vaapi` names three elements in the order
61
+ the bridge tries them: `vah264enc`, `vah264lpenc`, `vaapih264enc`.
62
+
12
63
  ## [15.3.0] — 2026-11-13
13
64
 
14
65
  ### Added
@@ -32314,7 +32314,7 @@
32314
32314
  "type": "integer",
32315
32315
  "exclusiveMinimum": 0,
32316
32316
  "maximum": 7680,
32317
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
32317
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
32318
32318
  "examples": [
32319
32319
  1280
32320
32320
  ]
@@ -32323,7 +32323,7 @@
32323
32323
  "type": "integer",
32324
32324
  "exclusiveMinimum": 0,
32325
32325
  "maximum": 4320,
32326
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
32326
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
32327
32327
  "examples": [
32328
32328
  720
32329
32329
  ]
@@ -32565,7 +32565,7 @@
32565
32565
  "maximum": 1350
32566
32566
  },
32567
32567
  "encoder": {
32568
- "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
32568
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
32569
32569
  "type": "string",
32570
32570
  "enum": [
32571
32571
  "software",
@@ -33753,7 +33753,7 @@
33753
33753
  "type": "integer",
33754
33754
  "exclusiveMinimum": 0,
33755
33755
  "maximum": 7680,
33756
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
33756
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
33757
33757
  "examples": [
33758
33758
  1280
33759
33759
  ]
@@ -33762,7 +33762,7 @@
33762
33762
  "type": "integer",
33763
33763
  "exclusiveMinimum": 0,
33764
33764
  "maximum": 4320,
33765
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
33765
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
33766
33766
  "examples": [
33767
33767
  720
33768
33768
  ]
@@ -34004,7 +34004,7 @@
34004
34004
  "maximum": 1350
34005
34005
  },
34006
34006
  "encoder": {
34007
- "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
34007
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
34008
34008
  "type": "string",
34009
34009
  "enum": [
34010
34010
  "software",
@@ -1668,7 +1668,7 @@
1668
1668
  "type": "integer",
1669
1669
  "exclusiveMinimum": 0,
1670
1670
  "maximum": 7680,
1671
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1671
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1672
1672
  "examples": [
1673
1673
  1280
1674
1674
  ]
@@ -1677,7 +1677,7 @@
1677
1677
  "type": "integer",
1678
1678
  "exclusiveMinimum": 0,
1679
1679
  "maximum": 4320,
1680
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1680
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1681
1681
  "examples": [
1682
1682
  720
1683
1683
  ]
@@ -2086,12 +2086,12 @@
2086
2086
  "maximum": 1350
2087
2087
  },
2088
2088
  "encoder": {
2089
- "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2089
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2090
2090
  "enumDescriptions": [
2091
2091
  "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2092
2092
  "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2093
2093
  "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2094
- "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2094
+ "Intel and AMD graphics through VA-API: `vah264enc`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
2095
2095
  "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2096
2096
  ],
2097
2097
  "type": "string",
@@ -1661,7 +1661,7 @@
1661
1661
  "type": "integer",
1662
1662
  "exclusiveMinimum": 0,
1663
1663
  "maximum": 7680,
1664
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1664
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1665
1665
  "examples": [
1666
1666
  1280
1667
1667
  ]
@@ -1670,7 +1670,7 @@
1670
1670
  "type": "integer",
1671
1671
  "exclusiveMinimum": 0,
1672
1672
  "maximum": 4320,
1673
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1673
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1674
1674
  "examples": [
1675
1675
  720
1676
1676
  ]
@@ -2079,12 +2079,12 @@
2079
2079
  "maximum": 1350
2080
2080
  },
2081
2081
  "encoder": {
2082
- "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2082
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2083
2083
  "enumDescriptions": [
2084
2084
  "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2085
2085
  "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2086
2086
  "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2087
- "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2087
+ "Intel and AMD graphics through VA-API: `vah264enc`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
2088
2088
  "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2089
2089
  ],
2090
2090
  "type": "string",
@@ -1699,7 +1699,7 @@
1699
1699
  "type": "integer",
1700
1700
  "exclusiveMinimum": 0,
1701
1701
  "maximum": 7680,
1702
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1702
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1703
1703
  "examples": [
1704
1704
  1280
1705
1705
  ]
@@ -1708,7 +1708,7 @@
1708
1708
  "type": "integer",
1709
1709
  "exclusiveMinimum": 0,
1710
1710
  "maximum": 4320,
1711
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1711
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1712
1712
  "examples": [
1713
1713
  720
1714
1714
  ]
@@ -2117,12 +2117,12 @@
2117
2117
  "maximum": 1350
2118
2118
  },
2119
2119
  "encoder": {
2120
- "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2120
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2121
2121
  "enumDescriptions": [
2122
2122
  "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2123
2123
  "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2124
2124
  "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2125
- "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2125
+ "Intel and AMD graphics through VA-API: `vah264enc`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
2126
2126
  "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2127
2127
  ],
2128
2128
  "type": "string",
@@ -1656,7 +1656,7 @@
1656
1656
  "type": "integer",
1657
1657
  "exclusiveMinimum": 0,
1658
1658
  "maximum": 7680,
1659
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1659
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1660
1660
  "examples": [
1661
1661
  1280
1662
1662
  ]
@@ -1665,7 +1665,7 @@
1665
1665
  "type": "integer",
1666
1666
  "exclusiveMinimum": 0,
1667
1667
  "maximum": 4320,
1668
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1668
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
1669
1669
  "examples": [
1670
1670
  720
1671
1671
  ]
@@ -2074,12 +2074,12 @@
2074
2074
  "maximum": 1350
2075
2075
  },
2076
2076
  "encoder": {
2077
- "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2077
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2078
2078
  "enumDescriptions": [
2079
2079
  "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2080
2080
  "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2081
2081
  "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2082
- "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2082
+ "Intel and AMD graphics through VA-API: `vah264enc`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
2083
2083
  "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2084
2084
  ],
2085
2085
  "type": "string",
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * **Generated. Do not edit by hand.**
4
+ *
5
+ * The default HTML of the four app mails, as the cloud's
6
+ * `scripts/print-app-mail-defaults.ts` prints it on cloud branch
7
+ * `feat/1155-mails-have-no-layout`,
8
+ * commit 4b88972f02775404f5fae008789a9d8fb7c3c4de.
9
+ * Written by `scripts/write-app-mail-html.ts`, which says how to regenerate
10
+ * it.
11
+ *
12
+ * Each value is a Liquid template: the cloud's mail layout for the app frame,
13
+ * with Liquid where the values go. A hand edit here is caught by the cloud
14
+ * test that renders each default and compares it with the layout's own
15
+ * output (`test/app-mail-defaults.test.ts`). `DEFAULT_MAIL_TEMPLATES` in
16
+ * `app-users.ts` carries these as its `html`.
17
+ */
18
+ import type { MailTemplateKind } from './app-users.js';
19
+ export declare const DEFAULT_MAIL_HTML: Record<MailTemplateKind, string>;
@@ -0,0 +1,7 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ export const DEFAULT_MAIL_HTML = {
3
+ "invite": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>You&#39;re invited to {{ app.name }}</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">{{ org.name }} has invited you as {{ role.name }}.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">You&#39;re invited to {{ app.name }}</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Hello {{ user.display_name | default: user.email }},</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\"><b style=\"color:#101614;font-weight:600\">{{ org.name }}</b> has invited you to {{ app.name }} as <b style=\"color:#101614;font-weight:600\">{{ role.name }}</b>.</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;table-layout:fixed\"><tr><td align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"background-color:{{ app.accent }};border-radius:10px\"><a href=\"{{ link }}\" style=\"display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center\">Accept the invitation</a></td></tr><tr><td style=\"padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Or open this link: <span style=\"font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px\">{{ link }}</span></td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail — no account is created until you accept.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n",
4
+ "verify": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>Confirm your email for {{ app.name }}</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">Confirm this address so you can sign in.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">Confirm your email for {{ app.name }}</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Hello {{ user.email }},</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Confirm this address so you can sign in to {{ app.name }}.</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;table-layout:fixed\"><tr><td align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"background-color:{{ app.accent }};border-radius:10px\"><a href=\"{{ link }}\" style=\"display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center\">Confirm this address</a></td></tr><tr><td style=\"padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Or open this link: <span style=\"font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px\">{{ link }}</span></td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail — the account stays unconfirmed and cannot be used.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n",
5
+ "reset": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>Reset your {{ app.name }} password</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">Choose a new password, or ignore this mail.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">Reset your {{ app.name }} password</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Hello {{ user.email }},</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Someone asked to reset the password for this address at {{ app.name }}.</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;table-layout:fixed\"><tr><td align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"background-color:{{ app.accent }};border-radius:10px\"><a href=\"{{ link }}\" style=\"display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center\">Choose a new password</a></td></tr><tr><td style=\"padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Or open this link: <span style=\"font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px\">{{ link }}</span></td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail — your current password keeps working and nothing changes.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n",
6
+ "login_code": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>Your {{ app.name }} sign-in code</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">It works once, for {{ expires_in_minutes }} minutes.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">Your sign-in code</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td align=\"center\" bgcolor=\"#eef2f0\" style=\"background-color:#eef2f0;border-radius:10px;padding:18px 16px;font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:30px;line-height:30px;font-weight:500;letter-spacing:0.16em;color:#101614;text-align:center;font-variant-numeric:tabular-nums;-webkit-user-select:all;user-select:all\">{{ code }}</td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n"
7
+ };
@@ -596,8 +596,23 @@ export type MailTemplateKind = z.infer<typeof mailTemplateKind>;
596
596
  *
597
597
  * `role.name` is the display name of the organization role the invitee will
598
598
  * hold, not its key.
599
+ *
600
+ * **The last five are the app's brand** (fleetless/fleetless#1155), the same
601
+ * one its hosted pages show, so a template can lay a mail out the way the
602
+ * default HTML does:
603
+ *
604
+ * - `app.accent`: `#rrggbb`, the app's accent where its plan includes
605
+ * `hosted_logo`, otherwise `#161616`.
606
+ * - `app.on_accent`: `#000000` or `#ffffff`, whichever reads better on the
607
+ * accent.
608
+ * - `app.initials`: one or two letters, as on the hosted pages.
609
+ * - `app.logo_src`: what to put into an `<img src>`, or null when the app has
610
+ * no logo to show in a mail. In a sent mail it is an inline image
611
+ * (`cid:`), in a preview a `data:` address of the same picture.
612
+ * - `app.logo_shape`: `square`, `wide` or null. A square logo sits beside the
613
+ * app's name, a wide one replaces it.
599
614
  */
600
- export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name", "user.email", "user.display_name", "role.name", "link", "expires_in_hours", "code", "expires_in_minutes", "app.operator_info_url", "app.privacy_policy_url"];
615
+ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name", "user.email", "user.display_name", "role.name", "link", "expires_in_hours", "code", "expires_in_minutes", "app.operator_info_url", "app.privacy_policy_url", "app.accent", "app.on_accent", "app.initials", "app.logo_src", "app.logo_shape"];
601
616
  /**
602
617
  * **The Fleetless default text for the four app mails.**
603
618
  *
@@ -613,9 +628,15 @@ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name",
613
628
  * same renderer, the same bounds — so the cloud's fallback path cannot become
614
629
  * a second, weaker mechanism that merely looks like the real one.
615
630
  *
616
- * **Text-only (`html: null`).** A text part is a complete mail, and a default
617
- * that shipped markup would make every app that never opens the Mails tab send
618
- * Fleetless-styled HTML on behalf of a product that is not Fleetless.
631
+ * **The HTML part carries the app's brand** (fleetless/fleetless#1155).
632
+ * `html` is `DEFAULT_MAIL_HTML[kind]`, which the cloud's mail layout prints:
633
+ * the app's name, logo or initials and accent at the head, as the hosted
634
+ * pages show them, the same words as the text below, and under the sheet the
635
+ * app's legal links when both are set and `Secured by Fleetless`. It is the
636
+ * app's mail, not a Fleetless-styled one, so an app that never opens the
637
+ * Mails tab sends it on its own behalf. The text part stays a complete mail
638
+ * and does not change. A custom template is sent exactly as written, with or
639
+ * without HTML: a default never wraps or completes it.
619
640
  *
620
641
  * The voice is plain and short, names the app rather than this platform, and
621
642
  * says what the link does, how long it lasts, and what to do if it was not
@@ -647,12 +668,13 @@ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name",
647
668
  * is the cloud's business — contracts has no renderer and adding one to check
648
669
  * its own constant would be a second, weaker copy of the thing that actually
649
670
  * sends mail. Here they are pinned as a complete, non-empty set; the cloud
650
- * asserts that the mail it sends for each kind is this exact text.
671
+ * asserts that the mail it sends for each kind is this exact text, and that
672
+ * each HTML default is what its layout prints.
651
673
  */
652
674
  export declare const DEFAULT_MAIL_TEMPLATES: Record<MailTemplateKind, {
653
675
  subject: string;
654
676
  text: string;
655
- html: null;
677
+ html: string;
656
678
  }>;
657
679
  /**
658
680
  * One stored template. `html` is nullable because the mailer's HTML part is
package/dist/app-users.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
3
  import { idpIssuer, mailStatus, password } from './identity.js';
4
+ import { DEFAULT_MAIL_HTML } from './app-mail-html.js';
4
5
  import { httpsLegalUrl } from './legal.js';
5
6
  import { roleKey } from './rights.js';
6
7
  /**
@@ -673,6 +674,21 @@ export const mailTemplateKind = z.enum(['invite', 'verify', 'reset', 'login_code
673
674
  *
674
675
  * `role.name` is the display name of the organization role the invitee will
675
676
  * hold, not its key.
677
+ *
678
+ * **The last five are the app's brand** (fleetless/fleetless#1155), the same
679
+ * one its hosted pages show, so a template can lay a mail out the way the
680
+ * default HTML does:
681
+ *
682
+ * - `app.accent`: `#rrggbb`, the app's accent where its plan includes
683
+ * `hosted_logo`, otherwise `#161616`.
684
+ * - `app.on_accent`: `#000000` or `#ffffff`, whichever reads better on the
685
+ * accent.
686
+ * - `app.initials`: one or two letters, as on the hosted pages.
687
+ * - `app.logo_src`: what to put into an `<img src>`, or null when the app has
688
+ * no logo to show in a mail. In a sent mail it is an inline image
689
+ * (`cid:`), in a preview a `data:` address of the same picture.
690
+ * - `app.logo_shape`: `square`, `wide` or null. A square logo sits beside the
691
+ * app's name, a wide one replaces it.
676
692
  */
677
693
  export const MAIL_TEMPLATE_VARIABLES = [
678
694
  'app.name',
@@ -686,6 +702,11 @@ export const MAIL_TEMPLATE_VARIABLES = [
686
702
  'expires_in_minutes',
687
703
  'app.operator_info_url',
688
704
  'app.privacy_policy_url',
705
+ 'app.accent',
706
+ 'app.on_accent',
707
+ 'app.initials',
708
+ 'app.logo_src',
709
+ 'app.logo_shape',
689
710
  ];
690
711
  /** Omit the entire D.2 line while a legacy app has either legal link unset. */
691
712
  const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_policy_url %}
@@ -707,9 +728,15 @@ const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_polic
707
728
  * same renderer, the same bounds — so the cloud's fallback path cannot become
708
729
  * a second, weaker mechanism that merely looks like the real one.
709
730
  *
710
- * **Text-only (`html: null`).** A text part is a complete mail, and a default
711
- * that shipped markup would make every app that never opens the Mails tab send
712
- * Fleetless-styled HTML on behalf of a product that is not Fleetless.
731
+ * **The HTML part carries the app's brand** (fleetless/fleetless#1155).
732
+ * `html` is `DEFAULT_MAIL_HTML[kind]`, which the cloud's mail layout prints:
733
+ * the app's name, logo or initials and accent at the head, as the hosted
734
+ * pages show them, the same words as the text below, and under the sheet the
735
+ * app's legal links when both are set and `Secured by Fleetless`. It is the
736
+ * app's mail, not a Fleetless-styled one, so an app that never opens the
737
+ * Mails tab sends it on its own behalf. The text part stays a complete mail
738
+ * and does not change. A custom template is sent exactly as written, with or
739
+ * without HTML: a default never wraps or completes it.
713
740
  *
714
741
  * The voice is plain and short, names the app rather than this platform, and
715
742
  * says what the link does, how long it lasts, and what to do if it was not
@@ -741,7 +768,8 @@ const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_polic
741
768
  * is the cloud's business — contracts has no renderer and adding one to check
742
769
  * its own constant would be a second, weaker copy of the thing that actually
743
770
  * sends mail. Here they are pinned as a complete, non-empty set; the cloud
744
- * asserts that the mail it sends for each kind is this exact text.
771
+ * asserts that the mail it sends for each kind is this exact text, and that
772
+ * each HTML default is what its layout prints.
745
773
  */
746
774
  export const DEFAULT_MAIL_TEMPLATES = {
747
775
  invite: {
@@ -756,7 +784,7 @@ Accept the invitation:
756
784
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail — no account is created until you accept.
757
785
  ${APP_LEGAL_MAIL_FOOTER}
758
786
  `,
759
- html: null,
787
+ html: DEFAULT_MAIL_HTML.invite,
760
788
  },
761
789
  verify: {
762
790
  subject: 'Confirm your email for {{ app.name }}',
@@ -768,7 +796,7 @@ Confirm this address so you can sign in to {{ app.name }}:
768
796
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail — the account stays unconfirmed and cannot be used.
769
797
  ${APP_LEGAL_MAIL_FOOTER}
770
798
  `,
771
- html: null,
799
+ html: DEFAULT_MAIL_HTML.verify,
772
800
  },
773
801
  reset: {
774
802
  subject: 'Reset your {{ app.name }} password',
@@ -782,7 +810,7 @@ Choose a new password:
782
810
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail — your current password keeps working and nothing changes.
783
811
  ${APP_LEGAL_MAIL_FOOTER}
784
812
  `,
785
- html: null,
813
+ html: DEFAULT_MAIL_HTML.reset,
786
814
  },
787
815
  login_code: {
788
816
  subject: 'Your {{ app.name }} sign-in code',
@@ -791,7 +819,7 @@ ${APP_LEGAL_MAIL_FOOTER}
791
819
  It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.
792
820
 
793
821
  ${APP_LEGAL_MAIL_FOOTER}`,
794
- html: null,
822
+ html: DEFAULT_MAIL_HTML.login_code,
795
823
  },
796
824
  };
797
825
  /**
@@ -89,9 +89,9 @@ export declare const collectionExportQuery: z.ZodObject<{
89
89
  true: "true";
90
90
  false: "false";
91
91
  }>>;
92
- search: z.ZodOptional<z.ZodString>;
93
- filter: z.ZodOptional<z.ZodString>;
94
92
  sort: z.ZodOptional<z.ZodString>;
93
+ filter: z.ZodOptional<z.ZodString>;
94
+ search: z.ZodOptional<z.ZodString>;
95
95
  robot: z.ZodOptional<z.ZodUUID>;
96
96
  format: z.ZodEnum<{
97
97
  json: "json";
package/dist/config.js CHANGED
@@ -42,6 +42,10 @@ import { ENTRY_KINDS, roleRef } from './rights.js';
42
42
  * the index of declared names that `messages:` and each entry's
43
43
  * `parameters:` build together.
44
44
  *
45
+ * One rule across sections is decided here all the same, and carries none of
46
+ * the thirteen codes: a camera of odd size under a hardware `live.encoder`
47
+ * (`refuseOddSizes`, whose comment says why it sits on the document).
48
+ *
45
49
  * `nested_message_reference` is the one worth naming explicitly, because it
46
50
  * looks decidable here and is: a `messages:` entry whose whole body is
47
51
  * `'${name}'` is a nested reference, full stop. It is the cloud's anyway, so
@@ -1866,11 +1870,11 @@ export const cameraConfig = strictObject({
1866
1870
  description: 'Where this camera\'s frames come from. `kind` picks one of four sources and fixes which other fields the source may carry, so an impossible camera is unrepresentable rather than merely invalid — there is no way to write an RTSP camera with a ROS topic.',
1867
1871
  }),
1868
1872
  width: z.number().int().positive().max(7680).meta({
1869
- description: 'The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer\'s request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream\'s own size.',
1873
+ description: 'The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer\'s request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream\'s own size. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.',
1870
1874
  examples: [1280],
1871
1875
  }),
1872
1876
  height: z.number().int().positive().max(4320).meta({
1873
- description: 'The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream\'s own size.',
1877
+ description: 'The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream\'s own size. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.',
1874
1878
  examples: [720],
1875
1879
  }),
1876
1880
  fps: z.number().int().positive().max(60).meta({
@@ -2033,16 +2037,83 @@ export const liveSection = strictObject({
2033
2037
  examples: [LIVE_DEFAULTS.max_packet_bytes],
2034
2038
  }),
2035
2039
  encoder: liveEncoder.optional().meta({
2036
- description: `What encodes live video on the robot. \`software\` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter \`live.encoder\`; without either, the bridge uses \`${LIVE_DEFAULTS.encoder}\`. A change holds from the next live start; a running stream keeps its encoder.`,
2040
+ description: `What encodes live video on the robot. \`software\` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. H.264 takes no odd size, so with any value but \`software\` every camera's \`width\` and \`height\` must be even, passthrough cameras included, and a document with an odd one is refused. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter \`live.encoder\`; without either, the bridge uses \`${LIVE_DEFAULTS.encoder}\`. A change holds from the next live start; a running stream keeps its encoder.`,
2037
2041
  enumDescriptions: describeValues(liveEncoder.options, {
2038
2042
  software: 'The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.',
2039
2043
  auto: 'Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.',
2040
2044
  nvenc: 'NVIDIA. On a Jetson the board\'s encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.',
2041
- vaapi: 'Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.',
2045
+ vaapi: 'Intel and AMD graphics through VA-API: `vah264enc`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.',
2042
2046
  v4l2: 'A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software.',
2043
2047
  }),
2044
2048
  }),
2045
2049
  });
2050
+ /**
2051
+ * The values of `live.encoder` that send H.264 and nothing else: every one
2052
+ * but `software`. Read from the tuple, so a sixth hardware name is covered by
2053
+ * the rule below the moment it is in the enum.
2054
+ */
2055
+ const H264_ONLY_ENCODERS = new Set(LIVE_ENCODERS.filter((encoder) => encoder !== 'software'));
2056
+ /**
2057
+ * The refusal for one odd key, in one sentence: the setting, the odd value
2058
+ * and the two ways out. A bridge that meets the same camera through its ROS
2059
+ * parameter refuses the live start in the same words, of the whole size.
2060
+ */
2061
+ const oddSizeMessage = (encoder, key, value) => `With live.encoder: ${encoder} the bridge sends H.264, which takes no odd ${key}: set an even ${key} instead of ${value}, or live.encoder: software.`;
2062
+ const isMapping = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
2063
+ const samePath = (a, b) => a.length === b.length && a.every((segment, index) => segment === b[index]);
2064
+ /**
2065
+ * **A hardware encoder takes no camera of odd size.** With any `live.encoder`
2066
+ * but `software` the bridge offers H.264 alone, from the chip or from the
2067
+ * software H.264 it falls back to, and H.264 as the bridge sends it (4:2:0)
2068
+ * has no odd width or height. Such a camera used to be accepted, failed in
2069
+ * every chain and in the fallback, and gave its viewer no picture.
2070
+ *
2071
+ * One issue per odd key, at `cameras.<slug>.width` or `.height`. Every camera
2072
+ * counts, passthrough ones included: a passthrough camera's size must equal
2073
+ * its stream's, and a 4:2:0 H.264 stream has no odd size either, so one rule
2074
+ * without an exception says the same thing. `software` and an absent key
2075
+ * change nothing; the media server may pick VP8 there.
2076
+ *
2077
+ * **It spans two sections, so it is on the document**, and like every
2078
+ * `superRefine` it is not in the JSON Schema export: an editor learns it from
2079
+ * the findings of a validation, and the descriptions of `width`, `height` and
2080
+ * `live.encoder` say it in words. The issue keeps zod's own code, as
2081
+ * `low_bandwidth.exit_lag_ms` does: the format names no code for it.
2082
+ *
2083
+ * **It runs beside the document's other refusals, with one exception.** Zod
2084
+ * skips a refinement once anything in the value is refused, which at the root
2085
+ * means anywhere in the file: a typo three sections away would hide this
2086
+ * finding until it was fixed. `when` lets it run whenever the document is a
2087
+ * mapping, so the value it reads may be half-parsed, and it reads it as such:
2088
+ * nothing unless `live.encoder` is one of the hardware values, nothing for a
2089
+ * camera that is not a mapping, and nothing for a key that is not an integer
2090
+ * or already carries a refusal of its own, which is then the one finding that
2091
+ * key has. The exception is a fraction on an integer key anywhere in the
2092
+ * document: zod treats that refusal as final and runs no `when` check after
2093
+ * it, so this finding arrives once the fraction is fixed. Working around it
2094
+ * would take a `preprocess` or a pipe, and `robotConfigDoc` would stop being
2095
+ * an object schema.
2096
+ */
2097
+ function refuseOddSizes(doc, ctx) {
2098
+ if (!isMapping(doc) || !isMapping(doc.live) || !isMapping(doc.cameras))
2099
+ return;
2100
+ const encoder = doc.live.encoder;
2101
+ if (typeof encoder !== 'string' || !H264_ONLY_ENCODERS.has(encoder))
2102
+ return;
2103
+ for (const [slug, camera] of Object.entries(doc.cameras)) {
2104
+ if (!isMapping(camera))
2105
+ continue;
2106
+ for (const key of ['width', 'height']) {
2107
+ const value = camera[key];
2108
+ const path = ['cameras', slug, key];
2109
+ if (typeof value !== 'number' || !Number.isInteger(value) || value % 2 === 0)
2110
+ continue;
2111
+ if (ctx.issues.some((issue) => samePath(issue.path ?? [], path)))
2112
+ continue;
2113
+ ctx.addIssue({ code: 'custom', path, message: oddSizeMessage(encoder, key, value) });
2114
+ }
2115
+ }
2116
+ }
2046
2117
  /**
2047
2118
  * The format version of a `fleetless.yaml`. Deliberately not called
2048
2119
  * `version`: the console counts published states with "v12 → v13", and two
@@ -2194,7 +2265,7 @@ export const robotConfigDoc = strictObject({
2194
2265
  body: { max_packet_bytes: LIVE_DEFAULTS.max_packet_bytes },
2195
2266
  }],
2196
2267
  }),
2197
- });
2268
+ }).superRefine(refuseOddSizes, { when: (payload) => isMapping(payload.value) });
2198
2269
  /**
2199
2270
  * One thing the cloud has to say about a configuration: the field, and the
2200
2271
  * rule it violates.
package/dist/index.d.ts CHANGED
@@ -68,6 +68,7 @@ export type { LegalDocumentReference, LegalTextReferences } from './legal.js';
68
68
  export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
69
69
  export type { LegalAcceptanceListQuery, LegalAcceptanceVersionRow, LegalAcceptanceListResponse } from './legal-acceptances.js';
70
70
  export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, hostedLogoShape, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
71
+ export { DEFAULT_MAIL_HTML } from './app-mail-html.js';
71
72
  export type { AppUserStatus, AppUser, AppUserListResponse, CreateAppUserRequest, PatchAppUserRequest, CreateAppInvitationRequest, AppInvitation, PendingAppInvitation, AppInvitationListResponse, AppOidcProvider, AppOidcProviderListResponse, CreateAppOidcProviderRequest, PatchAppOidcProviderRequest, AppAuthConfig, AppSignInMethods, AppTwoFactorPolicy, AppHostedPages, HostedLogoShape, PutAppAuthRegistrationRequest, PutAppAuthSignInRequest, PutAppAuthUrlsRequest, PutAppAuthMcpRequest, PutAppAuthLookRequest, MailTemplateKind, AppMailTemplate, AppMailTemplateListResponse, PutAppMailTemplateRequest, MailTemplatePreviewRequest, MailTemplatePreviewResponse, MailTemplateProblemDetails, MailOutcome, } from './app-users.js';
72
73
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
73
74
  export type { AssetKind, Asset, UrdfCompleteness, AssetListResponse, AssetsClearResponse, MissingAssetQuery, AssetSyncRequest, AssetSyncResponse, AssetSyncState, AssetSyncStatus, AssetFailure, AssetFailureKind, AssetStoreRefusedDetails, AssetSyncBusyDetails, } from './assets.js';
package/dist/index.js CHANGED
@@ -67,6 +67,7 @@ export { httpsLegalUrl, legalDocumentReference, legalTextReferences, TERMS_VERSI
67
67
  export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
68
68
  // The per-app identity space.
69
69
  export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, hostedLogoShape, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
70
+ export { DEFAULT_MAIL_HTML } from './app-mail-html.js';
70
71
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
71
72
  export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS, COLLECTION_AUDIT_ACTIONS } from './audit.js';
72
73
  export { alertRowCondition, alertSeverity, alertState, datapointAlertRow, alertListResponse, orgFiringAlertsResponse, orgAlertsQuery, datapointDisplay, putDatapointDisplayRequest, } from './alerts.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "15.3.0",
3
+ "version": "15.5.0-next.1",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",