@camstack/addon-pipeline 1.2.296 → 1.2.298

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 (33) hide show
  1. package/dist/audio-analyzer/index.js +571 -305
  2. package/dist/audio-analyzer/index.mjs +571 -305
  3. package/dist/{default-detection-model-D1daTtqT.js → default-detection-model-BTJZvSr_.js} +368 -5
  4. package/dist/{default-detection-model-Co578D8C.mjs → default-detection-model-Bim_g_Ui.mjs} +339 -6
  5. package/dist/detection-pipeline/index.js +521 -217
  6. package/dist/detection-pipeline/index.mjs +520 -216
  7. package/dist/{dist-CCd0Q3nr.mjs → dist-DVz_88D_.mjs} +80 -123
  8. package/dist/{dist-8up-f2TX.js → dist-L_HlB0At.js} +91 -140
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/{node-lpQgHes9.js → node-CmzZ_-zB.js} +1 -1
  12. package/dist/{node-DgMSXSWP.mjs → node-Cr8Ch1ZN.mjs} +1 -1
  13. package/dist/pipeline-runner/index.js +213 -203
  14. package/dist/pipeline-runner/index.mjs +213 -203
  15. package/dist/{process-memory-DFC_O5zE.mjs → process-memory-DO7La1yB.mjs} +1 -1
  16. package/dist/{process-memory-CX_92V_r.js → process-memory-FfRDGu11.js} +1 -1
  17. package/dist/recorder/index.js +3 -3
  18. package/dist/recorder/index.mjs +3 -3
  19. package/dist/{segment-demux-js-FZbBuk3F.mjs → segment-demux-js-BuioTwCh.mjs} +1 -1
  20. package/dist/{segment-demux-js-DzBx6NN2.js → segment-demux-js-Cd7btWna.js} +1 -1
  21. package/dist/stream-broker/_stub.js +2 -2
  22. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-C_i7oFBl.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CsbrrsyY.mjs} +2 -2
  23. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DisouA2F.mjs +26 -0
  24. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dti8Ex88.mjs +26 -0
  25. package/dist/stream-broker/demux-worker-child.js +1 -1
  26. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  27. package/dist/stream-broker/{hostInit-BPtppL3W.mjs → hostInit-NCsHzij7.mjs} +2 -2
  28. package/dist/stream-broker/index.js +3 -3
  29. package/dist/stream-broker/index.mjs +3 -3
  30. package/dist/stream-broker/remoteEntry.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DUGQKsKL.mjs +0 -26
  33. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CkbplMHA.mjs +0 -26
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
5360
5360
  var ZodFirstPartyTypeKind;
5361
5361
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5362
5362
  //#endregion
5363
- //#region ../types/dist/sleep-BXv0ZcRa.mjs
5363
+ //#region ../types/dist/sleep-DC-wdyeS.mjs
5364
5364
  /**
5365
5365
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5366
5366
  * window to float samples (D455).
@@ -12925,12 +12925,32 @@ var AudioClassificationLabelSchema = object({
12925
12925
  originalClass: string().optional(),
12926
12926
  score: number()
12927
12927
  });
12928
+ /**
12929
+ * Did the classifier RUN on this window? (D660)
12930
+ *
12931
+ * `classified` with no labels means the model heard nothing above the
12932
+ * camera's floor. `not-classified` means nobody listened — and until D660 the
12933
+ * two were the same shape (`classification` absent), so a window the global
12934
+ * busy gate threw away read downstream exactly like a quiet one (D393).
12935
+ */
12936
+ var AudioClassifyOutcomeSchema = discriminatedUnion("state", [object({ state: literal("classified") }), object({
12937
+ state: literal("not-classified"),
12938
+ reason: _enum([
12939
+ "superseded",
12940
+ "error",
12941
+ "timeout",
12942
+ "disposed"
12943
+ ])
12944
+ })]);
12928
12945
  var AudioAnalysisResultSchema = object({
12929
12946
  level: AudioLevelSchema,
12947
+ /** Labels at or above the camera's floor. Absent = none — read `classifyOutcome` to know whether the model ran at all. */
12930
12948
  classification: object({
12931
12949
  labels: array(AudioClassificationLabelSchema).readonly(),
12932
12950
  inferenceMs: number()
12933
12951
  }).optional(),
12952
+ /** Whether the classifier ran on this window (D660). */
12953
+ classifyOutcome: AudioClassifyOutcomeSchema,
12934
12954
  timestamp: number()
12935
12955
  });
