@camstack/addon-terminal 0.1.16 → 0.1.18

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.
Files changed (3) hide show
  1. package/dist/addon.js +585 -43
  2. package/dist/addon.mjs +585 -43
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -7679,7 +7679,15 @@ var RecordingConfigSchema = object({
7679
7679
  * Each completed/failed run also lands one durable ops-log row on its owning
7680
7680
  * addon surface.
7681
7681
  */
7682
+ /**
7683
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7684
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7685
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7686
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7687
+ * runs at all.
7688
+ */
7682
7689
  var RelocateJobStateSchema = _enum([
7690
+ "queued",
7683
7691
  "running",
7684
7692
  "done",
7685
7693
  "failed",
@@ -7714,6 +7722,15 @@ var RelocateFootageInputSchema = object({
7714
7722
  /** Limits relocation to the logical profile class. Omit only for the
7715
7723
  * pre-orchestration compatibility path. */
7716
7724
  footageClass: RelocateFootageClassSchema.optional(),
7725
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7726
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7727
+ * unit is a (camera, profile) pile, not a disk. */
7728
+ deviceId: number().int().optional(),
7729
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7730
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7731
+ * placement plan assigns those two independently, so a rebalance that could
7732
+ * only say "recordings" would move footage the plan never asked to move. */
7733
+ profiles: array(string()).optional(),
7717
7734
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7718
7735
  * never allowed to starve live writers. */
7719
7736
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7849,6 +7866,21 @@ var StorageLocationSchema = object({
7849
7866
  nodeId: string().optional(),
7850
7867
  isDefault: boolean().default(false),
7851
7868
  isSystem: boolean().default(false),
7869
+ /**
7870
+ * Operator opt-in: whether consumers that BALANCE across several locations
7871
+ * of a type may write here. Recordings reads it today; event media and
7872
+ * backups are the next consumers, which is why the flag lives on the
7873
+ * location rather than in any one addon's store — nothing has to be
7874
+ * extended to add the next consumer.
7875
+ *
7876
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7877
+ * flag existed reads back with no flag and keeps working exactly as before;
7878
+ * that is the whole compat story, and it is why no migration ships with it.
7879
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7880
+ * disk must not silently start writing to it); the default of a type is
7881
+ * always stamped `true`.
7882
+ */
7883
+ enabled: boolean().optional(),
7852
7884
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7853
7885
  * for node-local locations it can reach) — never persisted, absent when the
7854
7886
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12346,7 +12378,8 @@ method(object({
12346
12378
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12347
12379
  /**
12348
12380
  * filesystem-browse — per-node capability for browsing the node's local
12349
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12381
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12382
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12350
12383
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12351
12384
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12352
12385
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -14187,6 +14220,13 @@ var MaskGridDimsSchema = object({
14187
14220
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
14188
14221
  * this one field keeps the schema additive — a rule still declares exactly
14189
14222
  * one trigger.
14223
+ *
14224
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14225
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14226
+ * mirror.ts` fails the build on a member the app cannot render) and every
14227
+ * member costs a release train. A sustained-sound rule is therefore an
14228
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14229
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
14190
14230
  */
14191
14231
  var NcDeliverySchema = _enum([
14192
14232
  "immediate",
@@ -14201,15 +14241,32 @@ var NcDeliverySchema = _enum([
14201
14241
  * depend on a provider's raw event name or payload shape.
14202
14242
  */
14203
14243
  var NcSystemEventKindSchema = _enum([
14204
- "camera-online",
14205
- "camera-offline",
14244
+ "device-online",
14245
+ "device-offline",
14246
+ "device-disabled",
14247
+ "device-enabled",
14206
14248
  "stream-online",
14207
14249
  "stream-offline",
14208
14250
  "node-online",
14209
14251
  "node-offline",
14210
14252
  "addon-update-available",
14211
- "server-update-available"
14253
+ "server-update-available",
14254
+ "alarm-triggered",
14255
+ "alarm-armed",
14256
+ "alarm-disarmed",
14257
+ "camera-online",
14258
+ "camera-offline",
14259
+ "camera-disabled",
14260
+ "camera-enabled"
14261
+ ]);
14262
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14263
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14264
+ "camera-online",
14265
+ "camera-offline",
14266
+ "camera-disabled",
14267
+ "camera-enabled"
14212
14268
  ]);
14269
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
14213
14270
  /**
14214
14271
  * One coherent system-event condition. `kinds` is the required opt-in safety
14215
14272
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -14218,6 +14275,18 @@ var NcSystemEventKindSchema = _enum([
14218
14275
  var NcSystemEventConditionSchema = object({
14219
14276
  kinds: array(NcSystemEventKindSchema).min(1),
14220
14277
  deviceIds: array(number().int()).min(1).optional(),
14278
+ /**
14279
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14280
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14281
+ * is what a liveness rule means when nobody said otherwise.
14282
+ *
14283
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14284
+ * one reason: the intake cannot know which devices this household cares
14285
+ * about, and a producer-side filter is one no operator can change. Fails
14286
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14287
+ * does not carry) matches no `deviceTypes` list.
14288
+ */
14289
+ deviceTypes: array(string().min(1)).min(1).optional(),
14221
14290
  nodeIds: array(string().min(1)).min(1).optional(),
14222
14291
  packageNames: array(string().min(1)).min(1).optional()
14223
14292
  });
@@ -14268,6 +14337,47 @@ var NcOccupancyConditionSchema = object({
14268
14337
  sustainSeconds: number().int().min(0).max(3600).default(15)
14269
14338
  });
14270
14339
  /**
14340
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14341
+ *
14342
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14343
+ * reference notifier uses, so an operator moving between them re-uses what
14344
+ * they already know): a rule matches when, over a sampling window of
14345
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14346
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14347
+ *
14348
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14349
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14350
+ * - `labels` — the classifier put at least one of these labels on it.
14351
+ *
14352
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14353
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14354
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14355
+ * is given** — a window in which every sample is trivially a hit would fire on
14356
+ * silence, so the engine refuses such a condition rather than notifying on
14357
+ * nothing (the schema cannot express "at least one of" without becoming a
14358
+ * ZodEffects the cap path would have to special-case).
14359
+ *
14360
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14361
+ * must be FULL before it can match — a window that has been open for two
14362
+ * seconds of its ten is 100% of nothing, and firing on it would make
14363
+ * `samplingSeconds` decorative.
14364
+ *
14365
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14366
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14367
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14368
+ * an operator who typed `dog` mean the same thing.
14369
+ */
14370
+ var NcAudioConditionSchema = object({
14371
+ /** Audio macro labels; absent = any sound (level-only rule). */
14372
+ labels: array(string().min(1)).min(1).optional(),
14373
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14374
+ dbThreshold: number().min(-96).max(0).optional(),
14375
+ /** Percentage of the window's samples that must be hits (1–100). */
14376
+ hitPercent: number().int().min(1).max(100).default(60),
14377
+ /** Length of the sampling window in seconds. */
14378
+ samplingSeconds: number().int().min(1).max(300).default(10)
14379
+ });
14380
+ /**
14271
14381
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14272
14382
  *
14273
14383
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14540,7 +14650,33 @@ var NcConditionsSchema = object({
14540
14650
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14541
14651
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14542
14652
  */
14543
- occupancy: NcOccupancyConditionSchema.optional()
14653
+ occupancy: NcOccupancyConditionSchema.optional(),
14654
+ /**
14655
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14656
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14657
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14658
+ * a window that is not full yet, neither filter given). See
14659
+ * {@link NcAudioCondition}.
14660
+ *
14661
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14662
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14663
+ * a detection, a track or a device event (the same fail-closed pairing
14664
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14665
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14666
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14667
+ * classified sample) stays exactly as it was for rules that already use it.
14668
+ *
14669
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14670
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14671
+ * (`camstack/src/data/notification-center.ts`, guarded by
14672
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14673
+ * condition fields it does not know when a rule is saved from the phone.
14674
+ * Publishing an editor for a condition the app cannot round-trip is how an
14675
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14676
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14677
+ * does an audio rule become authorable.
14678
+ */
14679
+ audio: NcAudioConditionSchema.optional()
14544
14680
  });
14545
14681
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14546
14682
  var NcRuleTargetSchema = object({
@@ -14654,6 +14790,73 @@ var NcThrottleSchema = object({
14654
14790
  */
14655
14791
  granularity: NcThrottleGranularitySchema.optional()
14656
14792
  });
14793
+ /**
14794
+ * How long the confirm gate may hold ONE notification, and how big the picture
14795
+ * it judges may be.
14796
+ *
14797
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14798
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14799
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14800
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14801
+ * tokens for pixels the model pools away.
14802
+ */
14803
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14804
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14805
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14806
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14807
+ var NcConfirmExpectSchema = object({
14808
+ op: _enum([
14809
+ ">=",
14810
+ ">",
14811
+ "<=",
14812
+ "<",
14813
+ "=="
14814
+ ]),
14815
+ count: number().int().min(0).max(1e3)
14816
+ });
14817
+ /**
14818
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14819
+ * to ship and says whether it agrees with the rule.
14820
+ *
14821
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14822
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14823
+ * on the operator's phone is not a verdict about this notification.
14824
+ *
14825
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14826
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14827
+ * the default and every fail-open is COUNTED, because a gate that always fails
14828
+ * open looks in the log exactly like a gate that works.
14829
+ *
14830
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14831
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14832
+ * production failures in one day), so the gate reads absent as the constant
14833
+ * above rather than trusting a parse it may never have seen.
14834
+ */
14835
+ var NcConfirmSchema = object({
14836
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14837
+ * same thing, and both mean "deliver exactly as before". */
14838
+ enabled: boolean().default(false),
14839
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14840
+ profileId: string().optional(),
14841
+ /**
14842
+ * The operator's question, in his own words. Absent = a question derived
14843
+ * from the rule (its class and its expectation).
14844
+ *
14845
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14846
+ * banners, signage and plates as instructions if you let them reach the
14847
+ * prompt — proven live — so the authoritative contract stays in the system
14848
+ * turn and only rule-authored words land here.
14849
+ */
14850
+ prompt: string().max(1e3).optional(),
14851
+ /** Fire only when the model's count satisfies this. Absent = the model's
14852
+ * own boolean verdict decides. */
14853
+ expect: NcConfirmExpectSchema.optional(),
14854
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14855
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14856
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14857
+ /** Longest edge the judged image is downscaled to before it is sent. */
14858
+ maxImagePx: number().int().min(64).max(2048).default(448)
14859
+ });
14657
14860
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14658
14861
  var NcRuleInputSchema = object({
14659
14862
  name: string().min(1).max(200),
@@ -14714,7 +14917,13 @@ var NcRuleInputSchema = object({
14714
14917
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14715
14918
  * shape as every other actuation.
14716
14919
  */
14717
- actions: NcRuleActionsSchema.optional()
14920
+ actions: NcRuleActionsSchema.optional(),
14921
+ /**
14922
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14923
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14924
+ * did, and absent is the only way to say that without a migration.
14925
+ */
14926
+ confirm: NcConfirmSchema.optional()
14718
14927
  });
14719
14928
  /**
14720
14929
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14725,7 +14934,37 @@ var NcRuleInputSchema = object({
14725
14934
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14726
14935
  * `updateRule` patch.
14727
14936
  */
14728
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14937
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14938
+ disabledTargetIds: array(string()).optional(),
14939
+ /**
14940
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14941
+ *
14942
+ * It makes the key optional to SUPPLY; the parse still materialises the
14943
+ * default when the key is absent. And `NcRuleStore.update` merges with
14944
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14945
+ * one — which made every partial edit destructive:
14946
+ *
14947
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14948
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14949
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14950
+ *
14951
+ * A rule scoped to one camera and one zone silently became a rule that
14952
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14953
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14954
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14955
+ * within a minute of a two-field patch.
14956
+ *
14957
+ * So every defaulted field is re-declared here WITHOUT its default. The
14958
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14959
+ * conditions remains a real instruction ("clear them") — and only the
14960
+ * absent key is now genuinely absent.
14961
+ */
14962
+ enabled: boolean().optional(),
14963
+ conditions: NcConditionsSchema.optional(),
14964
+ media: NcMediaPolicySchema.optional(),
14965
+ throttle: NcThrottleSchema.optional(),
14966
+ priority: number().int().min(1).max(5).optional()
14967
+ });
14729
14968
  /** A persisted rule. */
14730
14969
  var NcRuleSchema = NcRuleInputSchema.extend({
14731
14970
  id: string(),
@@ -15026,6 +15265,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
15026
15265
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
15027
15266
  * copy would lie the first time a rule is disabled.
15028
15267
  */
15268
+ /**
15269
+ * Why a device a mode NAMES is nonetheless not armed by it.
15270
+ *
15271
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15272
+ * per-camera notification switch the Notification Center already owns,
15273
+ * `detection-off` is the device's own detection binding being inactive, and
15274
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15275
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15276
+ * with the switches the operator actually used.
15277
+ */
15278
+ var NcAlarmSkipReasonSchema = _enum([
15279
+ "muted",
15280
+ "detection-off",
15281
+ "offline"
15282
+ ]);
15283
+ var NcAlarmSkippedDeviceSchema = object({
15284
+ deviceId: number().int(),
15285
+ reason: NcAlarmSkipReasonSchema
15286
+ });
15029
15287
  var NcAlarmModeCoverageSchema = object({
15030
15288
  mode: AlarmArmModeSchema,
15031
15289
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -15033,7 +15291,18 @@ var NcAlarmModeCoverageSchema = object({
15033
15291
  /** At least one covering rule has no device scope, so the mode covers all. */
15034
15292
  allDevices: boolean(),
15035
15293
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
15036
- deviceIds: array(number().int())
15294
+ deviceIds: array(number().int()),
15295
+ /**
15296
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15297
+ * excludes it.
15298
+ *
15299
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15300
+ * twelve makes it false in exactly the way nobody notices until an incident.
15301
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15302
+ * still parses as "nothing known to be skipped" rather than failing the whole
15303
+ * alarm tab.
15304
+ */
15305
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
15037
15306
  });
15038
15307
  var NcAlarmConfigSchema = object({
15039
15308
  /**
@@ -24754,7 +25023,19 @@ var RecordingManifestSchema = object({
24754
25023
  * profiles/subtrees/locations on this node). */
24755
25024
  var RecordingDeviceUsageSchema = object({
24756
25025
  deviceId: number(),
24757
- usedBytes: number()
25026
+ usedBytes: number(),
25027
+ /**
25028
+ * Start of this camera's OLDEST indexed segment, across every profile and
25029
+ * location — the "Oldest footage" column in Recordings → Storage, and the
25030
+ * only honest answer to "is retention actually holding?" per camera.
25031
+ *
25032
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
25033
+ * predates this field omits it entirely, and a hub whose types carry the
25034
+ * field must keep validating that older provider's payload: the framework
25035
+ * (types) and the addon ship on different trains, and the addon is usually
25036
+ * the later of the two.
25037
+ */
25038
+ oldestMs: number().nullable().optional()
24758
25039
  });
24759
25040
  /** Recording storage usage + capacity for one storage location. */
24760
25041
  var RecordingLocationUsageSchema = object({
@@ -24782,6 +25063,57 @@ var RecordingStorageUsageSchema = object({
24782
25063
  locations: array(RecordingLocationUsageSchema)
24783
25064
  });
24784
25065
  /**
25066
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
25067
+ *
25068
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
25069
+ * is the operator asking for the EXISTING archive to be brought into line with
25070
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
25071
+ * location, run FIFO behind the single-flight mover.
25072
+ *
25073
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
25074
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
25075
+ * (empty on the plan).
25076
+ */
25077
+ var RecordingRebalanceMoveSchema = object({
25078
+ deviceId: number(),
25079
+ profile: string(),
25080
+ fromLocationId: string(),
25081
+ toLocationId: string(),
25082
+ bytes: number(),
25083
+ files: number().int()
25084
+ });
25085
+ /** Why a pile that is out of place is staying there. Every refusal is
25086
+ * reported: a rebalance that silently drops a camera reads exactly like one
25087
+ * that had nothing to do. */
25088
+ var RecordingRebalanceSkipReasonSchema = _enum([
25089
+ "unassigned",
25090
+ "target-not-writable",
25091
+ "below-threshold",
25092
+ "no-headroom"
25093
+ ]);
25094
+ var RecordingRebalanceSkipSchema = object({
25095
+ deviceId: number(),
25096
+ profile: string(),
25097
+ fromLocationId: string(),
25098
+ /** The location the plan wants; null when the camera has no assignment. */
25099
+ toLocationId: string().nullable(),
25100
+ bytes: number(),
25101
+ reason: RecordingRebalanceSkipReasonSchema
25102
+ });
25103
+ var RecordingRebalancePlanSchema = object({
25104
+ moves: array(RecordingRebalanceMoveSchema),
25105
+ skipped: array(RecordingRebalanceSkipSchema),
25106
+ bytesToMove: number(),
25107
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
25108
+ jobIds: array(string())
25109
+ });
25110
+ var RecordingRebalanceInputSchema = object({
25111
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
25112
+ throttleMbps: number().min(1).max(1e3).optional(),
25113
+ /** Ignore piles smaller than this (default 1 GB). */
25114
+ minMoveGb: number().min(0).optional()
25115
+ });
25116
+ /**
24785
25117
  * Result of locating footage at a wall-clock instant for one device/profile.
24786
25118
  * `segment` carries the covering segment's window; `gap` reports the forward
24787
25119
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -24944,9 +25276,24 @@ method(object({
24944
25276
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24945
25277
  kind: "mutation",
24946
25278
  auth: "admin"
25279
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
25280
+ kind: "mutation",
25281
+ auth: "admin"
25282
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
25283
+ kind: "query",
25284
+ auth: "admin"
25285
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25286
+ kind: "mutation",
25287
+ auth: "admin"
25288
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25289
+ kind: "query",
25290
+ auth: "admin"
25291
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25292
+ kind: "mutation",
25293
+ auth: "admin"
24947
25294
  });
24948
25295
  /**
24949
- * `recordingExport` cap — render a footage time range into a single downloadable
25296
+ * `recording-export` cap — render a footage time range into a single downloadable
24950
25297
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
24951
25298
  * bounded lifetime with a durable history, auto-expiry, and optional
24952
25299
  * delete-after-download.
@@ -24962,13 +25309,24 @@ method(object({
24962
25309
  /** Playback-speed multiplier for the render (1 = realtime). */
24963
25310
  var ExportSpeedSchema = number().min(.25).max(32);
24964
25311
  /**
24965
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25312
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25313
+ *
25314
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
25315
+ * derives these bounds from things that happened at a TIME (a track's
25316
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25317
+ * every segment present for the range, with each recording GAP removed. The
25318
+ * two agree only on a window that recorded without one interruption, and only
25319
+ * the render side knows the segments, so the translation lives there
25320
+ * (`export-dense-map.ts`, addon-pipeline).
25321
+ *
25322
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25323
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25324
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25325
+ * the video was a uniform timelapse, and the log line reported the five ranges
25326
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
24966
25327
  *
24967
- * Relative and not absolute epoch on purpose: the renderer's frame-select
24968
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
24969
- * playlist. Handing it absolute epochs would make every call site responsible
24970
- * for the same subtraction, and the one that forgot would emit a filter that
24971
- * selects nothing — silently, as a uniform timelapse.
25328
+ * Relative and not absolute epoch, because an absolute epoch would make every
25329
+ * call site responsible for the same subtraction.
24972
25330
  */
24973
25331
  var ExportDenseRangeSchema = object({
24974
25332
  fromSec: number().nonnegative(),
@@ -31783,6 +32141,12 @@ Object.freeze({
31783
32141
  addonId: null,
31784
32142
  access: "create"
31785
32143
  },
32144
+ "recording.cancelRelocateJob": {
32145
+ capName: "recording",
32146
+ capScope: "system",
32147
+ addonId: null,
32148
+ access: "create"
32149
+ },
31786
32150
  "recording.cancelStorageMigrationMove": {
31787
32151
  capName: "recording",
31788
32152
  capScope: "system",
@@ -31837,6 +32201,12 @@ Object.freeze({
31837
32201
  addonId: null,
31838
32202
  access: "view"
31839
32203
  },
32204
+ "recording.listRelocateJobs": {
32205
+ capName: "recording",
32206
+ capScope: "system",
32207
+ addonId: null,
32208
+ access: "view"
32209
+ },
31840
32210
  "recording.locateSegment": {
31841
32211
  capName: "recording",
31842
32212
  capScope: "system",
@@ -31849,6 +32219,12 @@ Object.freeze({
31849
32219
  addonId: null,
31850
32220
  access: "create"
31851
32221
  },
32222
+ "recording.planStorageRebalance": {
32223
+ capName: "recording",
32224
+ capScope: "system",
32225
+ addonId: null,
32226
+ access: "view"
32227
+ },
31852
32228
  "recording.pruneFootage": {
31853
32229
  capName: "recording",
31854
32230
  capScope: "system",
@@ -31873,6 +32249,12 @@ Object.freeze({
31873
32249
  addonId: null,
31874
32250
  access: "create"
31875
32251
  },
32252
+ "recording.relocateFootage": {
32253
+ capName: "recording",
32254
+ capScope: "system",
32255
+ addonId: null,
32256
+ access: "create"
32257
+ },
31876
32258
  "recording.renderClip": {
31877
32259
  capName: "recording",
31878
32260
  capScope: "system",
@@ -31909,44 +32291,50 @@ Object.freeze({
31909
32291
  addonId: null,
31910
32292
  access: "create"
31911
32293
  },
32294
+ "recording.startStorageRebalance": {
32295
+ capName: "recording",
32296
+ capScope: "system",
32297
+ addonId: null,
32298
+ access: "create"
32299
+ },
31912
32300
  "recordingExport.cancelExport": {
31913
- capName: "recordingExport",
32301
+ capName: "recording-export",
31914
32302
  capScope: "system",
31915
32303
  addonId: null,
31916
32304
  access: "create"
31917
32305
  },
31918
32306
  "recordingExport.createExport": {
31919
- capName: "recordingExport",
32307
+ capName: "recording-export",
31920
32308
  capScope: "system",
31921
32309
  addonId: null,
31922
32310
  access: "create"
31923
32311
  },
31924
32312
  "recordingExport.deleteExport": {
31925
- capName: "recordingExport",
32313
+ capName: "recording-export",
31926
32314
  capScope: "system",
31927
32315
  addonId: null,
31928
32316
  access: "delete"
31929
32317
  },
31930
32318
  "recordingExport.getDownloadUrl": {
31931
- capName: "recordingExport",
32319
+ capName: "recording-export",
31932
32320
  capScope: "system",
31933
32321
  addonId: null,
31934
32322
  access: "view"
31935
32323
  },
31936
32324
  "recordingExport.getExport": {
31937
- capName: "recordingExport",
32325
+ capName: "recording-export",
31938
32326
  capScope: "system",
31939
32327
  addonId: null,
31940
32328
  access: "view"
31941
32329
  },
31942
32330
  "recordingExport.listExports": {
31943
- capName: "recordingExport",
32331
+ capName: "recording-export",
31944
32332
  capScope: "system",
31945
32333
  addonId: null,
31946
32334
  access: "view"
31947
32335
  },
31948
32336
  "recordingExport.readExportBytes": {
31949
- capName: "recordingExport",
32337
+ capName: "recording-export",
31950
32338
  capScope: "system",
31951
32339
  addonId: null,
31952
32340
  access: "view"
@@ -33323,6 +33711,104 @@ var FramerateField = number().int().min(1).max(60);
33323
33711
  var TargetsField = array(NcRuleTargetSchema).min(1);
33324
33712
  var PriorityField = number().int().min(1).max(5);
33325
33713
  /**
33714
+ * Explicit override of the DENSE sampling cadence, seconds.
33715
+ *
33716
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
33717
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
33718
+ * made that same base 3 s and rendered a person pass as two frames.)
33719
+ *
33720
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
33721
+ * `denseCadenceSec` and played at `framerate` occupies
33722
+ *
33723
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
33724
+ *
33725
+ * so a 7 s pass at 1 s / 12 fps is 0.58 s of video, and at 0.5 s it is 1.17 s.
33726
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
33727
+ * and therefore the length of a quiet night, does not move.
33728
+ *
33729
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
33730
+ * the recording has them returns the same frames, requested twice. Must be
33731
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
33732
+ * a uniform video the operator believes is two-rate — and upsert refuses it
33733
+ * rather than letting the export cap reject the render hours after the window.
33734
+ */
33735
+ var DenseCadenceSecField = number().min(.1).max(3600);
33736
+ /**
33737
+ * Minimum seconds of OUTPUT video each detection range must occupy.
33738
+ *
33739
+ * The operator-facing form of the arithmetic above: instead of solving for a
33740
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
33741
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
33742
+ * that range every ~583 ms.
33743
+ *
33744
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
33745
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
33746
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
33747
+ * ranges are sampled denser than they need. Per-range cadences require a cap
33748
+ * schema change and are the tracked follow-up.
33749
+ *
33750
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
33751
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
33752
+ * by real footage, never met by duplicating frames into motion that never
33753
+ * happened.
33754
+ */
33755
+ var MinDwellSecField = number().min(0).max(60);
33756
+ /**
33757
+ * Caption burned into the notification's preview frame.
33758
+ *
33759
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
33760
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
33761
+ * templating dialect for one field would be a second thing to explain.
33762
+ *
33763
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
33764
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
33765
+ * the reason this is not `.min(1)`.
33766
+ */
33767
+ var PreviewTextField = string().max(200);
33768
+ /**
33769
+ * Whether the notification's preview is a STILL or a short animation.
33770
+ *
33771
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
33772
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
33773
+ * night reads better as three seconds of motion than as one frame of it. Both
33774
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
33775
+ * simply applies it to a dozen frames sampled across the render and assembles
33776
+ * them.
33777
+ *
33778
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
33779
+ * seeks and a palette pass, and no rule that never asked for one should start
33780
+ * paying that on the deploy that shipped it.
33781
+ *
33782
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
33783
+ */
33784
+ var PreviewModeField = _enum(["image", "gif"]);
33785
+ /**
33786
+ * Which detection classes the notification reports counts for.
33787
+ *
33788
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
33789
+ * plan — no second query — aggregated per class. Absent or empty means "every
33790
+ * class the window actually contained", which is what an operator who never
33791
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
33792
+ * counts cars all night).
33793
+ *
33794
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
33795
+ * …). An unknown name simply never matches and reports nothing — it is not an
33796
+ * error, because a rule may legitimately name a class this camera's model does
33797
+ * not emit.
33798
+ *
33799
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
33800
+ * - `{{detections}}` — total over the reported classes
33801
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
33802
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
33803
+ * one per class, `count_` + the class name
33804
+ *
33805
+ * With NO custom body template the summary is appended to the derived body, and
33806
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
33807
+ * reads. With a custom template the operator owns every word — nothing is
33808
+ * appended, so `{{detectionSummary}}` is how he asks for it.
33809
+ */
33810
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
33811
+ /**
33326
33812
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
33327
33813
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
33328
33814
  * here (see the ownership note above).
@@ -33342,9 +33828,30 @@ var TimelapseRuleInputSchema = object({
33342
33828
  cadenceSec: CadenceSecField.default(15),
33343
33829
  /** Output frames per second of the assembled mp4 (predecessor parity). */
33344
33830
  framerate: FramerateField.default(10),
33831
+ /**
33832
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
33833
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
33834
+ * field gets.
33835
+ */
33836
+ denseCadenceSec: DenseCadenceSecField.optional(),
33837
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
33838
+ minDwellSec: MinDwellSecField.optional(),
33345
33839
  /** `notification-output` targets the finished video/thumbnail is sent to. */
33346
33840
  targets: TargetsField,
33347
33841
  template: TimelapseTemplateSchema.optional(),
33842
+ /**
33843
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
33844
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
33845
+ *
33846
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
33847
+ * the notification's title/body, and clearing it (`template: null`) must not
33848
+ * silently clear the caption too.
33849
+ */
33850
+ previewText: PreviewTextField.optional(),
33851
+ /** Still or animation — see {@link PreviewModeField}. */
33852
+ previewMode: PreviewModeField.default("image"),
33853
+ /** Classes the notification counts — see {@link ReportClassesField}. */
33854
+ reportClasses: ReportClassesField.optional(),
33348
33855
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
33349
33856
  priority: PriorityField.default(3)
33350
33857
  });
@@ -33355,8 +33862,13 @@ object({
33355
33862
  schedule: NcScheduleSchema.optional(),
33356
33863
  cadenceSec: CadenceSecField.optional(),
33357
33864
  framerate: FramerateField.optional(),
33865
+ denseCadenceSec: DenseCadenceSecField.optional(),
33866
+ minDwellSec: MinDwellSecField.optional(),
33358
33867
  targets: TargetsField.optional(),
33359
33868
  template: TimelapseTemplateSchema.nullable().optional(),
33869
+ previewText: PreviewTextField.optional(),
33870
+ previewMode: PreviewModeField.optional(),
33871
+ reportClasses: ReportClassesField.optional(),
33360
33872
  priority: PriorityField.optional()
33361
33873
  });
33362
33874
  TimelapseRuleInputSchema.extend({
@@ -33440,25 +33952,32 @@ object({
33440
33952
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
33441
33953
  object({
33442
33954
  /**
33443
- * How long a retained native frame is served before it counts as a miss.
33955
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
33956
+ * detection result.
33957
+ *
33958
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
33959
+ * a time window was never related to the event the pixels were waiting for.
33960
+ * A held frame now lives from delivery until the runner has its `FrameResult`
33961
+ * — at which moment the runner cuts the subject tiles it actually wanted and
33962
+ * releases the frame. The bound exists only so a runner that stops answering
33963
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
33444
33964
  *
33445
- * Must cover the FULL late-crop horizon: detection inference + the
33446
- * cross-process inference-result hop to hub post-analysis + tracking + the
33447
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
33448
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
33449
- * RAM per busy camera grows linearly with no measured hit-rate gain.
33965
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
33966
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
33967
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
33968
+ * Raising it does not buy hit rate it buys tolerance for a slow runner, and
33969
+ * `holdOverflow` on the metrics line is what says you need it.
33450
33970
  */
33451
- ttlMs: number().int().min(250).max(1e4),
33971
+ holdFrames: number().int().min(1).max(64),
33452
33972
  /**
33453
33973
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
33454
33974
  *
33455
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
33456
- * which one is actually binding before reasoning from that. At the shipped
33457
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
33458
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
33459
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
33460
- * change that admits fewer frames buys retention WINDOW at constant RAM
33461
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
33975
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
33976
+ * is what decides how much is held, and the ceiling is the number above which
33977
+ * something is wrong. Before that it was the effective cap at 1024 MB with
33978
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
33979
+ * with the TTL expiring nothing, which is exactly the confusion the hold
33980
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
33462
33981
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
33463
33982
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
33464
33983
  * to replace).
@@ -33484,22 +34003,45 @@ object({
33484
34003
  * there is the signal that some caller names frames outside the inference set
33485
34004
  * and that this must go back to `all`.
33486
34005
  */
33487
- admission: NativeLeaseAdmissionSchema
34006
+ admission: NativeLeaseAdmissionSchema,
34007
+ /**
34008
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
34009
+ * compressed native crops the worker cuts at the moment a frame's detection
34010
+ * result arrives, and keeps long after the frame itself is freed.
34011
+ *
34012
+ * This is the knob that replaced the old retention window, and it buys about
34013
+ * three orders of magnitude more of it: a tile is one subject at native
34014
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
34015
+ * the frame it was cut from. A frame on which nothing was detected costs
34016
+ * nothing at all, which is the real change — the old lease paid per FRAME and
34017
+ * was interrogated per SUBJECT.
34018
+ *
34019
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
34020
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34021
+ * reproduce that.
34022
+ */
34023
+ tileBudgetMb: number().int().min(0).max(1024)
33488
34024
  });
33489
34025
  /**
33490
- * The values in force when the operator has set nothing — byte-for-byte the
33491
- * constants the decode worker shipped with as env-var defaults, so making these
33492
- * settings changed no behaviour on the day it landed.
34026
+ * The values in force when the operator has set nothing.
34027
+ *
34028
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
34029
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
34030
+ * in the same change that redefines it would make a regression and a retune
34031
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
34032
+ * live traffic.
33493
34033
  */
33494
34034
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
33495
- ttlMs: 1200,
34035
+ holdFrames: 8,
33496
34036
  budgetMb: 1024,
33497
34037
  activityMs: 15e3,
34038
+ tileBudgetMb: 64,
33498
34039
  admission: "inferred"
33499
34040
  };
33500
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
34041
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
33501
34042
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33502
34043
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34044
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33503
34045
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33504
34046
  //#endregion
33505
34047
  //#region src/curses-shim.ts