@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.mjs CHANGED
@@ -7656,7 +7656,15 @@ var RecordingConfigSchema = object({
7656
7656
  * Each completed/failed run also lands one durable ops-log row on its owning
7657
7657
  * addon surface.
7658
7658
  */
7659
+ /**
7660
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7661
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7662
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7663
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7664
+ * runs at all.
7665
+ */
7659
7666
  var RelocateJobStateSchema = _enum([
7667
+ "queued",
7660
7668
  "running",
7661
7669
  "done",
7662
7670
  "failed",
@@ -7691,6 +7699,15 @@ var RelocateFootageInputSchema = object({
7691
7699
  /** Limits relocation to the logical profile class. Omit only for the
7692
7700
  * pre-orchestration compatibility path. */
7693
7701
  footageClass: RelocateFootageClassSchema.optional(),
7702
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7703
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7704
+ * unit is a (camera, profile) pile, not a disk. */
7705
+ deviceId: number().int().optional(),
7706
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7707
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7708
+ * placement plan assigns those two independently, so a rebalance that could
7709
+ * only say "recordings" would move footage the plan never asked to move. */
7710
+ profiles: array(string()).optional(),
7694
7711
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7695
7712
  * never allowed to starve live writers. */
7696
7713
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7826,6 +7843,21 @@ var StorageLocationSchema = object({
7826
7843
  nodeId: string().optional(),
7827
7844
  isDefault: boolean().default(false),
7828
7845
  isSystem: boolean().default(false),
7846
+ /**
7847
+ * Operator opt-in: whether consumers that BALANCE across several locations
7848
+ * of a type may write here. Recordings reads it today; event media and
7849
+ * backups are the next consumers, which is why the flag lives on the
7850
+ * location rather than in any one addon's store — nothing has to be
7851
+ * extended to add the next consumer.
7852
+ *
7853
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7854
+ * flag existed reads back with no flag and keeps working exactly as before;
7855
+ * that is the whole compat story, and it is why no migration ships with it.
7856
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7857
+ * disk must not silently start writing to it); the default of a type is
7858
+ * always stamped `true`.
7859
+ */
7860
+ enabled: boolean().optional(),
7829
7861
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7830
7862
  * for node-local locations it can reach) — never persisted, absent when the
7831
7863
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12323,7 +12355,8 @@ method(object({
12323
12355
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12324
12356
  /**
12325
12357
  * filesystem-browse — per-node capability for browsing the node's local
12326
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12358
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12359
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12327
12360
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12328
12361
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12329
12362
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -14164,6 +14197,13 @@ var MaskGridDimsSchema = object({
14164
14197
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
14165
14198
  * this one field keeps the schema additive — a rule still declares exactly
14166
14199
  * one trigger.
14200
+ *
14201
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14202
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14203
+ * mirror.ts` fails the build on a member the app cannot render) and every
14204
+ * member costs a release train. A sustained-sound rule is therefore an
14205
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14206
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
14167
14207
  */
14168
14208
  var NcDeliverySchema = _enum([
14169
14209
  "immediate",
@@ -14178,15 +14218,32 @@ var NcDeliverySchema = _enum([
14178
14218
  * depend on a provider's raw event name or payload shape.
14179
14219
  */
14180
14220
  var NcSystemEventKindSchema = _enum([
14181
- "camera-online",
14182
- "camera-offline",
14221
+ "device-online",
14222
+ "device-offline",
14223
+ "device-disabled",
14224
+ "device-enabled",
14183
14225
  "stream-online",
14184
14226
  "stream-offline",
14185
14227
  "node-online",
14186
14228
  "node-offline",
14187
14229
  "addon-update-available",
14188
- "server-update-available"
14230
+ "server-update-available",
14231
+ "alarm-triggered",
14232
+ "alarm-armed",
14233
+ "alarm-disarmed",
14234
+ "camera-online",
14235
+ "camera-offline",
14236
+ "camera-disabled",
14237
+ "camera-enabled"
14238
+ ]);
14239
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14240
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14241
+ "camera-online",
14242
+ "camera-offline",
14243
+ "camera-disabled",
14244
+ "camera-enabled"
14189
14245
  ]);
14246
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
14190
14247
  /**
14191
14248
  * One coherent system-event condition. `kinds` is the required opt-in safety
14192
14249
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -14195,6 +14252,18 @@ var NcSystemEventKindSchema = _enum([
14195
14252
  var NcSystemEventConditionSchema = object({
14196
14253
  kinds: array(NcSystemEventKindSchema).min(1),
14197
14254
  deviceIds: array(number().int()).min(1).optional(),
14255
+ /**
14256
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14257
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14258
+ * is what a liveness rule means when nobody said otherwise.
14259
+ *
14260
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14261
+ * one reason: the intake cannot know which devices this household cares
14262
+ * about, and a producer-side filter is one no operator can change. Fails
14263
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14264
+ * does not carry) matches no `deviceTypes` list.
14265
+ */
14266
+ deviceTypes: array(string().min(1)).min(1).optional(),
14198
14267
  nodeIds: array(string().min(1)).min(1).optional(),
14199
14268
  packageNames: array(string().min(1)).min(1).optional()
14200
14269
  });
@@ -14245,6 +14314,47 @@ var NcOccupancyConditionSchema = object({
14245
14314
  sustainSeconds: number().int().min(0).max(3600).default(15)
14246
14315
  });
14247
14316
  /**
14317
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14318
+ *
14319
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14320
+ * reference notifier uses, so an operator moving between them re-uses what
14321
+ * they already know): a rule matches when, over a sampling window of
14322
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14323
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14324
+ *
14325
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14326
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14327
+ * - `labels` — the classifier put at least one of these labels on it.
14328
+ *
14329
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14330
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14331
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14332
+ * is given** — a window in which every sample is trivially a hit would fire on
14333
+ * silence, so the engine refuses such a condition rather than notifying on
14334
+ * nothing (the schema cannot express "at least one of" without becoming a
14335
+ * ZodEffects the cap path would have to special-case).
14336
+ *
14337
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14338
+ * must be FULL before it can match — a window that has been open for two
14339
+ * seconds of its ten is 100% of nothing, and firing on it would make
14340
+ * `samplingSeconds` decorative.
14341
+ *
14342
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14343
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14344
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14345
+ * an operator who typed `dog` mean the same thing.
14346
+ */
14347
+ var NcAudioConditionSchema = object({
14348
+ /** Audio macro labels; absent = any sound (level-only rule). */
14349
+ labels: array(string().min(1)).min(1).optional(),
14350
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14351
+ dbThreshold: number().min(-96).max(0).optional(),
14352
+ /** Percentage of the window's samples that must be hits (1–100). */
14353
+ hitPercent: number().int().min(1).max(100).default(60),
14354
+ /** Length of the sampling window in seconds. */
14355
+ samplingSeconds: number().int().min(1).max(300).default(10)
14356
+ });
14357
+ /**
14248
14358
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14249
14359
  *
14250
14360
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14517,7 +14627,33 @@ var NcConditionsSchema = object({
14517
14627
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14518
14628
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14519
14629
  */
14520
- occupancy: NcOccupancyConditionSchema.optional()
14630
+ occupancy: NcOccupancyConditionSchema.optional(),
14631
+ /**
14632
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14633
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14634
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14635
+ * a window that is not full yet, neither filter given). See
14636
+ * {@link NcAudioCondition}.
14637
+ *
14638
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14639
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14640
+ * a detection, a track or a device event (the same fail-closed pairing
14641
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14642
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14643
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14644
+ * classified sample) stays exactly as it was for rules that already use it.
14645
+ *
14646
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14647
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14648
+ * (`camstack/src/data/notification-center.ts`, guarded by
14649
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14650
+ * condition fields it does not know when a rule is saved from the phone.
14651
+ * Publishing an editor for a condition the app cannot round-trip is how an
14652
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14653
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14654
+ * does an audio rule become authorable.
14655
+ */
14656
+ audio: NcAudioConditionSchema.optional()
14521
14657
  });
14522
14658
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14523
14659
  var NcRuleTargetSchema = object({
@@ -14631,6 +14767,73 @@ var NcThrottleSchema = object({
14631
14767
  */
14632
14768
  granularity: NcThrottleGranularitySchema.optional()
14633
14769
  });
14770
+ /**
14771
+ * How long the confirm gate may hold ONE notification, and how big the picture
14772
+ * it judges may be.
14773
+ *
14774
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14775
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14776
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14777
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14778
+ * tokens for pixels the model pools away.
14779
+ */
14780
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14781
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14782
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14783
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14784
+ var NcConfirmExpectSchema = object({
14785
+ op: _enum([
14786
+ ">=",
14787
+ ">",
14788
+ "<=",
14789
+ "<",
14790
+ "=="
14791
+ ]),
14792
+ count: number().int().min(0).max(1e3)
14793
+ });
14794
+ /**
14795
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14796
+ * to ship and says whether it agrees with the rule.
14797
+ *
14798
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14799
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14800
+ * on the operator's phone is not a verdict about this notification.
14801
+ *
14802
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14803
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14804
+ * the default and every fail-open is COUNTED, because a gate that always fails
14805
+ * open looks in the log exactly like a gate that works.
14806
+ *
14807
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14808
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14809
+ * production failures in one day), so the gate reads absent as the constant
14810
+ * above rather than trusting a parse it may never have seen.
14811
+ */
14812
+ var NcConfirmSchema = object({
14813
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14814
+ * same thing, and both mean "deliver exactly as before". */
14815
+ enabled: boolean().default(false),
14816
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14817
+ profileId: string().optional(),
14818
+ /**
14819
+ * The operator's question, in his own words. Absent = a question derived
14820
+ * from the rule (its class and its expectation).
14821
+ *
14822
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14823
+ * banners, signage and plates as instructions if you let them reach the
14824
+ * prompt — proven live — so the authoritative contract stays in the system
14825
+ * turn and only rule-authored words land here.
14826
+ */
14827
+ prompt: string().max(1e3).optional(),
14828
+ /** Fire only when the model's count satisfies this. Absent = the model's
14829
+ * own boolean verdict decides. */
14830
+ expect: NcConfirmExpectSchema.optional(),
14831
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14832
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14833
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14834
+ /** Longest edge the judged image is downscaled to before it is sent. */
14835
+ maxImagePx: number().int().min(64).max(2048).default(448)
14836
+ });
14634
14837
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14635
14838
  var NcRuleInputSchema = object({
14636
14839
  name: string().min(1).max(200),
@@ -14691,7 +14894,13 @@ var NcRuleInputSchema = object({
14691
14894
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14692
14895
  * shape as every other actuation.
14693
14896
  */
14694
- actions: NcRuleActionsSchema.optional()
14897
+ actions: NcRuleActionsSchema.optional(),
14898
+ /**
14899
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14900
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14901
+ * did, and absent is the only way to say that without a migration.
14902
+ */
14903
+ confirm: NcConfirmSchema.optional()
14695
14904
  });
14696
14905
  /**
14697
14906
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14702,7 +14911,37 @@ var NcRuleInputSchema = object({
14702
14911
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14703
14912
  * `updateRule` patch.
14704
14913
  */
14705
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14914
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14915
+ disabledTargetIds: array(string()).optional(),
14916
+ /**
14917
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14918
+ *
14919
+ * It makes the key optional to SUPPLY; the parse still materialises the
14920
+ * default when the key is absent. And `NcRuleStore.update` merges with
14921
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14922
+ * one — which made every partial edit destructive:
14923
+ *
14924
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14925
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14926
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14927
+ *
14928
+ * A rule scoped to one camera and one zone silently became a rule that
14929
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14930
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14931
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14932
+ * within a minute of a two-field patch.
14933
+ *
14934
+ * So every defaulted field is re-declared here WITHOUT its default. The
14935
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14936
+ * conditions remains a real instruction ("clear them") — and only the
14937
+ * absent key is now genuinely absent.
14938
+ */
14939
+ enabled: boolean().optional(),
14940
+ conditions: NcConditionsSchema.optional(),
14941
+ media: NcMediaPolicySchema.optional(),
14942
+ throttle: NcThrottleSchema.optional(),
14943
+ priority: number().int().min(1).max(5).optional()
14944
+ });
14706
14945
  /** A persisted rule. */
14707
14946
  var NcRuleSchema = NcRuleInputSchema.extend({
14708
14947
  id: string(),
@@ -15003,6 +15242,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
15003
15242
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
15004
15243
  * copy would lie the first time a rule is disabled.
15005
15244
  */
15245
+ /**
15246
+ * Why a device a mode NAMES is nonetheless not armed by it.
15247
+ *
15248
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15249
+ * per-camera notification switch the Notification Center already owns,
15250
+ * `detection-off` is the device's own detection binding being inactive, and
15251
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15252
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15253
+ * with the switches the operator actually used.
15254
+ */
15255
+ var NcAlarmSkipReasonSchema = _enum([
15256
+ "muted",
15257
+ "detection-off",
15258
+ "offline"
15259
+ ]);
15260
+ var NcAlarmSkippedDeviceSchema = object({
15261
+ deviceId: number().int(),
15262
+ reason: NcAlarmSkipReasonSchema
15263
+ });
15006
15264
  var NcAlarmModeCoverageSchema = object({
15007
15265
  mode: AlarmArmModeSchema,
15008
15266
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -15010,7 +15268,18 @@ var NcAlarmModeCoverageSchema = object({
15010
15268
  /** At least one covering rule has no device scope, so the mode covers all. */
15011
15269
  allDevices: boolean(),
15012
15270
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
15013
- deviceIds: array(number().int())
15271
+ deviceIds: array(number().int()),
15272
+ /**
15273
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15274
+ * excludes it.
15275
+ *
15276
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15277
+ * twelve makes it false in exactly the way nobody notices until an incident.
15278
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15279
+ * still parses as "nothing known to be skipped" rather than failing the whole
15280
+ * alarm tab.
15281
+ */
15282
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
15014
15283
  });
15015
15284
  var NcAlarmConfigSchema = object({
15016
15285
  /**
@@ -24731,7 +25000,19 @@ var RecordingManifestSchema = object({
24731
25000
  * profiles/subtrees/locations on this node). */
24732
25001
  var RecordingDeviceUsageSchema = object({
24733
25002
  deviceId: number(),
24734
- usedBytes: number()
25003
+ usedBytes: number(),
25004
+ /**
25005
+ * Start of this camera's OLDEST indexed segment, across every profile and
25006
+ * location — the "Oldest footage" column in Recordings → Storage, and the
25007
+ * only honest answer to "is retention actually holding?" per camera.
25008
+ *
25009
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
25010
+ * predates this field omits it entirely, and a hub whose types carry the
25011
+ * field must keep validating that older provider's payload: the framework
25012
+ * (types) and the addon ship on different trains, and the addon is usually
25013
+ * the later of the two.
25014
+ */
25015
+ oldestMs: number().nullable().optional()
24735
25016
  });
24736
25017
  /** Recording storage usage + capacity for one storage location. */
24737
25018
  var RecordingLocationUsageSchema = object({
@@ -24759,6 +25040,57 @@ var RecordingStorageUsageSchema = object({
24759
25040
  locations: array(RecordingLocationUsageSchema)
24760
25041
  });
24761
25042
  /**
25043
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
25044
+ *
25045
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
25046
+ * is the operator asking for the EXISTING archive to be brought into line with
25047
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
25048
+ * location, run FIFO behind the single-flight mover.
25049
+ *
25050
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
25051
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
25052
+ * (empty on the plan).
25053
+ */
25054
+ var RecordingRebalanceMoveSchema = object({
25055
+ deviceId: number(),
25056
+ profile: string(),
25057
+ fromLocationId: string(),
25058
+ toLocationId: string(),
25059
+ bytes: number(),
25060
+ files: number().int()
25061
+ });
25062
+ /** Why a pile that is out of place is staying there. Every refusal is
25063
+ * reported: a rebalance that silently drops a camera reads exactly like one
25064
+ * that had nothing to do. */
25065
+ var RecordingRebalanceSkipReasonSchema = _enum([
25066
+ "unassigned",
25067
+ "target-not-writable",
25068
+ "below-threshold",
25069
+ "no-headroom"
25070
+ ]);
25071
+ var RecordingRebalanceSkipSchema = object({
25072
+ deviceId: number(),
25073
+ profile: string(),
25074
+ fromLocationId: string(),
25075
+ /** The location the plan wants; null when the camera has no assignment. */
25076
+ toLocationId: string().nullable(),
25077
+ bytes: number(),
25078
+ reason: RecordingRebalanceSkipReasonSchema
25079
+ });
25080
+ var RecordingRebalancePlanSchema = object({
25081
+ moves: array(RecordingRebalanceMoveSchema),
25082
+ skipped: array(RecordingRebalanceSkipSchema),
25083
+ bytesToMove: number(),
25084
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
25085
+ jobIds: array(string())
25086
+ });
25087
+ var RecordingRebalanceInputSchema = object({
25088
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
25089
+ throttleMbps: number().min(1).max(1e3).optional(),
25090
+ /** Ignore piles smaller than this (default 1 GB). */
25091
+ minMoveGb: number().min(0).optional()
25092
+ });
25093
+ /**
24762
25094
  * Result of locating footage at a wall-clock instant for one device/profile.
24763
25095
  * `segment` carries the covering segment's window; `gap` reports the forward
24764
25096
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -24921,9 +25253,24 @@ method(object({
24921
25253
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24922
25254
  kind: "mutation",
24923
25255
  auth: "admin"
25256
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
25257
+ kind: "mutation",
25258
+ auth: "admin"
25259
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
25260
+ kind: "query",
25261
+ auth: "admin"
25262
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25263
+ kind: "mutation",
25264
+ auth: "admin"
25265
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25266
+ kind: "query",
25267
+ auth: "admin"
25268
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25269
+ kind: "mutation",
25270
+ auth: "admin"
24924
25271
  });
24925
25272
  /**
24926
- * `recordingExport` cap — render a footage time range into a single downloadable
25273
+ * `recording-export` cap — render a footage time range into a single downloadable
24927
25274
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
24928
25275
  * bounded lifetime with a durable history, auto-expiry, and optional
24929
25276
  * delete-after-download.
@@ -24939,13 +25286,24 @@ method(object({
24939
25286
  /** Playback-speed multiplier for the render (1 = realtime). */
24940
25287
  var ExportSpeedSchema = number().min(.25).max(32);
24941
25288
  /**
24942
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25289
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25290
+ *
25291
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
25292
+ * derives these bounds from things that happened at a TIME (a track's
25293
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25294
+ * every segment present for the range, with each recording GAP removed. The
25295
+ * two agree only on a window that recorded without one interruption, and only
25296
+ * the render side knows the segments, so the translation lives there
25297
+ * (`export-dense-map.ts`, addon-pipeline).
25298
+ *
25299
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25300
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25301
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25302
+ * the video was a uniform timelapse, and the log line reported the five ranges
25303
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
24943
25304
  *
24944
- * Relative and not absolute epoch on purpose: the renderer's frame-select
24945
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
24946
- * playlist. Handing it absolute epochs would make every call site responsible
24947
- * for the same subtraction, and the one that forgot would emit a filter that
24948
- * selects nothing — silently, as a uniform timelapse.
25305
+ * Relative and not absolute epoch, because an absolute epoch would make every
25306
+ * call site responsible for the same subtraction.
24949
25307
  */
24950
25308
  var ExportDenseRangeSchema = object({
24951
25309
  fromSec: number().nonnegative(),
@@ -31760,6 +32118,12 @@ Object.freeze({
31760
32118
  addonId: null,
31761
32119
  access: "create"
31762
32120
  },
32121
+ "recording.cancelRelocateJob": {
32122
+ capName: "recording",
32123
+ capScope: "system",
32124
+ addonId: null,
32125
+ access: "create"
32126
+ },
31763
32127
  "recording.cancelStorageMigrationMove": {
31764
32128
  capName: "recording",
31765
32129
  capScope: "system",
@@ -31814,6 +32178,12 @@ Object.freeze({
31814
32178
  addonId: null,
31815
32179
  access: "view"
31816
32180
  },
32181
+ "recording.listRelocateJobs": {
32182
+ capName: "recording",
32183
+ capScope: "system",
32184
+ addonId: null,
32185
+ access: "view"
32186
+ },
31817
32187
  "recording.locateSegment": {
31818
32188
  capName: "recording",
31819
32189
  capScope: "system",
@@ -31826,6 +32196,12 @@ Object.freeze({
31826
32196
  addonId: null,
31827
32197
  access: "create"
31828
32198
  },
32199
+ "recording.planStorageRebalance": {
32200
+ capName: "recording",
32201
+ capScope: "system",
32202
+ addonId: null,
32203
+ access: "view"
32204
+ },
31829
32205
  "recording.pruneFootage": {
31830
32206
  capName: "recording",
31831
32207
  capScope: "system",
@@ -31850,6 +32226,12 @@ Object.freeze({
31850
32226
  addonId: null,
31851
32227
  access: "create"
31852
32228
  },
32229
+ "recording.relocateFootage": {
32230
+ capName: "recording",
32231
+ capScope: "system",
32232
+ addonId: null,
32233
+ access: "create"
32234
+ },
31853
32235
  "recording.renderClip": {
31854
32236
  capName: "recording",
31855
32237
  capScope: "system",
@@ -31886,44 +32268,50 @@ Object.freeze({
31886
32268
  addonId: null,
31887
32269
  access: "create"
31888
32270
  },
32271
+ "recording.startStorageRebalance": {
32272
+ capName: "recording",
32273
+ capScope: "system",
32274
+ addonId: null,
32275
+ access: "create"
32276
+ },
31889
32277
  "recordingExport.cancelExport": {
31890
- capName: "recordingExport",
32278
+ capName: "recording-export",
31891
32279
  capScope: "system",
31892
32280
  addonId: null,
31893
32281
  access: "create"
31894
32282
  },
31895
32283
  "recordingExport.createExport": {
31896
- capName: "recordingExport",
32284
+ capName: "recording-export",
31897
32285
  capScope: "system",
31898
32286
  addonId: null,
31899
32287
  access: "create"
31900
32288
  },
31901
32289
  "recordingExport.deleteExport": {
31902
- capName: "recordingExport",
32290
+ capName: "recording-export",
31903
32291
  capScope: "system",
31904
32292
  addonId: null,
31905
32293
  access: "delete"
31906
32294
  },
31907
32295
  "recordingExport.getDownloadUrl": {
31908
- capName: "recordingExport",
32296
+ capName: "recording-export",
31909
32297
  capScope: "system",
31910
32298
  addonId: null,
31911
32299
  access: "view"
31912
32300
  },
31913
32301
  "recordingExport.getExport": {
31914
- capName: "recordingExport",
32302
+ capName: "recording-export",
31915
32303
  capScope: "system",
31916
32304
  addonId: null,
31917
32305
  access: "view"
31918
32306
  },
31919
32307
  "recordingExport.listExports": {
31920
- capName: "recordingExport",
32308
+ capName: "recording-export",
31921
32309
  capScope: "system",
31922
32310
  addonId: null,
31923
32311
  access: "view"
31924
32312
  },
31925
32313
  "recordingExport.readExportBytes": {
31926
- capName: "recordingExport",
32314
+ capName: "recording-export",
31927
32315
  capScope: "system",
31928
32316
  addonId: null,
31929
32317
  access: "view"
@@ -33300,6 +33688,104 @@ var FramerateField = number().int().min(1).max(60);
33300
33688
  var TargetsField = array(NcRuleTargetSchema).min(1);
33301
33689
  var PriorityField = number().int().min(1).max(5);
33302
33690
  /**
33691
+ * Explicit override of the DENSE sampling cadence, seconds.
33692
+ *
33693
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
33694
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
33695
+ * made that same base 3 s and rendered a person pass as two frames.)
33696
+ *
33697
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
33698
+ * `denseCadenceSec` and played at `framerate` occupies
33699
+ *
33700
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
33701
+ *
33702
+ * 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.
33703
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
33704
+ * and therefore the length of a quiet night, does not move.
33705
+ *
33706
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
33707
+ * the recording has them returns the same frames, requested twice. Must be
33708
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
33709
+ * a uniform video the operator believes is two-rate — and upsert refuses it
33710
+ * rather than letting the export cap reject the render hours after the window.
33711
+ */
33712
+ var DenseCadenceSecField = number().min(.1).max(3600);
33713
+ /**
33714
+ * Minimum seconds of OUTPUT video each detection range must occupy.
33715
+ *
33716
+ * The operator-facing form of the arithmetic above: instead of solving for a
33717
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
33718
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
33719
+ * that range every ~583 ms.
33720
+ *
33721
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
33722
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
33723
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
33724
+ * ranges are sampled denser than they need. Per-range cadences require a cap
33725
+ * schema change and are the tracked follow-up.
33726
+ *
33727
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
33728
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
33729
+ * by real footage, never met by duplicating frames into motion that never
33730
+ * happened.
33731
+ */
33732
+ var MinDwellSecField = number().min(0).max(60);
33733
+ /**
33734
+ * Caption burned into the notification's preview frame.
33735
+ *
33736
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
33737
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
33738
+ * templating dialect for one field would be a second thing to explain.
33739
+ *
33740
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
33741
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
33742
+ * the reason this is not `.min(1)`.
33743
+ */
33744
+ var PreviewTextField = string().max(200);
33745
+ /**
33746
+ * Whether the notification's preview is a STILL or a short animation.
33747
+ *
33748
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
33749
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
33750
+ * night reads better as three seconds of motion than as one frame of it. Both
33751
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
33752
+ * simply applies it to a dozen frames sampled across the render and assembles
33753
+ * them.
33754
+ *
33755
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
33756
+ * seeks and a palette pass, and no rule that never asked for one should start
33757
+ * paying that on the deploy that shipped it.
33758
+ *
33759
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
33760
+ */
33761
+ var PreviewModeField = _enum(["image", "gif"]);
33762
+ /**
33763
+ * Which detection classes the notification reports counts for.
33764
+ *
33765
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
33766
+ * plan — no second query — aggregated per class. Absent or empty means "every
33767
+ * class the window actually contained", which is what an operator who never
33768
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
33769
+ * counts cars all night).
33770
+ *
33771
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
33772
+ * …). An unknown name simply never matches and reports nothing — it is not an
33773
+ * error, because a rule may legitimately name a class this camera's model does
33774
+ * not emit.
33775
+ *
33776
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
33777
+ * - `{{detections}}` — total over the reported classes
33778
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
33779
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
33780
+ * one per class, `count_` + the class name
33781
+ *
33782
+ * With NO custom body template the summary is appended to the derived body, and
33783
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
33784
+ * reads. With a custom template the operator owns every word — nothing is
33785
+ * appended, so `{{detectionSummary}}` is how he asks for it.
33786
+ */
33787
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
33788
+ /**
33303
33789
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
33304
33790
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
33305
33791
  * here (see the ownership note above).
@@ -33319,9 +33805,30 @@ var TimelapseRuleInputSchema = object({
33319
33805
  cadenceSec: CadenceSecField.default(15),
33320
33806
  /** Output frames per second of the assembled mp4 (predecessor parity). */
33321
33807
  framerate: FramerateField.default(10),
33808
+ /**
33809
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
33810
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
33811
+ * field gets.
33812
+ */
33813
+ denseCadenceSec: DenseCadenceSecField.optional(),
33814
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
33815
+ minDwellSec: MinDwellSecField.optional(),
33322
33816
  /** `notification-output` targets the finished video/thumbnail is sent to. */
33323
33817
  targets: TargetsField,
33324
33818
  template: TimelapseTemplateSchema.optional(),
33819
+ /**
33820
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
33821
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
33822
+ *
33823
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
33824
+ * the notification's title/body, and clearing it (`template: null`) must not
33825
+ * silently clear the caption too.
33826
+ */
33827
+ previewText: PreviewTextField.optional(),
33828
+ /** Still or animation — see {@link PreviewModeField}. */
33829
+ previewMode: PreviewModeField.default("image"),
33830
+ /** Classes the notification counts — see {@link ReportClassesField}. */
33831
+ reportClasses: ReportClassesField.optional(),
33325
33832
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
33326
33833
  priority: PriorityField.default(3)
33327
33834
  });
@@ -33332,8 +33839,13 @@ object({
33332
33839
  schedule: NcScheduleSchema.optional(),
33333
33840
  cadenceSec: CadenceSecField.optional(),
33334
33841
  framerate: FramerateField.optional(),
33842
+ denseCadenceSec: DenseCadenceSecField.optional(),
33843
+ minDwellSec: MinDwellSecField.optional(),
33335
33844
  targets: TargetsField.optional(),
33336
33845
  template: TimelapseTemplateSchema.nullable().optional(),
33846
+ previewText: PreviewTextField.optional(),
33847
+ previewMode: PreviewModeField.optional(),
33848
+ reportClasses: ReportClassesField.optional(),
33337
33849
  priority: PriorityField.optional()
33338
33850
  });
33339
33851
  TimelapseRuleInputSchema.extend({
@@ -33417,25 +33929,32 @@ object({
33417
33929
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
33418
33930
  object({
33419
33931
  /**
33420
- * How long a retained native frame is served before it counts as a miss.
33932
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
33933
+ * detection result.
33934
+ *
33935
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
33936
+ * a time window was never related to the event the pixels were waiting for.
33937
+ * A held frame now lives from delivery until the runner has its `FrameResult`
33938
+ * — at which moment the runner cuts the subject tiles it actually wanted and
33939
+ * releases the frame. The bound exists only so a runner that stops answering
33940
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
33421
33941
  *
33422
- * Must cover the FULL late-crop horizon: detection inference + the
33423
- * cross-process inference-result hop to hub post-analysis + tracking + the
33424
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
33425
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
33426
- * RAM per busy camera grows linearly with no measured hit-rate gain.
33942
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
33943
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
33944
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
33945
+ * Raising it does not buy hit rate it buys tolerance for a slow runner, and
33946
+ * `holdOverflow` on the metrics line is what says you need it.
33427
33947
  */
33428
- ttlMs: number().int().min(250).max(1e4),
33948
+ holdFrames: number().int().min(1).max(64),
33429
33949
  /**
33430
33950
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
33431
33951
  *
33432
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
33433
- * which one is actually binding before reasoning from that. At the shipped
33434
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
33435
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
33436
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
33437
- * change that admits fewer frames buys retention WINDOW at constant RAM
33438
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
33952
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
33953
+ * is what decides how much is held, and the ceiling is the number above which
33954
+ * something is wrong. Before that it was the effective cap at 1024 MB with
33955
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
33956
+ * with the TTL expiring nothing, which is exactly the confusion the hold
33957
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
33439
33958
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
33440
33959
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
33441
33960
  * to replace).
@@ -33461,22 +33980,45 @@ object({
33461
33980
  * there is the signal that some caller names frames outside the inference set
33462
33981
  * and that this must go back to `all`.
33463
33982
  */
33464
- admission: NativeLeaseAdmissionSchema
33983
+ admission: NativeLeaseAdmissionSchema,
33984
+ /**
33985
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
33986
+ * compressed native crops the worker cuts at the moment a frame's detection
33987
+ * result arrives, and keeps long after the frame itself is freed.
33988
+ *
33989
+ * This is the knob that replaced the old retention window, and it buys about
33990
+ * three orders of magnitude more of it: a tile is one subject at native
33991
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
33992
+ * the frame it was cut from. A frame on which nothing was detected costs
33993
+ * nothing at all, which is the real change — the old lease paid per FRAME and
33994
+ * was interrogated per SUBJECT.
33995
+ *
33996
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
33997
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
33998
+ * reproduce that.
33999
+ */
34000
+ tileBudgetMb: number().int().min(0).max(1024)
33465
34001
  });
33466
34002
  /**
33467
- * The values in force when the operator has set nothing — byte-for-byte the
33468
- * constants the decode worker shipped with as env-var defaults, so making these
33469
- * settings changed no behaviour on the day it landed.
34003
+ * The values in force when the operator has set nothing.
34004
+ *
34005
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
34006
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
34007
+ * in the same change that redefines it would make a regression and a retune
34008
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
34009
+ * live traffic.
33470
34010
  */
33471
34011
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
33472
- ttlMs: 1200,
34012
+ holdFrames: 8,
33473
34013
  budgetMb: 1024,
33474
34014
  activityMs: 15e3,
34015
+ tileBudgetMb: 64,
33475
34016
  admission: "inferred"
33476
34017
  };
33477
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
34018
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
33478
34019
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33479
34020
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34021
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33480
34022
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33481
34023
  //#endregion
33482
34024
  //#region src/curses-shim.ts