12936
12956
  var AudioAnalysisSettingsSchema = object({
@@ -16318,8 +16338,22 @@ var LinkedDeviceSchema = object({
16318
16338
  * The `linked-devices` extension slot's editable value (D648): the operator's
16319
16339
  * pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
16320
16340
  * in it — they are always linked and are not a pick.
16321
- */
16322
- var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
16341
+ *
16342
+ * `trackedDeviceIds` (D655) is the tracked-event opt-in, exactly what
16343
+ * `_linkedDeviceTrackedIds` persists: which linked devices materialize a
16344
+ * synthetic tracked event on the camera. A read always carries it AS STORED
16345
+ * (an absent key reads as `[]`, which is what the resolver makes of it —
16346
+ * NONE). On a write it is optional: absent leaves the opt-in untouched, so a
16347
+ * card built before D655 cannot erase it by saving the pick list. A present
16348
+ * list REPLACES the opt-in; each id must be a pick, a device the camera links
16349
+ * by structure (the row's `impliedSources`: tree children, a picked
16350
+ * container's child) or already stored — so what was read can always be
16351
+ * written back unchanged, and a NEW opt-in outside the linked set is refused.
16352
+ */
16353
+ var LinkedDevicesSlotValueSchema = object({
16354
+ deviceIds: array(number().int().positive()),
16355
+ trackedDeviceIds: array(number().int().positive()).optional()
16356
+ });
16323
16357
  DeviceType.Camera;
16324
16358
  /** One camera's resolved linked set, tagged with the camera it belongs to.
16325
16359
  * The batch answer needs the tag; the single-device answer already has it
@@ -22224,90 +22258,10 @@ var CLUSTER_MODEL_SCOPED_STEPS = [{
22224
22258
  }
22225
22259
  ]
22226
22260
  }];
22227
- /**
22228
- * The settings key holding one step's cluster model choice.
22229
- *
22230
- * Step-qualified so the keys stay unique across the addon's whole schema, which
22231
- * is what lets {@link pickClusterStepModels} walk every section instead of
22232
- * trusting the section id.
22233
- */
22234
- function clusterModelSettingKey(stepId) {
22235
- return `clusterModel:${stepId}`;
22236
- }
22237
- /** The cluster row when nobody has configured one — today's catalog defaults. */
22238
- var DEFAULT_CLUSTER_STEP_MODELS = Object.freeze(Object.fromEntries(CLUSTER_MODEL_SCOPED_STEPS.map((s) => [s.stepId, s.defaultModelId])));
22239
- function interpretStoredClusterModel(raw) {
22240
- if (raw === void 0 || raw === null || raw === "") return { kind: "absent" };
22241
- if (typeof raw === "string") return {
22242
- kind: "chosen",
22243
- modelId: raw
22244
- };
22245
- return {
22246
- kind: "invalid",
22247
- value: raw
22248
- };
22249
- }
22250
- /**
22251
- * The cluster-scoped steps whose stored value is `invalid` under
22252
- * {@link interpretStoredClusterModel} — for the runtime's log line, so the
22253
- * default it runs on such a row is never run in silence.
22254
- */
22255
- function invalidClusterStepModelEntries(config) {
22256
- const out = [];
22257
- for (const step of CLUSTER_MODEL_SCOPED_STEPS) {
22258
- const read = interpretStoredClusterModel(config[clusterModelSettingKey(step.stepId)]);
22259
- if (read.kind === "invalid") out.push({
22260
- stepId: step.stepId,
22261
- value: read.value
22262
- });
22263
- }
22264
- return out;
22265
- }
22266
- /**
22267
- * Narrow a FLAT settings record to the cluster row.
22268
- *
22269
- * Per-FIELD fallback, deliberately (same rule as `readDetailCropConvention`): a
22270
- * junk face model must not also discard a valid clip model. An `absent` or
22271
- * `invalid` value ({@link interpretStoredClusterModel}) resolves to the step's
22272
- * catalog default — never to a blank id, because a blank id downstream becomes
22273
- * "substitute the format default", which is precisely the substitution this
22274
- * scope exists to forbid.
22275
- */
22276
- function readClusterStepModels(config) {
22277
- const out = {};
22278
- for (const step of CLUSTER_MODEL_SCOPED_STEPS) {
22279
- const read = interpretStoredClusterModel(config[clusterModelSettingKey(step.stepId)]);
22280
- out[step.stepId] = read.kind === "chosen" ? read.modelId : step.defaultModelId;
22281
- }
22282
- return out;
22283
- }
22261
+ Object.freeze(Object.fromEntries(CLUSTER_MODEL_SCOPED_STEPS.map((s) => [s.stepId, s.defaultModelId])));
22284
22262
  function isHydratedField$2(entry) {
22285
22263
  return typeof entry === "object" && entry !== null && "key" in entry;
22286
22264
  }
22287
- /**
22288
- * Extract the cluster row from an `addon-settings.getGlobalSettings` payload.
22289
- *
22290
- * Walks EVERY section rather than looking inside {@link CLUSTER_MODEL_SECTION_ID}
22291
- * alone: the keys are unique across the addon's schema, and a section rename
22292
- * must not silently revert the whole cluster to the defaults. A `null` payload
22293
- * (addon mid-boot) is the defaults.
22294
- */
22295
- function pickClusterStepModels(view) {
22296
- if (view === null) return DEFAULT_CLUSTER_STEP_MODELS;
22297
- return readClusterStepModels(flattenHydratedView(view, clusterModelKeys()));
22298
- }
22299
- /**
22300
- * The `invalid` stored cluster model values a hydrated view carries — what the
22301
- * runtime logs when it runs a default on a row it could not read as a choice.
22302
- * A `null` view (owner mid-boot) carries nothing to judge.
22303
- */
22304
- function pickInvalidClusterStepModels(view) {
22305
- if (view === null) return [];
22306
- return invalidClusterStepModelEntries(flattenHydratedView(view, clusterModelKeys()));
22307
- }
22308
- function clusterModelKeys() {
22309
- return new Set(CLUSTER_MODEL_SCOPED_STEPS.map((s) => clusterModelSettingKey(s.stepId)));
22310
- }
22311
22265
  /** The `wanted` keys of a hydrated view as one flat record, every section walked. */
22312
22266
  function flattenHydratedView(view, wanted) {
22313
22267
  const flat = {};
@@ -23174,6 +23128,13 @@ var AudioEventSchema = object({
23174
23128
  originalClass: string().optional(),
23175
23129
  score: number()
23176
23130
  }).optional(),
23131
+ /**
23132
+ * Whether the classifier RAN on the window behind this row (D660). Absent
23133
+ * on rows written before D660 — unknown, NOT classified: until then a
23134
+ * window the analyzer's busy gate threw away was stored exactly like one
23135
+ * that heard nothing above the floor.
23136
+ */
23137
+ classifyOutcome: AudioClassifyOutcomeSchema.optional(),
23177
23138
  /** Populated by B5 (recording playback URL for this event). */
23178
23139
  mediaUrl: string().optional()
23179
23140
  });
@@ -24926,7 +24887,14 @@ var pipelineExecutorCapability = {
24926
24887
  */
24927
24888
  inferCached: method(object({
24928
24889
  stepId: string(),
24929
- frameId: number().int()
24890
+ frameId: number().int(),
24891
+ /**
24892
+ * The model to time — REQUIRED (D658). Without it the pool answered the
24893
+ * step's ACTIVE variant (the first loaded after boot), so a benchmark
24894
+ * of model B silently timed model A. Callers pass the `rootModelId`
24895
+ * their warmup `runPipeline` reported: the model that actually ran.
24896
+ */
24897
+ modelId: string().min(1)
24930
24898
  }), record(string(), unknown()), { kind: "mutation" }),
24931
24899
  /**
24932
24900
  * Release a cached frame from the Python pool's memory.
@@ -29515,7 +29483,17 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
29515
29483
  projects: string().nullable(),
29516
29484
  activation: ExtensionSlotActivationSchema.nullable(),
29517
29485
  value: ExtensionSlotValueSchema,
29518
- sources: array(ExtensionSlotSourceSchema)
29486
+ sources: array(ExtensionSlotSourceSchema),
29487
+ /**
29488
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
29489
+ * are therefore not in `value` (D655): a camera's device-tree children, and
29490
+ * the child a picked container stands for (D356 — a container is never a
29491
+ * pick, its children are). Read-only; the editor shows them and may offer
29492
+ * per-device options on them (the linked-devices tracked-event opt-in).
29493
+ * Absent when the owner links nothing beyond the picks, and from an owner
29494
+ * older than D655.
29495
+ */
29496
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
29519
29497
  }), object({
29520
29498
  state: literal("unreachable"),
29521
29499
  addonId: string(),
@@ -41733,12 +41711,6 @@ Object.freeze({
41733
41711
  addonId: null,
41734
41712
  access: "create"
41735
41713
  },
41736
- "deviceManager.applyDeviceSettingsPatch": {
41737
- capName: "device-manager",
41738
- capScope: "system",
41739
- addonId: null,
41740
- access: "create"
41741
- },
41742
41714
  "deviceManager.applyInitialMeta": {
41743
41715
  capName: "device-manager",
41744
41716
  capScope: "system",
@@ -41841,12 +41813,6 @@ Object.freeze({
41841
41813
  addonId: null,
41842
41814
  access: "view"
41843
41815
  },
41844
- "deviceManager.getDeviceLiveContribution": {
41845
- capName: "device-manager",
41846
- capScope: "system",
41847
- addonId: null,
41848
- access: "view"
41849
- },
41850
41816
  "deviceManager.getDeviceLiveInfoAggregate": {
41851
41817
  capName: "device-manager",
41852
41818
  capScope: "system",
@@ -41859,12 +41825,6 @@ Object.freeze({
41859
41825
  addonId: null,
41860
41826
  access: "view"
41861
41827
  },
41862
- "deviceManager.getDeviceSettingsContribution": {
41863
- capName: "device-manager",
41864
- capScope: "system",
41865
- addonId: null,
41866
- access: "view"
41867
- },
41868
41828
  "deviceManager.getDeviceStatusAggregate": {
41869
41829
  capName: "device-manager",
41870
41830
  capScope: "system",
@@ -42369,24 +42329,6 @@ Object.freeze({
42369
42329
  addonId: null,
42370
42330
  access: "view"
42371
42331
  },
42372
- "doorbell.applyDeviceSettingsPatch": {
42373
- capName: "doorbell",
42374
- capScope: "device",
42375
- addonId: null,
42376
- access: "create"
42377
- },
42378
- "doorbell.getDeviceLiveContribution": {
42379
- capName: "doorbell",
42380
- capScope: "device",
42381
- addonId: null,
42382
- access: "view"
42383
- },
42384
- "doorbell.getDeviceSettingsContribution": {
42385
- capName: "doorbell",
42386
- capScope: "device",
42387
- addonId: null,
42388
- access: "view"
42389
- },
42390
42332
  "doorbell.getStatus": {
42391
42333
  capName: "doorbell",
42392
42334
  capScope: "device",
@@ -50111,6 +50053,21 @@ TimelapseRuleInputSchema.extend({
50111
50053
  createdAt: number(),
50112
50054
  updatedAt: number()
50113
50055
  });
50056
+ /** True when `model` ships a build for `format`. */
50057
+ function hasBuild(model, format) {
50058
+ return Boolean(model.formats[format]);
50059
+ }
50060
+ /**
50061
+ * Can a pool of `format` run a step whose catalog is `models`, given the model
50062
+ * the step names (`null`/absent = unpinned, the format default)?
50063
+ */
50064
+ function stepModelRunsOnFormat(models, modelId, format) {
50065
+ if (modelId !== void 0 && modelId !== null) {
50066
+ const named = models.find((m) => m.id === modelId);
50067
+ if (named !== void 0 && hasBuild(named, format)) return true;
50068
+ }
50069
+ return models.some((m) => m.legacy !== true && hasBuild(m, format));
50070
+ }
50114
50071
  var DETAIL_CROP_PADDING_KEY = "detailCropPaddingRatio";
50115
50072
  var DETAIL_CROP_SQUARE_KEY = "detailCropSquare";
50116
50073
  /**
@@ -51311,4 +51268,4 @@ function enumerateInferenceDevices(hw) {
51311
51268
  return out;
51312
51269
  }
51313
51270
  //#endregion
51314
- export { declareLogChannel as $, videoclipsCapability as $t, OpsLogEntrySchema as A, discriminatedUnion as An, pickClusterStepSettings as At, VIDEOCLIPS_MAX_OFFER_BYTES as B, recordingSignalCapability as Bt, ExportRecordSchema as C, parseJsonUnknown as Cn, mayWriteToLocation as Ct, MOTION_CLOSE_AFTER_MS as D, _enum as Dn, overlayClusterStepSettings as Dt, HF_BASE_URL as E, sleep as En, motionDetectionCapability as Et, RECORDING_SOURCE_CAMSTACK as F, preprocess as Fn, pipelineRunnerCapability as Ft, audioAnalyzerCapability as G, resolvePoolMemoryPolicy as Gt, YAMNET_TO_MACRO as H, resolveCreateExportSubject as Ht, RECORDING_SOURCE_CAMSTACK_ADDON as I, record as In, rankStreams as It, cameraStreamsCapability as J, storageEvictableCapability as Jt, audioKindId as K, resolveRecordingProfiles as Kt, RecordingConfigSchema as L, string as Ln, recordingArchiveCapability as Lt, RATE_CONTROL_RELAXED as M, literal as Mn, pickInvalidClusterStepModels as Mt, RATE_CONTROL_TIGHT as N, number as Nn, pickNativeLeaseOverride as Nt, NativeLeaseAdmissionSchema as O, array as On, parseProcStatus as Ot, RECORDING_EXPORT_MAX_READ_BYTES as P, object as Pn, pipelineExecutorCapability as Pt, createLogChannelsProvider as Q, supportedRuntimes as Qt, RecordingSignalStatusSchema as R, union as Rn, recordingCapability as Rt, EncodeProfileSchema as S, nodePin as Sn, mayReadLocation as St, G711_SCALE_CORRECTION_DB as T, selectAssignedProfileSlots as Tn, modeMayWrite as Tt, addonWidgetsSourceCapability as U, resolveEgressDecodeHwAccel as Ut, VISIT_MERGE_GAP_MS as V, resolveClusterStepModelId as Vt, audioAnalysisCapability as W, resolveLocationMode as Wt, clipExportFailureOf as X, streamBrokerCapability as Xt, clipExportFailure as Y, storageOccupancyCapability as Yt, createHwAccelCache as Z, stripRetiredBandPreBufferSec as Zt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as _, expandAudioChunkToF32le as _n, isFirstLevelMacroClass as _t, BatteryStatusSchema as a, invocationFromEncodeProfile as an, egressTranscodeSharingKey as at, EVENT_OWNER_TYPES as b, makeProfileBrokerId as bn, mapAudioLabelToMacro as bt, CLIP_STILL_REASON_HEADER as c, BaseAddon as cn, evaluateSensorEdge as ct, COCO_TO_MACRO as d, DeviceFeature as dn, evictionPolicyOfLocation as dt, webrtcSessionCapability as en, defaultDeviceFor as et, DEFAULT_AUDIO_ANALYZER_CONFIG as f, DeviceType as fn, exportSubjectOf as ft, DEFAULT_EVENTS_BAND_BUFFER_SEC as g, defineCustomActions as gn, inferModelProvider as gt, DEFAULT_DETAIL_CROP_CONVENTION as h, customAction as hn, hfModelUrl as ht, BackgroundRunRegistry as i, buildFfmpegArgs as in, detectionPipelineCapability as it, PoolMemoryWatchdog as j, lazy as jn, pickDetailCropConvention as jt, NativeLeaseSettingsSchema as k, boolean as kn, pickClusterStepModels as kt, CLIP_STREAM_TRANSPORT_HEADER as l, CAM_PROFILE_ORDER as ln, evaluateZoneRules as lt, DEFAULT_CLUSTER_STEP_SETTINGS as m, createEvent as mn, gbToBytes as mt, AUDIO_BACKEND_CHOICES as n, AUDIO_PRESETS as nn, deriveDetailCropRect as nt, CLIP_BROKER_PACED_RATES as o, isSoftwareDecode as on, egressTransportFromRequest as ot, DEFAULT_CLUSTER_STEP_MODELS as p, audioChunkBytesPerSample as pn, failureContributionCapability as pt, batteryCapability as q, runtimeDevices as qt, AUDIO_MACRO_LABELS as r, Fmp4BoxSplitter as rn, deriveRecordingMode as rt, CLIP_STILL_REASON_CODE_HEADER as s, BOOT_RECOVERY_BACKOFF_MS as sn, enumerateInferenceDevices as st, APPLE_SA_TO_MACRO as t, errMsg as tn, deriveBatteryPresence as tt, COCO_80_LABELS as u, CamProfileSchema as un, evictionPolicyForMode as ut, DEFAULT_NATIVE_LEASE_SETTINGS as v, hydrateSchema as vn, loadContributionCapability as vt, FailureCounters as w, parseProfileBrokerId as wn, migrateLegacyDeviceSignalConfig as wt, EVENT_PAD_MS as x, makeSourceBrokerId as xn, maskUrlCredentials as xt, DEVICE_BACKEND_TO_FORMAT as y, isEvent as yn, logChannelsCapability as yt, RingBuffer as z, EventCategory as zn, recordingExportCapability as zt };
51271
+ export { declareLogChannel as $, webrtcSessionCapability as $t, OpsLogEntrySchema as A, lazy as An, pickDetailCropConvention as At, VIDEOCLIPS_MAX_OFFER_BYTES as B, resolveCreateExportSubject as Bt, ExportRecordSchema as C, parseProfileBrokerId as Cn, mayWriteToLocation as Ct, MOTION_CLOSE_AFTER_MS as D, array as Dn, overlayClusterStepSettings as Dt, HF_BASE_URL as E, _enum as En, motionDetectionCapability as Et, RECORDING_SOURCE_CAMSTACK as F, record as Fn, recordingArchiveCapability as Ft, audioAnalyzerCapability as G, runtimeDevices as Gt, YAMNET_TO_MACRO as H, resolveLocationMode as Ht, RECORDING_SOURCE_CAMSTACK_ADDON as I, string as In, recordingCapability as It, cameraStreamsCapability as J, storageOccupancyCapability as Jt, audioKindId as K, stepModelRunsOnFormat as Kt, RecordingConfigSchema as L, union as Ln, recordingExportCapability as Lt, RATE_CONTROL_RELAXED as M, number as Mn, pipelineExecutorCapability as Mt, RATE_CONTROL_TIGHT as N, object as Nn, pipelineRunnerCapability as Nt, NativeLeaseAdmissionSchema as O, boolean as On, parseProcStatus as Ot, RECORDING_EXPORT_MAX_READ_BYTES as P, preprocess as Pn, rankStreams as Pt, createLogChannelsProvider as Q, videoclipsCapability as Qt, RecordingSignalStatusSchema as R, EventCategory as Rn, recordingSignalCapability as Rt, EncodeProfileSchema as S, parseJsonUnknown as Sn, mayReadLocation as St, G711_SCALE_CORRECTION_DB as T, sleep as Tn, modeMayWrite as Tt, addonWidgetsSourceCapability as U, resolvePoolMemoryPolicy as Ut, VISIT_MERGE_GAP_MS as V, resolveEgressDecodeHwAccel as Vt, audioAnalysisCapability as W, resolveRecordingProfiles as Wt, clipExportFailureOf as X, stripRetiredBandPreBufferSec as Xt, clipExportFailure as Y, streamBrokerCapability as Yt, createHwAccelCache as Z, supportedRuntimes as Zt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as _, hydrateSchema as _n, isFirstLevelMacroClass as _t, BatteryStatusSchema as a, isSoftwareDecode as an, egressTranscodeSharingKey as at, EVENT_OWNER_TYPES as b, makeSourceBrokerId as bn, mapAudioLabelToMacro as bt, CLIP_STILL_REASON_HEADER as c, CAM_PROFILE_ORDER as cn, evaluateSensorEdge as ct, COCO_80_LABELS as d, DeviceType as dn, evictionPolicyOfLocation as dt, errMsg as en, defaultDeviceFor as et, COCO_TO_MACRO as f, audioChunkBytesPerSample as fn, exportSubjectOf as ft, DEFAULT_EVENTS_BAND_BUFFER_SEC as g, expandAudioChunkToF32le as gn, inferModelProvider as gt, DEFAULT_DETAIL_CROP_CONVENTION as h, defineCustomActions as hn, hfModelUrl as ht, BackgroundRunRegistry as i, invocationFromEncodeProfile as in, detectionPipelineCapability as it, PoolMemoryWatchdog as j, literal as jn, pickNativeLeaseOverride as jt, NativeLeaseSettingsSchema as k, discriminatedUnion as kn, pickClusterStepSettings as kt, CLIP_STREAM_TRANSPORT_HEADER as l, CamProfileSchema as ln, evaluateZoneRules as lt, DEFAULT_CLUSTER_STEP_SETTINGS as m, customAction as mn, gbToBytes as mt, AUDIO_BACKEND_CHOICES as n, Fmp4BoxSplitter as nn, deriveDetailCropRect as nt, CLIP_BROKER_PACED_RATES as o, BOOT_RECOVERY_BACKOFF_MS as on, egressTransportFromRequest as ot, DEFAULT_AUDIO_ANALYZER_CONFIG as p, createEvent as pn, failureContributionCapability as pt, batteryCapability as q, storageEvictableCapability as qt, AUDIO_MACRO_LABELS as r, buildFfmpegArgs as rn, deriveRecordingMode as rt, CLIP_STILL_REASON_CODE_HEADER as s, BaseAddon as sn, enumerateInferenceDevices as st, APPLE_SA_TO_MACRO as t, AUDIO_PRESETS as tn, deriveBatteryPresence as tt, CLUSTER_MODEL_SCOPED_STEPS as u, DeviceFeature as un, evictionPolicyForMode as ut, DEFAULT_NATIVE_LEASE_SETTINGS as v, isEvent as vn, loadContributionCapability as vt, FailureCounters as w, selectAssignedProfileSlots as wn, migrateLegacyDeviceSignalConfig as wt, EVENT_PAD_MS as x, nodePin as xn, maskUrlCredentials as xt, DEVICE_BACKEND_TO_FORMAT as y, makeProfileBrokerId as yn, logChannelsCapability as yt, RingBuffer as z, resolveClusterStepModelId as zt };
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
5360
5360
  var ZodFirstPartyTypeKind;
5361
5361
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5362
5362
  //#endregion
5363
- //#region ../types/dist/sleep-BXv0ZcRa.mjs
5363
+ //#region ../types/dist/sleep-DC-wdyeS.mjs
5364
5364
  /**
5365
5365
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5366
5366
  * window to float samples (D455).
@@ -12925,12 +12925,32 @@ var AudioClassificationLabelSchema = object({
12925
12925
  originalClass: string().optional(),
12926
12926
  score: number()
12927
12927
  });
12928
+ /**
12929
+ * Did the classifier RUN on this window? (D660)
12930
+ *
12931
+ * `classified` with no labels means the model heard nothing above the
12932
+ * camera's floor. `not-classified` means nobody listened — and until D660 the
12933
+ * two were the same shape (`classification` absent), so a window the global
12934
+ * busy gate threw away read downstream exactly like a quiet one (D393).
12935
+ */
12936
+ var AudioClassifyOutcomeSchema = discriminatedUnion("state", [object({ state: literal("classified") }), object({
12937
+ state: literal("not-classified"),
12938
+ reason: _enum([
12939
+ "superseded",
12940
+ "error",
12941
+ "timeout",
12942
+ "disposed"
12943
+ ])
12944
+ })]);
12928
12945
  var AudioAnalysisResultSchema = object({
12929
12946
  level: AudioLevelSchema,
12947
+ /** Labels at or above the camera's floor. Absent = none — read `classifyOutcome` to know whether the model ran at all. */
12930
12948
  classification: object({
12931
12949
  labels: array(AudioClassificationLabelSchema).readonly(),
12932
12950
  inferenceMs: number()
12933
12951
  }).optional(),
12952
+ /** Whether the classifier ran on this window (D660). */
12953
+ classifyOutcome: AudioClassifyOutcomeSchema,
12934
12954
  timestamp: number()
12935
12955
  });
12936
12956
  var AudioAnalysisSettingsSchema = object({
@@ -16318,8 +16338,22 @@ var LinkedDeviceSchema = object({
16318
16338
  * The `linked-devices` extension slot's editable value (D648): the operator's
16319
16339
  * pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
16320
16340
  * in it — they are always linked and are not a pick.
16321
- */
16322
- var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
16341
+ *
16342
+ * `trackedDeviceIds` (D655) is the tracked-event opt-in, exactly what
16343
+ * `_linkedDeviceTrackedIds` persists: which linked devices materialize a
16344
+ * synthetic tracked event on the camera. A read always carries it AS STORED
16345
+ * (an absent key reads as `[]`, which is what the resolver makes of it —
16346
+ * NONE). On a write it is optional: absent leaves the opt-in untouched, so a
16347
+ * card built before D655 cannot erase it by saving the pick list. A present
16348
+ * list REPLACES the opt-in; each id must be a pick, a device the camera links
16349
+ * by structure (the row's `impliedSources`: tree children, a picked
16350
+ * container's child) or already stored — so what was read can always be
16351
+ * written back unchanged, and a NEW opt-in outside the linked set is refused.
16352
+ */
16353
+ var LinkedDevicesSlotValueSchema = object({
16354
+ deviceIds: array(number().int().positive()),
16355
+ trackedDeviceIds: array(number().int().positive()).optional()
16356
+ });
16323
16357
  DeviceType.Camera;
16324
16358
  /** One camera's resolved linked set, tagged with the camera it belongs to.
16325
16359
  * The batch answer needs the tag; the single-device answer already has it
@@ -22224,90 +22258,10 @@ var CLUSTER_MODEL_SCOPED_STEPS = [{
22224
22258
  }
22225
22259
  ]
22226
22260
  }];
22227
- /**
22228
- * The settings key holding one step's cluster model choice.
22229
- *
22230
- * Step-qualified so the keys stay unique across the addon's whole schema, which
22231
- * is what lets {@link pickClusterStepModels} walk every section instead of
22232
- * trusting the section id.
22233
- */
22234
- function clusterModelSettingKey(stepId) {
22235
- return `clusterModel:${stepId}`;
22236
- }
22237
- /** The cluster row when nobody has configured one — today's catalog defaults. */
22238
- var DEFAULT_CLUSTER_STEP_MODELS = Object.freeze(Object.fromEntries(CLUSTER_MODEL_SCOPED_STEPS.map((s) => [s.stepId, s.defaultModelId])));
22239
- function interpretStoredClusterModel(raw) {
22240
- if (raw === void 0 || raw === null || raw === "") return { kind: "absent" };
22241
- if (typeof raw === "string") return {
22242
- kind: "chosen",
22243
- modelId: raw
22244
- };
22245
- return {
22246
- kind: "invalid",
22247
- value: raw
22248
- };
22249
- }
22250
- /**
22251
- * The cluster-scoped steps whose stored value is `invalid` under
22252
- * {@link interpretStoredClusterModel} — for the runtime's log line, so the
22253
- * default it runs on such a row is never run in silence.
22254
- */
22255
- function invalidClusterStepModelEntries(config) {
22256
- const out = [];
22257
- for (const step of CLUSTER_MODEL_SCOPED_STEPS) {
22258
- const read = interpretStoredClusterModel(config[clusterModelSettingKey(step.stepId)]);
22259
- if (read.kind === "invalid") out.push({
22260
- stepId: step.stepId,
22261
- value: read.value
22262
- });
22263
- }
22264
- return out;
22265
- }
22266
- /**
22267
- * Narrow a FLAT settings record to the cluster row.
22268
- *
22269
- * Per-FIELD fallback, deliberately (same rule as `readDetailCropConvention`): a
22270
- * junk face model must not also discard a valid clip model. An `absent` or
22271
- * `invalid` value ({@link interpretStoredClusterModel}) resolves to the step's
22272
- * catalog default — never to a blank id, because a blank id downstream becomes
22273
- * "substitute the format default", which is precisely the substitution this
22274
- * scope exists to forbid.
22275
- */
22276
- function readClusterStepModels(config) {
22277
- const out = {};
22278
- for (const step of CLUSTER_MODEL_SCOPED_STEPS) {
22279
- const read = interpretStoredClusterModel(config[clusterModelSettingKey(step.stepId)]);
22280
- out[step.stepId] = read.kind === "chosen" ? read.modelId : step.defaultModelId;
22281
- }
22282
- return out;
22283
- }
22261
+ Object.freeze(Object.fromEntries(CLUSTER_MODEL_SCOPED_STEPS.map((s) => [s.stepId, s.defaultModelId])));
22284
22262
  function isHydratedField$2(entry) {
22285
22263
  return typeof entry === "object" && entry !== null && "key" in entry;
22286
22264
  }
22287
- /**
22288
- * Extract the cluster row from an `addon-settings.getGlobalSettings` payload.
22289
- *
22290
- * Walks EVERY section rather than looking inside {@link CLUSTER_MODEL_SECTION_ID}
22291
- * alone: the keys are unique across the addon's schema, and a section rename
22292
- * must not silently revert the whole cluster to the defaults. A `null` payload
22293
- * (addon mid-boot) is the defaults.
22294
- */
22295
- function pickClusterStepModels(view) {
22296
- if (view === null) return DEFAULT_CLUSTER_STEP_MODELS;
22297
- return readClusterStepModels(flattenHydratedView(view, clusterModelKeys()));
22298
- }
22299
- /**
22300
- * The `invalid` stored cluster model values a hydrated view carries — what the
22301
- * runtime logs when it runs a default on a row it could not read as a choice.
22302
- * A `null` view (owner mid-boot) carries nothing to judge.
22303
- */
22304
- function pickInvalidClusterStepModels(view) {
22305
- if (view === null) return [];
22306
- return invalidClusterStepModelEntries(flattenHydratedView(view, clusterModelKeys()));
22307
- }
22308
- function clusterModelKeys() {
22309
- return new Set(CLUSTER_MODEL_SCOPED_STEPS.map((s) => clusterModelSettingKey(s.stepId)));
22310
- }
22311
22265
  /** The `wanted` keys of a hydrated view as one flat record, every section walked. */
22312
22266
  function flattenHydratedView(view, wanted) {
22313
22267
  const flat = {};
@@ -23174,6 +23128,13 @@ var AudioEventSchema = object({
23174
23128
  originalClass: string().optional(),
23175
23129
  score: number()
23176
23130
  }).optional(),
23131
+ /**
23132
+ * Whether the classifier RAN on the window behind this row (D660). Absent
23133
+ * on rows written before D660 — unknown, NOT classified: until then a
23134
+ * window the analyzer's busy gate threw away was stored exactly like one
23135
+ * that heard nothing above the floor.
23136
+ */
23137
+ classifyOutcome: AudioClassifyOutcomeSchema.optional(),
23177
23138
  /** Populated by B5 (recording playback URL for this event). */
23178
23139
  mediaUrl: string().optional()
23179
23140
  });
@@ -24926,7 +24887,14 @@ var pipelineExecutorCapability = {
24926
24887
  */
24927
24888
  inferCached: method(object({
24928
24889
  stepId: string(),
24929
- frameId: number().int()
24890
+ frameId: number().int(),
24891
+ /**
24892
+ * The model to time — REQUIRED (D658). Without it the pool answered the
24893
+ * step's ACTIVE variant (the first loaded after boot), so a benchmark
24894
+ * of model B silently timed model A. Callers pass the `rootModelId`
24895
+ * their warmup `runPipeline` reported: the model that actually ran.
24896
+ */
24897
+ modelId: string().min(1)
24930
24898
  }), record(string(), unknown()), { kind: "mutation" }),
24931
24899
  /**
24932
24900
  * Release a cached frame from the Python pool's memory.
@@ -29515,7 +29483,17 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
29515
29483
  projects: string().nullable(),
29516
29484
  activation: ExtensionSlotActivationSchema.nullable(),
29517
29485
  value: ExtensionSlotValueSchema,
29518
- sources: array(ExtensionSlotSourceSchema)
29486
+ sources: array(ExtensionSlotSourceSchema),
29487
+ /**
29488
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
29489
+ * are therefore not in `value` (D655): a camera's device-tree children, and
29490
+ * the child a picked container stands for (D356 — a container is never a
29491
+ * pick, its children are). Read-only; the editor shows them and may offer
29492
+ * per-device options on them (the linked-devices tracked-event opt-in).
29493
+ * Absent when the owner links nothing beyond the picks, and from an owner
29494
+ * older than D655.
29495
+ */
29496
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
29519
29497
  }), object({
29520
29498
  state: literal("unreachable"),
29521
29499
  addonId: string(),
@@ -41733,12 +41711,6 @@ Object.freeze({
41733
41711
  addonId: null,
41734
41712
  access: "create"
41735
41713
  },
41736
- "deviceManager.applyDeviceSettingsPatch": {
41737
- capName: "device-manager",
41738
- capScope: "system",
41739
- addonId: null,
41740
- access: "create"
41741
- },
41742
41714
  "deviceManager.applyInitialMeta": {
41743
41715
  capName: "device-manager",
41744
41716
  capScope: "system",
@@ -41841,12 +41813,6 @@ Object.freeze({
41841
41813
  addonId: null,
41842
41814
  access: "view"
41843
41815
  },
41844
- "deviceManager.getDeviceLiveContribution": {
41845
- capName: "device-manager",
41846
- capScope: "system",
41847
- addonId: null,
41848
- access: "view"
41849
- },
41850
41816
  "deviceManager.getDeviceLiveInfoAggregate": {
41851
41817
  capName: "device-manager",
41852
41818
  capScope: "system",
@@ -41859,12 +41825,6 @@ Object.freeze({
41859
41825
  addonId: null,
41860
41826
  access: "view"
41861
41827
  },
41862
- "deviceManager.getDeviceSettingsContribution": {
41863
- capName: "device-manager",
41864
- capScope: "system",
41865
- addonId: null,
41866
- access: "view"
41867
- },
41868
41828
  "deviceManager.getDeviceStatusAggregate": {
41869
41829
  capName: "device-manager",
41870
41830
  capScope: "system",
@@ -42369,24 +42329,6 @@ Object.freeze({
42369
42329
  addonId: null,
42370
42330
  access: "view"
42371
42331
  },
42372
- "doorbell.applyDeviceSettingsPatch": {
42373
- capName: "doorbell",
42374
- capScope: "device",
42375
- addonId: null,
42376
- access: "create"
42377
- },
42378
- "doorbell.getDeviceLiveContribution": {
42379
- capName: "doorbell",
42380
- capScope: "device",
42381
- addonId: null,
42382
- access: "view"
42383
- },
42384
- "doorbell.getDeviceSettingsContribution": {
42385
- capName: "doorbell",
42386
- capScope: "device",
42387
- addonId: null,
42388
- access: "view"
42389
- },
42390
42332
  "doorbell.getStatus": {
42391
42333
  capName: "doorbell",
42392
42334
  capScope: "device",
@@ -50111,6 +50053,21 @@ TimelapseRuleInputSchema.extend({
50111
50053
  createdAt: number(),
50112
50054
  updatedAt: number()
50113
50055
  });
50056
+ /** True when `model` ships a build for `format`. */
50057
+ function hasBuild(model, format) {
50058
+ return Boolean(model.formats[format]);
50059
+ }
50060
+ /**
50061
+ * Can a pool of `format` run a step whose catalog is `models`, given the model
50062
+ * the step names (`null`/absent = unpinned, the format default)?
50063
+ */
50064
+ function stepModelRunsOnFormat(models, modelId, format) {
50065
+ if (modelId !== void 0 && modelId !== null) {
50066
+ const named = models.find((m) => m.id === modelId);
50067
+ if (named !== void 0 && hasBuild(named, format)) return true;
50068
+ }
50069
+ return models.some((m) => m.legacy !== true && hasBuild(m, format));
50070
+ }
50114
50071
  var DETAIL_CROP_PADDING_KEY = "detailCropPaddingRatio";
50115
50072
  var DETAIL_CROP_SQUARE_KEY = "detailCropSquare";
50116
50073
  /**
@@ -51389,6 +51346,12 @@ Object.defineProperty(exports, "CLIP_STREAM_TRANSPORT_HEADER", {
51389
51346
  return CLIP_STREAM_TRANSPORT_HEADER;
51390
51347
  }
51391
51348
  });
51349
+ Object.defineProperty(exports, "CLUSTER_MODEL_SCOPED_STEPS", {
51350
+ enumerable: true,
51351
+ get: function() {
51352
+ return CLUSTER_MODEL_SCOPED_STEPS;
51353
+ }
51354
+ });
51392
51355
  Object.defineProperty(exports, "COCO_80_LABELS", {
51393
51356
  enumerable: true,
51394
51357
  get: function() {
@@ -51413,12 +51376,6 @@ Object.defineProperty(exports, "DEFAULT_AUDIO_ANALYZER_CONFIG", {
51413
51376
  return DEFAULT_AUDIO_ANALYZER_CONFIG;
51414
51377
  }
51415
51378
  });
51416
- Object.defineProperty(exports, "DEFAULT_CLUSTER_STEP_MODELS", {
51417
- enumerable: true,
51418
- get: function() {
51419
- return DEFAULT_CLUSTER_STEP_MODELS;
51420
- }
51421
- });
51422
51379
  Object.defineProperty(exports, "DEFAULT_CLUSTER_STEP_SETTINGS", {
51423
51380
  enumerable: true,
51424
51381
  get: function() {
@@ -52001,12 +51958,6 @@ Object.defineProperty(exports, "parseProfileBrokerId", {
52001
51958
  return parseProfileBrokerId;
52002
51959
  }
52003
51960
  });
52004
- Object.defineProperty(exports, "pickClusterStepModels", {
52005
- enumerable: true,
52006
- get: function() {
52007
- return pickClusterStepModels;
52008
- }
52009
- });
52010
51961
  Object.defineProperty(exports, "pickClusterStepSettings", {
52011
51962
  enumerable: true,
52012
51963
  get: function() {
@@ -52019,12 +51970,6 @@ Object.defineProperty(exports, "pickDetailCropConvention", {
52019
51970
  return pickDetailCropConvention;
52020
51971
  }
52021
51972
  });
52022
- Object.defineProperty(exports, "pickInvalidClusterStepModels", {
52023
- enumerable: true,
52024
- get: function() {
52025
- return pickInvalidClusterStepModels;
52026
- }
52027
- });
52028
51973
  Object.defineProperty(exports, "pickNativeLeaseOverride", {
52029
51974
  enumerable: true,
52030
51975
  get: function() {
@@ -52139,6 +52084,12 @@ Object.defineProperty(exports, "sleep", {
52139
52084
  return sleep;
52140
52085
  }
52141
52086
  });
52087
+ Object.defineProperty(exports, "stepModelRunsOnFormat", {
52088
+ enumerable: true,
52089
+ get: function() {
52090
+ return stepModelRunsOnFormat;
52091
+ }
52092
+ });
52142
52093
  Object.defineProperty(exports, "storageEvictableCapability", {
52143
52094
  enumerable: true,
52144
52095
  get: function() {
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-8up-f2TX.js");
5
+ const require_dist = require("../dist-L_HlB0At.js");
6
6
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Et as motionDetectionCapability, cn as BaseAddon, fn as DeviceType, lt as evaluateZoneRules, vn as hydrateSchema } from "../dist-CCd0Q3nr.mjs";
1
+ import { Et as motionDetectionCapability, _n as hydrateSchema, dn as DeviceType, lt as evaluateZoneRules, sn as BaseAddon } from "../dist-DVz_88D_.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";