@skyvexsoftware/stratos-sdk 0.19.0 → 0.19.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.
@@ -2,9 +2,10 @@ import type { PluginFileAttachment } from "../types/context";
2
2
  /**
3
3
  * Mark a file on disk for attachment to the PIREP.
4
4
  *
5
- * Pure: it touches no filesystem and never throws. Whether the file exists and
6
- * can be read is resolved when the submission is built, where a failure is
7
- * already handled without costing the pilot their flight.
5
+ * This only records the path. It doesn't open or read the file, so it never
6
+ * throws and never slows the handler. Stratos reads the file later, when the
7
+ * PIREP is sent, streaming it from disk. A file that can't be read at that
8
+ * point is skipped with the reason recorded, and the flight still files.
8
9
  *
9
10
  * @example
10
11
  * ```ts
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * Mark a file on disk for attachment to the PIREP.
3
3
  *
4
- * Pure: it touches no filesystem and never throws. Whether the file exists and
5
- * can be read is resolved when the submission is built, where a failure is
6
- * already handled without costing the pilot their flight.
4
+ * This only records the path. It doesn't open or read the file, so it never
5
+ * throws and never slows the handler. Stratos reads the file later, when the
6
+ * PIREP is sent, streaming it from disk. A file that can't be read at that
7
+ * point is skipped with the reason recorded, and the flight still files.
7
8
  *
8
9
  * @example
9
10
  * ```ts
@@ -170,8 +170,12 @@ export type PluginFlightAccessor = {
170
170
  * nothing.
171
171
  *
172
172
  * Handlers are fail-open: a throw, a rejection, a timeout (3s), a
173
- * non-object return, or a payload over 256 KB omits this plugin's key and
174
- * the PIREP is submitted regardless.
173
+ * non-object return, or returned data over the size cap omits this plugin's
174
+ * key and the PIREP is submitted regardless. The cap is 256 KB per plugin
175
+ * and 512 KB across all plugins, measured on the returned JSON. Files
176
+ * attached with `attachFile()` do not count towards it; each is only a
177
+ * short reference in the JSON and is sent as its own part, with no size
178
+ * limit.
175
179
  *
176
180
  * Handlers run only for `completed`, `diverted` and `crashed` flights, never
177
181
  * for cancelled ones, and only when an airline is bound. If the airline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvexsoftware/stratos-sdk",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Plugin SDK for Stratos — types, hooks, and UI components",
5
5
  "author": {
6
6
  "name": "Skyvex Software Pty Ltd",