@camstack/system 1.2.455 → 1.2.457

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 (133) hide show
  1. package/dist/addon-runner.js +96 -10
  2. package/dist/addon-runner.mjs +96 -10
  3. package/dist/{agent-https-CLWrOO3o.mjs → agent-https-CK9Z4sSR.mjs} +32 -5
  4. package/dist/{agent-https-CCvlRQKV.js → agent-https-CoyOZ3pC.js} +37 -4
  5. package/dist/auth/auth-manager.d.ts +9 -0
  6. package/dist/auth/legacy-token-tables.d.ts +16 -0
  7. package/dist/auth/user-management-internal.d.ts +9 -28
  8. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  10. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  11. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  12. package/dist/builtins/alerts/alerts.addon.js +2 -2
  13. package/dist/builtins/alerts/alerts.addon.mjs +2 -2
  14. package/dist/builtins/autotrack/index.js +1 -1
  15. package/dist/builtins/autotrack/index.mjs +1 -1
  16. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  17. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  18. package/dist/builtins/calendars/calendars.addon.js +1 -1
  19. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  20. package/dist/builtins/camera-grid/index.js +1 -1
  21. package/dist/builtins/camera-grid/index.mjs +1 -1
  22. package/dist/builtins/composer/composer.addon.js +2 -2
  23. package/dist/builtins/composer/composer.addon.mjs +2 -2
  24. package/dist/builtins/console-logging/console-destination.d.ts +1 -2
  25. package/dist/builtins/console-logging/index.js +1 -4
  26. package/dist/builtins/console-logging/index.mjs +1 -4
  27. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  28. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  29. package/dist/builtins/device-history/capture/capture-engine.d.ts +6 -0
  30. package/dist/builtins/device-history/device-history.addon.js +441 -83
  31. package/dist/builtins/device-history/device-history.addon.mjs +441 -83
  32. package/dist/builtins/device-history/query/history-query.d.ts +35 -9
  33. package/dist/builtins/device-history/query/point-shape.d.ts +33 -0
  34. package/dist/builtins/device-history/retention/retention.d.ts +1 -1
  35. package/dist/builtins/device-history/rollup/rollup-engine.d.ts +2 -0
  36. package/dist/builtins/device-history/rollup/rollup-math.d.ts +6 -0
  37. package/dist/builtins/device-history/store/history-store.d.ts +7 -0
  38. package/dist/builtins/device-history/store/series-registry.d.ts +26 -1
  39. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  40. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  41. package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +1 -2
  42. package/dist/builtins/hub-forwarder/index.js +1 -4
  43. package/dist/builtins/hub-forwarder/index.mjs +1 -4
  44. package/dist/builtins/keychain/index.js +4 -4
  45. package/dist/builtins/keychain/index.mjs +4 -4
  46. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  47. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  48. package/dist/builtins/local-auth/auth-schema.d.ts +4 -7
  49. package/dist/builtins/local-auth/local-auth.addon.d.ts +7 -8
  50. package/dist/builtins/local-auth/local-auth.addon.js +1086 -1329
  51. package/dist/builtins/local-auth/local-auth.addon.mjs +1085 -1326
  52. package/dist/builtins/local-auth/preferences-record-kinds.d.ts +27 -0
  53. package/dist/builtins/local-auth/record-kinds.d.ts +4 -3
  54. package/dist/builtins/local-auth/user-preferences-store.d.ts +56 -0
  55. package/dist/builtins/local-network/local-network.addon.d.ts +8 -0
  56. package/dist/builtins/local-network/local-network.addon.js +30 -5
  57. package/dist/builtins/local-network/local-network.addon.mjs +30 -5
  58. package/dist/builtins/loki-logging/index.js +323 -7
  59. package/dist/builtins/loki-logging/index.mjs +323 -7
  60. package/dist/builtins/loki-logging/loki-destination.d.ts +20 -3
  61. package/dist/builtins/loki-logging/loki-read.d.ts +51 -0
  62. package/dist/builtins/native-metrics/native-metrics.addon.js +290 -112
  63. package/dist/builtins/native-metrics/native-metrics.addon.mjs +290 -112
  64. package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +106 -35
  65. package/dist/builtins/platform-probe/index.js +1 -1
  66. package/dist/builtins/platform-probe/index.mjs +1 -1
  67. package/dist/builtins/record-entries/index.js +1 -1
  68. package/dist/builtins/record-entries/index.mjs +1 -1
  69. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  70. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  71. package/dist/builtins/snapshot/index.js +1 -1
  72. package/dist/builtins/snapshot/index.mjs +1 -1
  73. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  74. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  75. package/dist/builtins/sqlite-storage/index.js +1 -1
  76. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  77. package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +1 -0
  78. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +13 -0
  79. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +52 -6
  80. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +52 -6
  81. package/dist/builtins/storage-orchestrator/location-history-recorder.d.ts +76 -0
  82. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +9 -0
  83. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +144 -1
  84. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +144 -1
  85. package/dist/builtins/system-config/system-config.addon.js +3 -3
  86. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  87. package/dist/builtins/winston-logging/index.js +165 -3
  88. package/dist/builtins/winston-logging/index.mjs +165 -3
  89. package/dist/builtins/winston-logging/log-file-cursor.d.ts +12 -0
  90. package/dist/builtins/winston-logging/log-file-index-store.d.ts +11 -0
  91. package/dist/builtins/winston-logging/log-file-index.d.ts +77 -0
  92. package/dist/builtins/winston-logging/log-file-read-client.d.ts +44 -0
  93. package/dist/builtins/winston-logging/log-file-read-protocol.d.ts +41 -0
  94. package/dist/builtins/winston-logging/log-file-read-worker.d.ts +1 -0
  95. package/dist/builtins/winston-logging/log-file-reader.d.ts +51 -0
  96. package/dist/builtins/winston-logging/winston-destination.d.ts +20 -2
  97. package/dist/{composition-sources-CSzD5_qX.mjs → composition-sources-B_jeZDRJ.mjs} +1 -1
  98. package/dist/{composition-sources-BxUkLNSo.js → composition-sources-qKyvMAvc.js} +1 -1
  99. package/dist/{constants-DruwCkfp.js → constants-B_X9cWEK.js} +1 -1
  100. package/dist/{constants-DOlYt1t1.mjs → constants-cxKcZRMi.mjs} +1 -1
  101. package/dist/{device-ca-uFbTyY_o.mjs → device-ca-BB6nHAL5.mjs} +1 -1
  102. package/dist/{device-ca-QPBgfqVY.js → device-ca-CVK3YcR_.js} +1 -1
  103. package/dist/{dist-DjQ8C-ku.js → dist-C89nqNnn.js} +721 -154
  104. package/dist/{dist-BpSENkRJ.mjs → dist-Dhux90yB.mjs} +668 -155
  105. package/dist/file-host-worker.js +1 -1
  106. package/dist/file-host-worker.mjs +1 -1
  107. package/dist/{hub-mdns-ciao-DlgkFJVY.mjs → hub-mdns-ciao-B8olZqqd.mjs} +20 -13
  108. package/dist/{hub-mdns-ciao-Bkrvgnma.js → hub-mdns-ciao-DB1Y9agt.js} +20 -13
  109. package/dist/index.d.ts +3 -4
  110. package/dist/index.js +145 -24
  111. package/dist/index.mjs +138 -22
  112. package/dist/kernel/config-schema.d.ts +5 -0
  113. package/dist/kernel/moleculer/accessory-prune-gate.d.ts +55 -0
  114. package/dist/log-file-read-protocol-B7M3X3bT.mjs +785 -0
  115. package/dist/log-file-read-protocol-D0WcLbIV.js +817 -0
  116. package/dist/log-file-read-worker.js +64 -0
  117. package/dist/log-file-read-worker.mjs +64 -0
  118. package/dist/log-read-filter-Bi066jwU.js +134 -0
  119. package/dist/log-read-filter-D7Ev3zm-.mjs +93 -0
  120. package/dist/logging/log-manager.d.ts +10 -6
  121. package/dist/logging/log-read-filter.d.ts +43 -0
  122. package/dist/{phase6-declare-gate-DrmTtz7F.js → phase6-declare-gate-BO-_jLh_.js} +1 -1
  123. package/dist/{phase6-declare-gate-JQUqgQgq.mjs → phase6-declare-gate-x9ZCbQJP.mjs} +1 -1
  124. package/dist/{restore-archive-4OP0EYg6.js → restore-archive-4DOUR5Gu.js} +1 -1
  125. package/dist/{restore-archive-YFSJRtKy.mjs → restore-archive-DyOaPeAr.mjs} +1 -1
  126. package/dist/tls/cert-issue.d.ts +16 -1
  127. package/dist/tls/cert-manager.d.ts +6 -0
  128. package/dist/tls/index.d.ts +1 -1
  129. package/dist/{wal-maintenance-TyuOEVy1.mjs → wal-maintenance-BMiX6UIa.mjs} +0 -0
  130. package/dist/{wal-maintenance-Bl0ZKjVR.js → wal-maintenance-DVN-DiVP.js} +0 -0
  131. package/package.json +1 -1
  132. package/dist/auth/admin-token-manager.d.ts +0 -51
  133. package/dist/auth/scoped-token-manager.d.ts +0 -25
@@ -745,7 +745,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
745
745
  return EventCategory;
746
746
  }({});
747
747
  //#endregion
748
- //#region ../types/dist/sleep-BxjU_fJM.mjs
748
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
749
749
  /**
750
750
  * The audio chunk plane's byte format, and the ONE expansion from a coded
751
751
  * window to float samples (D455).
@@ -3258,9 +3258,9 @@ function normalizeAddonInitResult(result) {
3258
3258
  */
3259
3259
  var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
3260
3260
  /**
3261
- * The share-view scope kinds a `csv_*` share token can carry. The hub mints
3262
- * and validates them (`share-token.service.ts` builds its enum from this
3263
- * list); a data plane names the kinds it ACCEPTS in `share`.
3261
+ * The share-view scope kinds a share-link token can carry. The hub mints
3262
+ * and validates them (`ShareViewGrantSchema` builds its
3263
+ * enum from this list); a data plane names the kinds it ACCEPTS in `share`.
3264
3264
  */
3265
3265
  var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
3266
3266
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
@@ -10420,7 +10420,7 @@ function scopesAllowAddon(scopes, addonId, access) {
10420
10420
  * `super_admin` — collapsed onto the single boolean because every
10421
10421
  * non-admin caller is governed by the same scope-check rules; the
10422
10422
  * distinction was only ever used to route role-specific procedures
10423
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
10423
+ * which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
10424
10424
  * with `isAdmin: false` + an explicit scope list.
10425
10425
  */
10426
10426
  /** Per-method access flavour. Materialised on every cap method via codegen. */
@@ -10609,24 +10609,117 @@ var AddonRoutesScopeSchema = z.object({
10609
10609
  type: z.literal("addon-routes"),
10610
10610
  access: z.array(MethodAccessSchema).min(1)
10611
10611
  });
10612
+ var PreferencesSelfScopeSchema = z.object({ type: z.literal("preferences-self") });
10612
10613
  var CredentialScopeSchema = z.union([
10613
10614
  z.literal("*"),
10614
10615
  ShareViewScopeSchema,
10615
10616
  AddonRoutesScopeSchema,
10617
+ PreferencesSelfScopeSchema,
10616
10618
  TokenScopeSchema
10617
10619
  ]);
10618
10620
  /**
10621
+ * The `kind` claim of a unified token. It names the TOKEN FAMILY (so every
10622
+ * older gate that classifies a hub JWT refuses it — `classifyBearerPrincipal`
10623
+ * treats any `kind` it does not know as not-a-credential), never what the
10624
+ * token may do: that is its `scopes`, and only its `scopes`.
10625
+ */
10626
+ var CREDENTIAL_TOKEN_KIND = "credential";
10627
+ /**
10628
+ * The `aud` claim every minted token is signed with (D895). The hub's raw JWT
10629
+ * verify (`AuthManager.verifyToken`, used by every surface that wants a LOGIN
10630
+ * session — the OAuth consent page, the session cookie, health, backups)
10631
+ * refuses a token carrying it, so a minted token — a share link above all —
10632
+ * can never be replayed as a person's session. Only the credential verifier's
10633
+ * own door (`verifyCredentialToken`) accepts it.
10634
+ */
10635
+ var CREDENTIAL_TOKEN_AUDIENCE = "camstack:credential";
10636
+ /** Does a verified JWT payload belong to the minted-token family? */
10637
+ function isCredentialTokenPayload(payload) {
10638
+ if (payload === null || typeof payload !== "object") return false;
10639
+ const kind = Reflect.get(payload, "kind");
10640
+ const aud = Reflect.get(payload, "aud");
10641
+ return kind === "credential" || aud === "camstack:credential" || Array.isArray(aud) && aud.includes("camstack:credential");
10642
+ }
10643
+ /**
10619
10644
  * The claims of a unified token (`auth.mintToken`). It carries no `exp`: its
10620
10645
  * row (looked up by `jti` on every verify, for revocation) holds the ONE
10621
10646
  * expiry, so a share link can be extended and a JWT clock can never disagree
10622
10647
  * with the row.
10623
10648
  */
10624
10649
  var CredentialTokenClaimsSchema = z.object({
10625
- kind: z.literal("credential"),
10650
+ kind: z.literal(CREDENTIAL_TOKEN_KIND),
10626
10651
  sub: z.string().min(1),
10627
10652
  jti: z.string().min(16),
10628
10653
  scopes: z.array(CredentialScopeSchema).min(1)
10629
10654
  });
10655
+ /**
10656
+ * Per-user ACCOUNT preferences (D894): the hub-side half of the viewer's two
10657
+ * settings levels.
10658
+ *
10659
+ * - DEVICE settings never leave the phone.
10660
+ * - ACCOUNT settings live here: one row per `(user, namespace)`, private to
10661
+ * that user, synced across every device signed in as them, last write wins
10662
+ * unless the writer sends the revision it based its edit on.
10663
+ *
10664
+ * A setting lives in exactly ONE level; there are no overrides. The caller
10665
+ * never names a user: the hub stamps the principal's own id, admin included.
10666
+ *
10667
+ * The contract the client codes against is the `preferences.*` tRPC router
10668
+ * (`server/backend/src/api/core/preferences.router.ts`).
10669
+ */
10670
+ /** `viewer.app`, `viewer.cameras`, `viewer.grids` … — lowercase, dot/dash separated. */
10671
+ var PREFERENCES_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/;
10672
+ /** One row's value, measured as UTF-8 JSON. */
10673
+ var PREFERENCES_MAX_VALUE_BYTES = 256 * 1024;
10674
+ var PreferenceNamespaceSchema = z.string().regex(PREFERENCES_NAMESPACE_PATTERN);
10675
+ /** A namespace's value: a JSON object, opaque to the hub. */
10676
+ var PreferenceValueSchema = z.record(z.string(), z.unknown());
10677
+ var PreferenceDeviceIdSchema = z.string().min(1).max(64);
10678
+ /** A stored row, as the owner reads it. */
10679
+ var PreferenceRowSchema = z.object({
10680
+ namespace: PreferenceNamespaceSchema,
10681
+ value: PreferenceValueSchema,
10682
+ /** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
10683
+ revision: z.number().int().positive(),
10684
+ updatedAt: z.number().int(),
10685
+ /** The client id the last writer sent; `null` when it sent none. */
10686
+ updatedByDevice: PreferenceDeviceIdSchema.nullable()
10687
+ });
10688
+ z.object({
10689
+ /** Absent: every namespace the caller holds. */
10690
+ namespaces: z.array(PreferenceNamespaceSchema).max(32).optional() });
10691
+ z.object({ rows: z.array(PreferenceRowSchema) });
10692
+ z.object({
10693
+ namespace: PreferenceNamespaceSchema,
10694
+ value: PreferenceValueSchema,
10695
+ /**
10696
+ * The revision the edit was based on. Absent: last write wins. `0`: the
10697
+ * namespace must not exist yet. Any other value that is not the current
10698
+ * revision answers `conflict` and writes nothing.
10699
+ */
10700
+ baseRevision: z.number().int().nonnegative().optional(),
10701
+ deviceId: PreferenceDeviceIdSchema.optional()
10702
+ });
10703
+ z.discriminatedUnion("status", [z.object({
10704
+ status: z.literal("saved"),
10705
+ row: PreferenceRowSchema
10706
+ }), z.object({
10707
+ status: z.literal("conflict"),
10708
+ current: PreferenceRowSchema.nullable()
10709
+ })]);
10710
+ z.object({ namespace: PreferenceNamespaceSchema });
10711
+ z.object({
10712
+ /** `false` when the namespace did not exist. */
10713
+ deleted: z.boolean() });
10714
+ z.object({
10715
+ /** The revision the client holds per namespace; a namespace it does not list is new to it. */
10716
+ revisionByNamespace: z.record(PreferenceNamespaceSchema, z.number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
10717
+ z.object({
10718
+ /** Every row whose revision differs from the client's, and every row it did not list. */
10719
+ rows: z.array(PreferenceRowSchema),
10720
+ /** Namespaces the client listed that no longer exist. */
10721
+ deleted: z.array(PreferenceNamespaceSchema)
10722
+ });
10630
10723
  z.enum(["new-session", "step-up"]);
10631
10724
  /** The languages the hub's app landing pages are written in (D858). */
10632
10725
  var AppPageLangSchema = z.enum(["en", "it"]);
@@ -17655,11 +17748,30 @@ var DeviceHistorySubjectSchema = z.discriminatedUnion("kind", [z.object({
17655
17748
  kind: z.literal("node"),
17656
17749
  nodeId: z.string().min(1)
17657
17750
  })]);
17751
+ /**
17752
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17753
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17754
+ * meaning); a rollup keeps the time spent in each state (`states`).
17755
+ */
17658
17756
  var DeviceHistoryKindSchema = z.enum([
17757
+ "gauge",
17758
+ "counter",
17759
+ "boolean",
17760
+ "enum"
17761
+ ]);
17762
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17763
+ var DeviceHistoryProducerKindSchema = z.enum([
17659
17764
  "gauge",
17660
17765
  "counter",
17661
17766
  "boolean"
17662
17767
  ]);
17768
+ /**
17769
+ * A key computed at READ time from stored series of the same device, never
17770
+ * stored itself. Energy (kWh per bucket) comes from the power meter's
17771
+ * `kwhTotal` counter when the device has one, else from integrating its
17772
+ * `watts` gauge over time.
17773
+ */
17774
+ var DEVICE_HISTORY_ENERGY_KEY = "derived:energy.kwh";
17663
17775
  var DeviceHistoryResolutionSchema = z.enum([
17664
17776
  "raw",
17665
17777
  "5m",
@@ -17692,7 +17804,13 @@ var SeriesInfoSchema = z.object({
17692
17804
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17693
17805
  unit: z.string().nullable(),
17694
17806
  displayName: z.string(),
17695
- source: z.enum(["cap", "addon"]),
17807
+ source: z.enum([
17808
+ "cap",
17809
+ "addon",
17810
+ "derived"
17811
+ ]),
17812
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17813
+ values: z.array(z.string()).readonly().nullable(),
17696
17814
  firstTs: z.number(),
17697
17815
  lastTs: z.number()
17698
17816
  });
@@ -17706,17 +17824,31 @@ var QueryPointSchema = z.object({
17706
17824
  twMean: z.number().nullable(),
17707
17825
  min: z.number(),
17708
17826
  max: z.number(),
17709
- /** `null` is unknown, never zero (D393). */
17710
- last: z.number().nullable()
17827
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17828
+ last: z.number().nullable(),
17829
+ /**
17830
+ * The increase over the point: a `counter`'s growth since the previous point
17831
+ * or bucket (a drop is a reset, counted from zero), and for
17832
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17833
+ * every other kind, and when it cannot be known.
17834
+ */
17835
+ delta: z.number().nullable(),
17836
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17837
+ state: z.string().nullable(),
17838
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17839
+ states: z.record(z.string(), z.number()).nullable()
17711
17840
  });
17712
17841
  var QuerySeriesSchema = z.object({
17713
17842
  scope: z.string(),
17714
17843
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17715
17844
  before: z.object({
17716
17845
  t: z.number(),
17717
- value: z.number().nullable()
17846
+ value: z.number().nullable(),
17847
+ state: z.string().nullable()
17718
17848
  }).nullable(),
17719
- points: z.array(QueryPointSchema).readonly()
17849
+ points: z.array(QueryPointSchema).readonly(),
17850
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17851
+ derivedFrom: z.string().nullable()
17720
17852
  });
17721
17853
  /** The window part of a query, shared by the device and node forms. */
17722
17854
  var QueryWindowShape = {
@@ -17732,6 +17864,23 @@ var QueryResultSchema = z.object({
17732
17864
  series: z.array(QuerySeriesSchema).readonly(),
17733
17865
  truncated: z.boolean()
17734
17866
  });
17867
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17868
+ var QueryManyItemSchema = z.union([z.object({
17869
+ deviceId: z.number().int(),
17870
+ key: z.string(),
17871
+ scope: z.string().optional()
17872
+ }), z.object({
17873
+ forNodeId: z.string().min(1),
17874
+ key: z.string(),
17875
+ scope: z.string().optional()
17876
+ })]);
17877
+ var QueryManyEntrySchema = z.discriminatedUnion("ok", [z.object({
17878
+ ok: z.literal(true),
17879
+ result: QueryResultSchema
17880
+ }), z.object({
17881
+ ok: z.literal(false),
17882
+ error: z.string()
17883
+ })]);
17735
17884
  var TierStatusSchema = z.object({
17736
17885
  tier: DeviceHistoryResolutionSchema,
17737
17886
  /** `null` until the first background count answered. */
@@ -17800,26 +17949,45 @@ var deviceHistoryCapability = {
17800
17949
  * `listNodeSeries` / `queryNode`.
17801
17950
  */
17802
17951
  listSeries: method(z.object({ deviceId: z.number().int() }), z.array(SeriesInfoSchema).readonly()),
17803
- listNodeSeries: method(z.object({ nodeId: z.string().min(1) }), z.array(SeriesInfoSchema).readonly(), { auth: "admin" }),
17952
+ /**
17953
+ * A NODE's series. The subject is `forNodeId`, never `nodeId`: a top-level
17954
+ * `nodeId` is the cap ROUTING key, and `nodeId: 'little-unraid'` sent the
17955
+ * read to that agent, which hosts no device-history.
17956
+ */
17957
+ listNodeSeries: method(z.object({ forNodeId: z.string().min(1) }), z.array(SeriesInfoSchema).readonly(), { auth: "admin" }),
17804
17958
  /**
17805
17959
  * One series (or every scope of it) at one resolution. `auto` picks the
17806
17960
  * finest tier whose retention covers `from` and whose point count fits
17807
17961
  * `maxPoints`; when even the coarsest tier does not fit, the newest
17808
- * `maxPoints` points are returned and `truncated` is true.
17962
+ * `maxPoints` points are returned and `truncated` is true. A series fed by
17963
+ * closed buckets has no raw rows, so `auto` never answers it from raw; nor
17964
+ * {@link DEVICE_HISTORY_ENERGY_KEY}, which is computed from rollups.
17809
17965
  */
17810
17966
  query: method(z.object({
17811
17967
  deviceId: z.number().int(),
17812
17968
  ...QueryWindowShape
17813
17969
  }), QueryResultSchema),
17814
17970
  queryNode: method(z.object({
17815
- nodeId: z.string().min(1),
17971
+ forNodeId: z.string().min(1),
17816
17972
  ...QueryWindowShape
17817
17973
  }), QueryResultSchema, { auth: "admin" }),
17974
+ /**
17975
+ * Several reads over ONE window, answered in order (one entry per item).
17976
+ * Admin-only: its subjects are nested in `items`, where the device scope
17977
+ * gate cannot see them — a principal limited to one device uses `query`.
17978
+ */
17979
+ queryMany: method(z.object({
17980
+ items: z.array(QueryManyItemSchema).min(1).max(24),
17981
+ from: QueryWindowShape.from,
17982
+ to: QueryWindowShape.to,
17983
+ resolution: QueryWindowShape.resolution,
17984
+ maxPoints: QueryWindowShape.maxPoints
17985
+ }), z.object({ results: z.array(QueryManyEntrySchema).readonly() }), { auth: "admin" }),
17818
17986
  /** Producer: declare (idempotent) a series key this addon owns: `addon:<callerAddonId>/<name>`. */
17819
17987
  declareSeries: method(z.object({
17820
17988
  name: z.string().regex(/^[a-z0-9-]+$/),
17821
17989
  subjectKind: z.enum(["device", "node"]),
17822
- kind: DeviceHistoryKindSchema,
17990
+ kind: DeviceHistoryProducerKindSchema,
17823
17991
  unit: z.string().optional(),
17824
17992
  displayName: z.string().min(1),
17825
17993
  ingest: z.enum(["points", "buckets"])
@@ -42223,38 +42391,37 @@ var llmRuntimeCapability = {
42223
42391
  })
42224
42392
  }
42225
42393
  };
42394
+ var LlmProfileKindSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
42395
+ /** What a model (or, by default, every model of a kind) can do. */
42396
+ var LlmModelFeaturesSchema = z.object({
42397
+ vision: z.boolean(),
42398
+ tools: z.boolean(),
42399
+ streaming: z.boolean()
42400
+ });
42401
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
42402
+ var LlmModelInfoSchema = z.object({
42403
+ id: z.string(),
42404
+ label: z.string().optional(),
42405
+ contextLength: z.number().int().positive().optional(),
42406
+ features: LlmModelFeaturesSchema.partial().optional()
42407
+ });
42226
42408
  /**
42227
- * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
42228
- * methods concat-fan across providers; single-row methods route to ONE
42229
- * provider by the `addonId` in the call input (the notification-output
42230
- * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
42231
- * (hub-placed); the cap stays open for future providers.
42232
- *
42233
- * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
42234
- * `apiKey` is a password field — providers REDACT it on read and merge on
42235
- * write; a stored key NEVER round-trips to a client.
42236
- */
42237
- var LlmProfileKindSchema = z.enum([
42238
- "openai-compatible",
42239
- "openai",
42240
- "anthropic",
42241
- "google",
42242
- "managed-local",
42243
- "apple-foundation"
42244
- ]);
42409
+ * The provider-specific part of a profile, validated by the provider that owns
42410
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
42411
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
42412
+ * keychain, never in the row, and reads back as the redaction marker.
42413
+ */
42414
+ var LlmProviderConfigSchema = z.record(z.string(), z.unknown());
42245
42415
  var LlmProfileSchema = z.object({
42246
42416
  id: z.string(),
42247
42417
  name: z.string(),
42418
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
42248
42419
  kind: LlmProfileKindSchema,
42249
42420
  /** Stamped by the provider — keeps the fanned catalog routable. */
42250
42421
  addonId: z.string(),
42251
42422
  enabled: z.boolean(),
42252
42423
  /** Vendor model id, or the managed runtime's loaded model. */
42253
42424
  model: z.string(),
42254
- /** Required for openai-compatible; override for cloud kinds. */
42255
- baseUrl: z.string().optional(),
42256
- /** ConfigUISchema type:'password' — never round-trips (spec §5). */
42257
- apiKey: z.string().optional(),
42258
42425
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
42259
42426
  * degraded to text — that shipped once and produced a confident answer to a
42260
42427
  * question about a picture nobody sent. */
@@ -42262,15 +42429,11 @@ var LlmProfileSchema = z.object({
42262
42429
  temperature: z.number().min(0).max(2).optional(),
42263
42430
  /** Nucleus sampling. Every wire we speak has it. */
42264
42431
  topP: z.number().min(0).max(1).optional(),
42265
- /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
42266
- * wire does, and the client drops it there (measured: the request body gets
42267
- * `top_p` and no `top_k`). The profile editor hides the field wherever it
42268
- * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
42432
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
42433
+ * field in its editor only when its descriptor lists it in `profileFields`. */
42269
42434
  topK: z.number().int().positive().optional(),
42270
42435
  maxTokens: z.number().int().positive().optional(),
42271
- /** Prompt context window. Advisory for cloud kinds (they enforce their own);
42272
- * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
42273
- * the model with, so it is the one field that changes a PROCESS. */
42436
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
42274
42437
  contextLength: z.number().int().positive().optional(),
42275
42438
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
42276
42439
  * two system prompts fighting is worse than either alone). */
@@ -42296,16 +42459,37 @@ var LlmProfileSchema = z.object({
42296
42459
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
42297
42460
  * `true` here buys the wiring, not behaviour, until tools are registered. */
42298
42461
  toolsEnabled: z.boolean().default(false),
42299
- extraHeaders: z.record(z.string(), z.string()).optional(),
42300
- /** kind === 'managed-local' only (spec §4). */
42301
- runtime: ManagedRuntimeConfigSchema.optional(),
42302
- /**
42303
- * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
42304
- * to configure (no key, no URL, no download; `model` is `apple-system`).
42305
- * `supportsVision` on such a row is stamped by the provider from the node's
42306
- * reported `imageInput`, never taken from the operator (D62).
42307
- */
42308
- appleFoundation: z.object({ nodeId: z.string() }).optional()
42462
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
42463
+ providerConfig: LlmProviderConfigSchema.default({})
42464
+ });
42465
+ /**
42466
+ * The common profile fields a kind's editor offers. The editor owns how each
42467
+ * one is drawn; the provider says which of them mean something on its wire.
42468
+ */
42469
+ var LlmProfileFieldSchema = z.enum([
42470
+ "temperature",
42471
+ "topP",
42472
+ "topK",
42473
+ "maxTokens",
42474
+ "contextLength",
42475
+ "systemPrompt",
42476
+ "timeoutMs",
42477
+ "connectTimeoutMs",
42478
+ "firstTokenTimeoutMs",
42479
+ "idleTimeoutMs",
42480
+ "retry",
42481
+ "toolsEnabled"
42482
+ ]);
42483
+ /**
42484
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
42485
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
42486
+ * picker: that widget owns the model choice.
42487
+ */
42488
+ var LlmProviderWidgetSchema = z.object({
42489
+ id: z.string(),
42490
+ placement: z.enum(["connection", "model"]),
42491
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
42492
+ requires: z.array(z.string()).optional()
42309
42493
  });
42310
42494
  /** ConfigUISchema tree passed through untyped on the wire (the
42311
42495
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -42314,11 +42498,56 @@ var ConfigSchemaPassthrough$3 = z.unknown();
42314
42498
  var LlmProfileKindDescriptorSchema = z.object({
42315
42499
  kind: LlmProfileKindSchema,
42316
42500
  label: z.string(),
42501
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
42317
42502
  icon: z.string(),
42318
42503
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
42319
42504
  addonId: z.string(),
42320
- configSchema: ConfigSchemaPassthrough$3
42505
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
42506
+ connectionSchema: ConfigSchemaPassthrough$3,
42507
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
42508
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
42509
+ /** The kind's defaults; a model from `listModels` may override any of them. */
42510
+ features: LlmModelFeaturesSchema,
42511
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
42512
+ visionEditable: z.boolean(),
42513
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
42514
+ modelCatalog: z.enum([
42515
+ "fetch",
42516
+ "static",
42517
+ "none"
42518
+ ]),
42519
+ staticModels: z.array(LlmModelInfoSchema).optional(),
42520
+ /** The common fields that mean something on this kind's wire. */
42521
+ profileFields: z.array(LlmProfileFieldSchema),
42522
+ providerWidgets: z.array(LlmProviderWidgetSchema).optional()
42523
+ });
42524
+ /**
42525
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
42526
+ * (the editor's form); with `profileId` too, a secret the draft leaves
42527
+ * untouched (absent or the redaction marker) is resolved server-side from the
42528
+ * stored profile — the browser never receives it.
42529
+ */
42530
+ var LlmListModelsInputSchema = z.object({
42531
+ addonId: z.string(),
42532
+ kind: LlmProfileKindSchema,
42533
+ profileId: z.string().optional(),
42534
+ connection: LlmProviderConfigSchema.optional()
42321
42535
  });
42536
+ var LlmListModelsErrorCodeSchema = z.enum([
42537
+ "auth",
42538
+ "network",
42539
+ "unsupported",
42540
+ "invalid"
42541
+ ]);
42542
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
42543
+ var LlmListModelsResultSchema = z.discriminatedUnion("ok", [z.object({
42544
+ ok: z.literal(true),
42545
+ models: z.array(LlmModelInfoSchema)
42546
+ }), z.object({
42547
+ ok: z.literal(false),
42548
+ code: LlmListModelsErrorCodeSchema,
42549
+ message: z.string()
42550
+ })]);
42322
42551
  var LlmDefaultSelectorSchema = z.union([z.object({ consumer: z.string() }), z.object({ purpose: z.enum(["text", "vision"]) })]);
42323
42552
  var LlmDefaultSchema = z.object({
42324
42553
  selector: LlmDefaultSelectorSchema,
@@ -42449,8 +42678,17 @@ var llmCapability = {
42449
42678
  auth: "admin",
42450
42679
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
42451
42680
  }),
42452
- /** Live vendor enumeration (GET /models etc.). */
42453
- listModels: method(ProfileRefInputSchema, z.array(z.string())),
42681
+ /**
42682
+ * The models a kind offers, for a SAVED profile or an unsaved draft
42683
+ * (`connection`). A mutation, not a query: a draft may carry a key, and a
42684
+ * query's input travels in the URL. Admin: it dials whatever endpoint the
42685
+ * draft names and may resolve a stored key to do it. The answer never
42686
+ * carries a secret — failures are a typed result, never a throw.
42687
+ */
42688
+ listModels: method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
42689
+ kind: "mutation",
42690
+ auth: "admin"
42691
+ }),
42454
42692
  getDefaults: method(z.object({}), z.array(LlmDefaultSchema)),
42455
42693
  setDefault: method(z.object({
42456
42694
  selector: LlmDefaultSelectorSchema,
@@ -42676,6 +42914,103 @@ var LogEntrySchema = z.object({
42676
42914
  meta: z.record(z.string(), z.unknown()).optional(),
42677
42915
  tags: z.record(z.string(), z.string()).optional()
42678
42916
  });
42917
+ /**
42918
+ * A history READ against one destination (D898).
42919
+ *
42920
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
42921
+ * browser applied after the limit is what made a rare device's lines
42922
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
42923
+ * minted (opaque to everyone else): a file position for the rotated files, a
42924
+ * nanosecond timestamp for Loki.
42925
+ *
42926
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
42927
+ * store answers `done: false` with the cursor it reached and the bytes it
42928
+ * scanned, and the caller decides whether to go on. That is what makes a long
42929
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
42930
+ * flight, and not asking for the next slice ends the scan.
42931
+ */
42932
+ var LogReadQuerySchema = z.object({
42933
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
42934
+ requestId: z.string().min(1).max(64).optional(),
42935
+ /** The device the line is about (`tags.deviceId`, numeric). */
42936
+ deviceId: z.number().int().optional(),
42937
+ /**
42938
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
42939
+ * match. Not `addonId`: a cap router reads that name as "which provider".
42940
+ */
42941
+ fromAddonId: z.string().min(1).max(200).optional(),
42942
+ /**
42943
+ * The emitting node: matches the agent that emitted the line, the node
42944
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
42945
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
42946
+ * name as "which node's provider".
42947
+ */
42948
+ fromNodeId: z.string().min(1).max(200).optional(),
42949
+ /** Any other tag, exact match (AND). */
42950
+ tags: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
42951
+ /** Severity FLOOR: this level and above. */
42952
+ level: LogLevelSchema.optional(),
42953
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
42954
+ text: z.string().min(1).max(200).optional(),
42955
+ /** Epoch ms, inclusive. */
42956
+ since: z.number().optional(),
42957
+ /** Epoch ms, inclusive. */
42958
+ until: z.number().optional(),
42959
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
42960
+ before: z.string().min(1).max(1024).optional(),
42961
+ /** Newer than this cursor (exclusive). */
42962
+ after: z.string().min(1).max(1024).optional(),
42963
+ limit: z.number().int().min(1).max(1e3).optional(),
42964
+ /** Wall-clock bound of this slice. The provider caps it. */
42965
+ budgetMs: z.number().int().min(50).max(1e4).optional()
42966
+ });
42967
+ var LogReadEntrySchema = z.object({
42968
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
42969
+ id: z.string().optional(),
42970
+ /** Epoch ms. */
42971
+ timestamp: z.number(),
42972
+ level: LogLevelSchema,
42973
+ scope: z.string().optional(),
42974
+ message: z.string(),
42975
+ tags: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
42976
+ meta: z.record(z.string(), z.unknown()).optional()
42977
+ });
42978
+ var LogReadResultSchema = z.object({
42979
+ /** Newest first. */
42980
+ entries: z.array(LogReadEntrySchema),
42981
+ /** Pass as `before` for the next older page; null when nothing older exists. */
42982
+ nextBefore: z.string().nullable(),
42983
+ /** Pass as `after` to read what arrived since; null when unknown. */
42984
+ nextAfter: z.string().nullable(),
42985
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
42986
+ scannedBytes: z.number().int().nonnegative(),
42987
+ /**
42988
+ * True when the scan in this direction reached the end of the store.
42989
+ * False with fewer than `limit` entries means the budget ran out first —
42990
+ * call again with `nextBefore` to go on.
42991
+ */
42992
+ done: z.boolean(),
42993
+ /** True when `cancelRead` ended this slice early. */
42994
+ cancelled: z.boolean().optional()
42995
+ });
42996
+ var LogReadCapabilitiesSchema = z.object({
42997
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
42998
+ readable: z.boolean(),
42999
+ /** Why not, when `readable` is false — rendered next to the source. */
43000
+ reason: z.string().nullable(),
43001
+ /** Filters the provider applies itself. A false one is applied by nobody. */
43002
+ filters: z.object({
43003
+ deviceId: z.boolean(),
43004
+ addonId: z.boolean(),
43005
+ nodeId: z.boolean(),
43006
+ tags: z.boolean(),
43007
+ level: z.boolean(),
43008
+ text: z.boolean(),
43009
+ timeRange: z.boolean()
43010
+ }),
43011
+ /** How far back the store reaches, when the provider knows (days). */
43012
+ retentionDays: z.number().nullable()
43013
+ });
42679
43014
  var logDestinationCapability = {
42680
43015
  name: "log-destination",
42681
43016
  scope: "system",
@@ -42683,14 +43018,13 @@ var logDestinationCapability = {
42683
43018
  internal: true,
42684
43019
  methods: {
42685
43020
  write: method(LogEntrySchema, z.void(), { kind: "mutation" }),
42686
- query: method(z.object({
42687
- scope: z.array(z.string()).optional(),
42688
- level: LogLevelSchema.optional(),
42689
- since: z.date().optional(),
42690
- until: z.date().optional(),
42691
- limit: z.number().optional(),
42692
- tags: z.record(z.string(), z.string()).optional()
42693
- }), z.array(LogEntrySchema).readonly())
43021
+ /** Absent ⇒ the destination cannot read back (same as `readable: false`). */
43022
+ describeRead: optionalMethod(z.void(), LogReadCapabilitiesSchema, { auth: "admin" }),
43023
+ read: optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }),
43024
+ cancelRead: optionalMethod(z.object({ requestId: z.string().min(1).max(64) }), z.object({ cancelled: z.boolean() }), {
43025
+ kind: "mutation",
43026
+ auth: "admin"
43027
+ })
42694
43028
  },
42695
43029
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
42696
43030
  mount: { kind: "skip" }
@@ -44600,9 +44934,11 @@ var alarmPanelCapability = {
44600
44934
  */
44601
44935
  durability: "restored",
44602
44936
  /**
44603
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
44937
+ * History (D850): the panel's lifecycle state as an `enum` series —
44938
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
44939
+ * few seconds keeps every step. Who armed it stays in the events ledger.
44604
44940
  */
44605
- history: "none",
44941
+ history: { fields: { state: { kind: "enum" } } },
44606
44942
  /** Clock fields: written, but excluded from the compare that decides
44607
44943
  * whether persisting is worth a SQLite commit. */
44608
44944
  volatileStateFields: ["lastChangedAt"]
@@ -45493,6 +45829,33 @@ var NcRuleTargetSchema = z.object({
45493
45829
  params: z.record(z.string(), z.unknown()).optional()
45494
45830
  });
45495
45831
  /**
45832
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
45833
+ *
45834
+ * Every mode starts from the same CLEAN source frame of the trigger moment
45835
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
45836
+ * to the zone that fired the rule) and renders it once at send time:
45837
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
45838
+ * colour and every OTHER track visible at that instant outlined thin, each
45839
+ * labelled with class and confidence ("dog 87%").
45840
+ * - `crop` — the subject cut out of that frame around its box at that instant.
45841
+ * - `clean` — the whole scene with nothing drawn on it.
45842
+ * - `none` — no picture.
45843
+ *
45844
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
45845
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
45846
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
45847
+ * ship a crop on one event and a boxed scene on the next depending on which
45848
+ * stored kind had landed.
45849
+ */
45850
+ var NcMediaImageSchema = z.enum([
45851
+ "scene-boxes",
45852
+ "crop",
45853
+ "clean",
45854
+ "none"
45855
+ ]);
45856
+ /**
45857
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
45858
+ *
45496
45859
  * Media attachment policy (P1 still-image subset).
45497
45860
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
45498
45861
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -45506,6 +45869,8 @@ var NcRuleTargetSchema = z.object({
45506
45869
  * - `none` — no attachment.
45507
45870
  */
45508
45871
  /**
45872
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
45873
+ *
45509
45874
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
45510
45875
  * conflate it with the selection strategy and betray the request: asking for
45511
45876
  * the clean scene frame on an object-event owner used to start at
@@ -45534,16 +45899,29 @@ var NcMediaFrameSchema = z.enum([
45534
45899
  */
45535
45900
  var NcLinkedCameraModeSchema = z.enum(["mosaic", "each"]);
45536
45901
  var NcMediaPolicySchema = z.object({
45902
+ /**
45903
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
45904
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
45905
+ * triple below, at load and at every write, and the store keeps only this.
45906
+ */
45907
+ image: NcMediaImageSchema.optional(),
45908
+ /**
45909
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
45910
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
45911
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
45912
+ * Replaces `zoneCrop`.
45913
+ */
45914
+ showTriggerZone: z.boolean().optional(),
45915
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
45537
45916
  attach: z.enum([
45538
45917
  "best",
45539
45918
  "best-matching",
45540
45919
  "keyFrame",
45541
45920
  "none"
45542
- ]).default("best"),
45543
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
45921
+ ]).optional(),
45922
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
45544
45923
  frame: NcMediaFrameSchema.optional(),
45545
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
45546
- * "show me the ZONE", not the whole scene or the subject crop. */
45924
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
45547
45925
  zoneCrop: z.boolean().optional(),
45548
45926
  /**
45549
45927
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -45715,7 +46093,9 @@ var NcRuleInputSchema = z.object({
45715
46093
  * targets.
45716
46094
  */
45717
46095
  targetUsers: z.array(z.string()).optional(),
45718
- media: NcMediaPolicySchema.default({ attach: "best" }),
46096
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
46097
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
46098
+ media: NcMediaPolicySchema.default({}),
45719
46099
  throttle: NcThrottleSchema.default({
45720
46100
  cooldownSec: 60,
45721
46101
  scope: "rule-device"
@@ -46673,13 +47053,37 @@ var NcAlarmModeOpeningsSchema = z.object({
46673
47053
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
46674
47054
  unknown: z.array(z.number().int())
46675
47055
  });
47056
+ /**
47057
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
47058
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
47059
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
47060
+ * never looks fully armed (D62: off must never look like broken).
47061
+ */
47062
+ var NcAlarmInputBypassViewSchema = z.object({
47063
+ ruleId: z.string(),
47064
+ /** The rule's current name (its frozen name when the rule is gone). */
47065
+ ruleName: z.string(),
47066
+ /** The input: the sensor of the match, else its camera. */
47067
+ deviceId: z.number().int(),
47068
+ /** The input's current name. */
47069
+ name: z.string(),
47070
+ /** When it was bypassed (ms epoch). */
47071
+ since: z.number(),
47072
+ /** Triggers from this input dropped since. */
47073
+ dropped: z.number().int().min(0)
47074
+ });
46676
47075
  var NcAlarmLiveSchema = z.object({
46677
47076
  state: AlarmStateSchema,
46678
47077
  /** The mode being armed into (exit delay) or held; null when disarmed. */
46679
47078
  targetMode: AlarmArmModeSchema.nullable(),
46680
47079
  availableModes: z.array(AlarmArmModeSchema),
46681
47080
  openings: z.array(NcAlarmModeOpeningsSchema),
46682
- exclusions: z.array(NcAlarmExclusionViewSchema)
47081
+ exclusions: z.array(NcAlarmExclusionViewSchema),
47082
+ /**
47083
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
47084
+ * Defaulted so an older hub answer still parses (as "none known").
47085
+ */
47086
+ bypassedInputs: z.array(NcAlarmInputBypassViewSchema).default([])
46683
47087
  });
46684
47088
  var NcAlarmConfigSchema = z.object({
46685
47089
  /**
@@ -60574,9 +60978,11 @@ var connectivityCapability = {
60574
60978
  */
60575
60979
  durability: "restored",
60576
60980
  /**
60577
- * History (D850): none — duplicates device-status.online (one authority for availability).
60981
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
60982
+ * is the upstream entity's own link (a HA connectivity sensor), not the
60983
+ * device's reachability, which stays `device-status.online`.
60578
60984
  */
60579
- history: "none",
60985
+ history: { fields: { connected: { kind: "boolean" } } },
60580
60986
  /** Clock fields: written, but excluded from the compare that decides
60581
60987
  * whether persisting is worth a SQLite commit. */
60582
60988
  volatileStateFields: ["lastChangedAt"]
@@ -61446,11 +61852,22 @@ var dishwasherCapability = {
61446
61852
  },
61447
61853
  runtimeState: DishwasherStatusSchema,
61448
61854
  durability: "session",
61449
- history: { fields: { progressPercent: {
61450
- kind: "gauge",
61451
- unit: "%",
61452
- deadband: 2
61453
- } } }
61855
+ history: { fields: {
61856
+ progressPercent: {
61857
+ kind: "gauge",
61858
+ unit: "%",
61859
+ deadband: 2
61860
+ },
61861
+ state: { kind: "enum" },
61862
+ operationState: { kind: "enum" },
61863
+ remainingSeconds: {
61864
+ kind: "gauge",
61865
+ unit: "s",
61866
+ minIntervalMs: 6e4
61867
+ },
61868
+ doorOpen: { kind: "boolean" },
61869
+ powerOn: { kind: "boolean" }
61870
+ } }
61454
61871
  };
61455
61872
  var DoorbellStatusSchema = z.object({
61456
61873
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -61567,9 +61984,15 @@ var enumSensorCapability = {
61567
61984
  */
61568
61985
  durability: "restored",
61569
61986
  /**
61570
- * History (D850): none — text/enum state has no history (non-goal).
61987
+ * History (D850): the value as an `enum` series (an appliance's program or
61988
+ * operation state, an HVAC action). The option set is per device, so the
61989
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
61990
+ * `format` carries a timestamp, not a state, and is not recorded.
61571
61991
  */
61572
- history: "none",
61992
+ history: { fields: { value: {
61993
+ kind: "enum",
61994
+ skipWhenSet: "format"
61995
+ } } },
61573
61996
  /** Clock fields: written, but excluded from the compare that decides
61574
61997
  * whether persisting is worth a SQLite commit. */
61575
61998
  volatileStateFields: ["lastFetchedAt"]
@@ -63791,9 +64214,10 @@ var lockControlCapability = {
63791
64214
  */
63792
64215
  durability: "restored",
63793
64216
  /**
63794
- * History (D850): none — enum state; lock events belong in the events ledger.
64217
+ * History (D850): the lock's state as an `enum` series — change-only, no
64218
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
63795
64219
  */
63796
- history: "none",
64220
+ history: { fields: { state: { kind: "enum" } } },
63797
64221
  /** Clock fields: written, but excluded from the compare that decides
63798
64222
  * whether persisting is worth a SQLite commit. */
63799
64223
  volatileStateFields: ["lastChangedAt"]
@@ -63967,9 +64391,18 @@ var mediaPlayerCapability = {
63967
64391
  */
63968
64392
  durability: "session",
63969
64393
  /**
63970
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
64394
+ * History (D850): volume (a level an operator or an automation sets; the
64395
+ * default 10 s floor folds a slider drag into its end value) and mute.
64396
+ * `positionMs` is not recorded: it moves continuously while playing.
63971
64397
  */
63972
- history: "none"
64398
+ history: { fields: {
64399
+ volumeLevel: {
64400
+ kind: "gauge",
64401
+ unit: "%",
64402
+ deadband: 1
64403
+ },
64404
+ isMuted: { kind: "boolean" }
64405
+ } }
63973
64406
  };
63974
64407
  /**
63975
64408
  * mesh-network — collection cap for mesh-VPN providers.
@@ -70115,9 +70548,29 @@ var streamParamsCapability = {
70115
70548
  */
70116
70549
  durability: "restored",
70117
70550
  /**
70118
- * History (D850): none — encoder configuration.
70551
+ * History (D850): the configured bitrate and frame rate of the main and sub
70552
+ * profiles. Configuration, so change-only on the default floor: a point is an
70553
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
70554
+ * quality over time must show.
70119
70555
  */
70120
- history: "none",
70556
+ history: { fields: {
70557
+ "main.bitrate": {
70558
+ kind: "gauge",
70559
+ unit: "kbps"
70560
+ },
70561
+ "main.framerate": {
70562
+ kind: "gauge",
70563
+ unit: "fps"
70564
+ },
70565
+ "sub.bitrate": {
70566
+ kind: "gauge",
70567
+ unit: "kbps"
70568
+ },
70569
+ "sub.framerate": {
70570
+ kind: "gauge",
70571
+ unit: "fps"
70572
+ }
70573
+ } },
70121
70574
  /** Clock fields: written, but excluded from the compare that decides
70122
70575
  * whether persisting is worth a SQLite commit. */
70123
70576
  volatileStateFields: ["lastFetchedAt"]
@@ -71343,26 +71796,6 @@ var ApiKeySummarySchema = z.object({
71343
71796
  createdAt: z.number(),
71344
71797
  lastUsedAt: z.number().optional()
71345
71798
  });
71346
- var ScopedTokenSummarySchema = z.object({
71347
- id: z.string(),
71348
- userId: z.string(),
71349
- name: z.string(),
71350
- tokenPrefix: z.string(),
71351
- scopes: z.array(TokenScopeSchema),
71352
- expiresAt: z.number().nullish(),
71353
- lastUsedAt: z.number().nullish(),
71354
- createdAt: z.number()
71355
- });
71356
- var CreateScopedTokenInputSchema = z.object({
71357
- userId: z.string(),
71358
- name: z.string(),
71359
- scopes: z.array(TokenScopeSchema),
71360
- expiresAt: z.number().optional()
71361
- });
71362
- var CreateScopedTokenResultSchema = z.object({
71363
- token: z.string(),
71364
- record: ScopedTokenSummarySchema
71365
- });
71366
71799
  var OauthSessionSummarySchema = z.object({
71367
71800
  id: z.string(),
71368
71801
  userId: z.string(),
@@ -71384,11 +71817,11 @@ var TotpStatusSchema = z.object({
71384
71817
  confirmedAt: z.number().nullable()
71385
71818
  });
71386
71819
  /**
71387
- * user-management — singleton capability for user accounts, API keys,
71388
- * and scoped tokens.
71820
+ * user-management — singleton capability for user accounts and the
71821
+ * legacy API-key rows.
71389
71822
  *
71390
71823
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
71391
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
71824
+ * — the subset check on `setUserScopes` is moot
71392
71825
  * because non-admins never reach these. If/when we open non-admin
71393
71826
  * delegation, structural caller-scope subset check goes inside the
71394
71827
  * provider.
@@ -71459,18 +71892,6 @@ var userManagementCapability = {
71459
71892
  auth: "admin",
71460
71893
  access: "delete"
71461
71894
  }),
71462
- createScopedToken: method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
71463
- kind: "mutation",
71464
- auth: "admin",
71465
- access: "create"
71466
- }),
71467
- revokeScopedToken: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), {
71468
- kind: "mutation",
71469
- auth: "admin",
71470
- access: "delete"
71471
- }),
71472
- validateScopedToken: method(z.object({ token: z.string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }),
71473
- listScopedTokens: method(z.object({ userId: z.string() }), z.array(ScopedTokenSummarySchema), { auth: "admin" }),
71474
71895
  setupTotp: method(z.object({ userId: z.string() }), TotpSetupResultSchema, {
71475
71896
  kind: "mutation",
71476
71897
  auth: "admin",
@@ -74352,6 +74773,15 @@ var BaseDevice = class {
74352
74773
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
74353
74774
  * with a typed cast.
74354
74775
  *
74776
+ * Answer what you KNOW. A plain array is read as the complete list only
74777
+ * while this device is `online` and probed; return
74778
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
74779
+ * now (no credentials, parent not connected, a failed or partial read) —
74780
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
74781
+ * to say "connected, and this is the complete list" explicitly. A shrink is
74782
+ * deleted only after a second agreeing complete read on a later probe (D49;
74783
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
74784
+ *
74355
74785
  * Default: no children.
74356
74786
  */
74357
74787
  getAccessoryChildren() {
@@ -77959,7 +78389,7 @@ var METHOD_ACCESS_MAP = Object.freeze({
77959
78389
  capName: "llm",
77960
78390
  capScope: "system",
77961
78391
  addonId: null,
77962
- access: "view"
78392
+ access: "create"
77963
78393
  },
77964
78394
  "llm.listNodeModels": {
77965
78395
  capName: "llm",
@@ -78261,7 +78691,19 @@ var METHOD_ACCESS_MAP = Object.freeze({
78261
78691
  addonId: null,
78262
78692
  access: "view"
78263
78693
  },
78264
- "logDestination.query": {
78694
+ "logDestination.cancelRead": {
78695
+ capName: "log-destination",
78696
+ capScope: "system",
78697
+ addonId: null,
78698
+ access: "create"
78699
+ },
78700
+ "logDestination.describeRead": {
78701
+ capName: "log-destination",
78702
+ capScope: "system",
78703
+ addonId: null,
78704
+ access: "view"
78705
+ },
78706
+ "logDestination.read": {
78265
78707
  capName: "log-destination",
78266
78708
  capScope: "system",
78267
78709
  addonId: null,
@@ -82623,12 +83065,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82623
83065
  addonId: null,
82624
83066
  access: "create"
82625
83067
  },
82626
- "userManagement.createScopedToken": {
82627
- capName: "user-management",
82628
- capScope: "system",
82629
- addonId: null,
82630
- access: "create"
82631
- },
82632
83068
  "userManagement.createUser": {
82633
83069
  capName: "user-management",
82634
83070
  capScope: "system",
@@ -82677,12 +83113,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82677
83113
  addonId: null,
82678
83114
  access: "view"
82679
83115
  },
82680
- "userManagement.listScopedTokens": {
82681
- capName: "user-management",
82682
- capScope: "system",
82683
- addonId: null,
82684
- access: "view"
82685
- },
82686
83116
  "userManagement.listUsers": {
82687
83117
  capName: "user-management",
82688
83118
  capScope: "system",
@@ -82737,12 +83167,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82737
83167
  addonId: null,
82738
83168
  access: "delete"
82739
83169
  },
82740
- "userManagement.revokeScopedToken": {
82741
- capName: "user-management",
82742
- capScope: "system",
82743
- addonId: null,
82744
- access: "delete"
82745
- },
82746
83170
  "userManagement.setupTotp": {
82747
83171
  capName: "user-management",
82748
83172
  capScope: "system",
@@ -82773,12 +83197,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82773
83197
  addonId: null,
82774
83198
  access: "view"
82775
83199
  },
82776
- "userManagement.validateScopedToken": {
82777
- capName: "user-management",
82778
- capScope: "system",
82779
- addonId: null,
82780
- access: "view"
82781
- },
82782
83200
  "userManagement.verifyTotp": {
82783
83201
  capName: "user-management",
82784
83202
  capScope: "system",
@@ -84563,6 +84981,11 @@ Object.freeze({
84563
84981
  form: "single",
84564
84982
  optional: false
84565
84983
  }],
84984
+ "logDestination.read": [{
84985
+ name: "deviceId",
84986
+ form: "single",
84987
+ optional: true
84988
+ }],
84566
84989
  "mediaPlayer.getStatus": [{
84567
84990
  name: "deviceId",
84568
84991
  form: "single",
@@ -86571,7 +86994,7 @@ var SESSION_ONLY_POLICY = {
86571
86994
  };
86572
86995
  /**
86573
86996
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
86574
- * 34 caps with series (62 series), 37 caps answered `'none'`.
86997
+ * 40 caps with series (77 series), 31 caps answered `'none'`.
86575
86998
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
86576
86999
  */
86577
87000
  var HISTORY_CATALOG = {
@@ -86602,6 +87025,21 @@ var HISTORY_CATALOG = {
86602
87025
  deadband: 1
86603
87026
  }
86604
87027
  },
87028
+ "alarm-panel": { "state": {
87029
+ kind: "enum",
87030
+ values: [
87031
+ "disarmed",
87032
+ "armed_home",
87033
+ "armed_away",
87034
+ "armed_night",
87035
+ "armed_vacation",
87036
+ "armed_custom_bypass",
87037
+ "arming",
87038
+ "disarming",
87039
+ "pending",
87040
+ "triggered"
87041
+ ]
87042
+ } },
86605
87043
  "ambient-light-sensor": { "lux": {
86606
87044
  kind: "gauge",
86607
87045
  unit: "lx",
@@ -86646,6 +87084,7 @@ var HISTORY_CATALOG = {
86646
87084
  minIntervalMs: 0
86647
87085
  }
86648
87086
  },
87087
+ "connectivity": { "connected": { kind: "boolean" } },
86649
87088
  "contact": { "entryOpen": { kind: "boolean" } },
86650
87089
  "cover": { "position": {
86651
87090
  kind: "gauge",
@@ -86653,10 +87092,48 @@ var HISTORY_CATALOG = {
86653
87092
  minIntervalMs: 0
86654
87093
  } },
86655
87094
  "device-status": { "online": { kind: "boolean" } },
86656
- "dishwasher": { "progressPercent": {
86657
- kind: "gauge",
86658
- unit: "%",
86659
- deadband: 2
87095
+ "dishwasher": {
87096
+ "progressPercent": {
87097
+ kind: "gauge",
87098
+ unit: "%",
87099
+ deadband: 2
87100
+ },
87101
+ "state": {
87102
+ kind: "enum",
87103
+ values: [
87104
+ "idle",
87105
+ "running",
87106
+ "paused",
87107
+ "finished",
87108
+ "error",
87109
+ "unavailable"
87110
+ ]
87111
+ },
87112
+ "operationState": {
87113
+ kind: "enum",
87114
+ values: [
87115
+ "Inactive",
87116
+ "Ready",
87117
+ "DelayedStart",
87118
+ "Run",
87119
+ "Pause",
87120
+ "ActionRequired",
87121
+ "Finished",
87122
+ "Error",
87123
+ "Aborting"
87124
+ ]
87125
+ },
87126
+ "remainingSeconds": {
87127
+ kind: "gauge",
87128
+ unit: "s",
87129
+ minIntervalMs: 6e4
87130
+ },
87131
+ "doorOpen": { kind: "boolean" },
87132
+ "powerOn": { kind: "boolean" }
87133
+ },
87134
+ "enum-sensor": { "value": {
87135
+ kind: "enum",
87136
+ skipWhenSet: "format"
86660
87137
  } },
86661
87138
  "fan-control": {
86662
87139
  "percentage": {
@@ -86691,6 +87168,24 @@ var HISTORY_CATALOG = {
86691
87168
  unit: "%",
86692
87169
  deadband: 2
86693
87170
  } },
87171
+ "lock-control": { "state": {
87172
+ kind: "enum",
87173
+ values: [
87174
+ "locked",
87175
+ "unlocked",
87176
+ "locking",
87177
+ "unlocking",
87178
+ "jammed"
87179
+ ]
87180
+ } },
87181
+ "media-player": {
87182
+ "volumeLevel": {
87183
+ kind: "gauge",
87184
+ unit: "%",
87185
+ deadband: 1
87186
+ },
87187
+ "isMuted": { kind: "boolean" }
87188
+ },
86694
87189
  "motion": { "detected": {
86695
87190
  kind: "boolean",
86696
87191
  excludeDeviceTypes: [DeviceType.Camera]
@@ -86777,6 +87272,24 @@ var HISTORY_CATALOG = {
86777
87272
  deadband: .1
86778
87273
  } },
86779
87274
  "smoke": { "detected": { kind: "boolean" } },
87275
+ "stream-params": {
87276
+ "main.bitrate": {
87277
+ kind: "gauge",
87278
+ unit: "kbps"
87279
+ },
87280
+ "main.framerate": {
87281
+ kind: "gauge",
87282
+ unit: "fps"
87283
+ },
87284
+ "sub.bitrate": {
87285
+ kind: "gauge",
87286
+ unit: "kbps"
87287
+ },
87288
+ "sub.framerate": {
87289
+ kind: "gauge",
87290
+ unit: "fps"
87291
+ }
87292
+ },
86780
87293
  "switch": { "on": { kind: "boolean" } },
86781
87294
  "tamper": { "tampered": { kind: "boolean" } },
86782
87295
  "temperature-sensor": { "celsius": {
@@ -88363,4 +88876,4 @@ function armRemovalReconcile(opts) {
88363
88876
  return () => clearInterval(timer);
88364
88877
  }
88365
88878
  //#endregion
88366
- export { STORAGE_ADMIN_MOVED_COLLECTIONS as $, normalizeNodeId as $i, resolveAppConnections as $n, DeclarationRefusedError as $r, enumerateInferenceDevices as $t, DEVICE_TOMBSTONE_RETENTION_MS as A, collectSecretLeaves as Ai, logDestinationCapability as An, withLocationMode as Ar, composerCapability as At, HUB_MDNS_TXT_KEYS as B, expandCapMethods as Bi, normalizeUnit as Bn, createStatefulExpressionMemory as Br, databaseSnapshotCapability as Bt, DATA_STORE_DATABASES as C, WELL_KNOWN_TAB_MAP as Ci, keychainAdminCapability as Cn, supportedRuntimes as Cr, buildDeviceEnrollmentLink as Ct, DEVICE_NONCE_TTL_MS as D, assertValidDeclaration as Di, lifecycleJobSchema as Dn, vectorDimFromBase64 as Dr, cameraGridLayoutCapability as Dt, DEVICE_ENROLLMENT_TTL_MS as E, asString$1 as Ei, legacyModeOf as En, validateCustomAddress as Er, calendarsCapability as Et, FIRST_LEVEL_MACRO_CLASSES as F, declarationsOf as Fi, memoizePinnedFfmpeg as Fn, composedDeviceStableId as Fr, coreBlockIdFromAddonId as Ft, LegacyStorageLocationDefaultSchema as G, isKeychainStoredField as Gi, planComposition as Gn, DeviceType as Gr, describeComposableCaps as Gt, KeychainAuditEntrySchema as H, hydrateSchema as Hi, objectInputDeclaresRequiredDeviceId as Hn, toExpressionValue as Hr, decodeVectorBase64 as Ht, FieldClaimModeSchema as I, defineCustomActions as Ii, metricsProviderCapability as In, compositionFeatureEnabled as Ir, coreBlockSourceKind as It, MOTION_CLOSE_AFTER_MS as J, isSecretMarkerLike as Ji, ptzAutotrackCapability as Jn, BatchTooLargeError as Jr, deviceHistoryCapability as Jt, METHOD_ACCESS_MAP as K, isSecretClear as Ki, platformProbeCapability as Kn, errMsg as Kr, deviceCredentialsCapability as Kt, FieldClaimSchema as L, defineRecordKinds as Li, modeMayWrite as Ln, compositionItemFieldPath as Lr, coreBlocksCapability as Lt, DeclaredDevices as M, collectZodSecretPaths as Mi, looseSchema as Mn, buildFfmpegArgs as Mr, compositionSourceRefs as Mt, DeviceStatusSchema as N, createEvent as Ni, mayReadLocation as Nn, cloneStatefulExpressionMemory as Nr, coreBlockAddonId as Nt, DEVICE_SAN_CREDENTIAL_PREFIX as O, buildSecretRef as Oi, localNetworkCapability as On, vectorIndexDimConflictError as Or, canonicalIconKey as Ot, DeviceTombstoneSchema as P, customAction as Pi, mayWriteToLocation as Pn, composedDeviceRef as Pr, coreBlockComposition as Pt, STORAGE_ACCESS_FALLBACK as Q, nodePin as Qi, replacedFieldKeys as Qn, DEVICE_STATUS_METHOD as Qr, deviceStatusCapability as Qt, HISTORY_CATALOG as R, emitDownForOwnedCaps as Ri, motionCapability as Rn, compositionSliceKey as Rr, createDeviceExtensionProvider as Rt, DATABASE_SNAPSHOT_TIMEOUT_MS as S, UnknownRecordKindError as Si, kebabToCamel as Sn, streamQualityLabel as Sr, buildCapabilityLookup as St, DERIVED_CAMERA_SILENCED_CAP_NAMES as T, asNumber as Ti, legacyAutoLinkIds as Tn, validateComposition as Tr, buildStreamParamsConfigSchema as Tt, KeychainResetRecordSchema as U, isDeviceConfigCap as Ui, parseStreamParamsFormPatch as Un, DeviceFeature as Ur, defineExtensionSlotProvider as Ut, KEYCHAIN_RESET_TRIGGER_ACTOR as V, formatSecretScope as Vi, objectInputDeclaresAddonId as Vn, disarmRoseMemory as Vr, declarationOwnerNodeId as Vt, LOG_LEVEL_RANK as W, isEvent as Wi, pickAppLinkHub as Wn, DeviceRole as Wr, deriveBatteryPresence as Wt, RECORDING_SOURCE_CAMSTACK_ADDON as X, makeSecretMarker as Xi, recordsCapability as Xn, DATAPLANE_SECRET_HEADER as Xr, deviceRemovalHookCapability as Xt, NetworkTunnelStartedDataSchema as Y, isSecretRefOwnedBy as Yi, recordEntriesCapability as Yn, CALLER_STAMPED_CAPABILITIES as Yr, deviceManagerCapability as Yt, RecordingStatusSchema as Z, mapSecretLeaves as Zi, reducePoints as Zn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Zr, deviceStateCapability as Zt, CatalogFileSchema as _, userError as _a, RecordTooLargeError as _i, isCollectionArrayMethod as _n, storageCapability as _r, armRemovalReconcile as _t, ApiKeyRecordSchema as a, parseSettingsBrokersAdoptsFrom as aa, PlaintextSecretError as ai, expressionContainsBuiltinCall as an, resolveMethodAuth as ar, StorageCleanupJobSchema as at, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as b, SECRET_CLEAR as bi, isObjectInput as bn, storageProviderCapability as br, bareAddonId as bt, CAMERA_SWITCH_ORDER as c, resolveCapMount as ca, RECORD_DELETE_BATCH as ci, foldSnapshotByFunction as cn, scopesAllowAddon as cr, StorageMigrationJobSchema as ct, CATALOG_LANGS as d, secretTreeFromPaths as da, REMOVE_LEAF as di, gbToBytes as dn, settingsStoreCapability as dr, addonPagesCapability as dt, normalizeSecretOwner as ea, FilterRequiredError as ei, enumerateItemArrayFields as en, resolveBucketMs as er, STORAGE_ADMIN_SCOPED_BASES as et, COMPOSED_ITEM_FIXED_FIELDS as f, secretTreeFromSchema as fa, RUNTIME_DEFAULTS as fi, interpolate as fn, shortHostname as fr, addonSettingsCapability as ft, CalendarPreferencesSchema as g, transformSecretWrite as ga, RecordNotFoundError as gi, isArrayOutputSchema as gn, storageAdminCapability as gr, alertsCapability as gt, CORE_BLOCK_ADDON_PREFIX as h, toSecretFieldView as ha, RecordKindDeclarationSchema as hi, isAppLinkBase as hn, splitTranslationRef as hr, alertEpisodePayload as ht, AlertSchema as i, parseSettingsArrayAdoptsFrom as ia, NoCallerError as ii, expandContainer as in, resolveLocationMode as ir, SsoBridgeClaimsSchema as it, DataStoreDatabaseSchema as j, collectSecretMarkerRefs as ji, logLevelAtMost as jn, COMPOSER_ADDON_ID as jr, compositionFieldKey as jt, DEVICE_SAN_USER_PREFIX as k, collectSecretConfigKeys as ki, locationIconKey as kn, vectorStoreCapability as kr, checkRoleAddress as kt, CAMSTACK_APP_LINK_ORIGIN as l, resolveSecretMarkers as la, RECORD_SWEEP_INTERVAL_MS as li, formatDeviceRevoker as ln, scopesAllowDeviceCap as lr, TokenScopeSchema as lt, CORE_BLOCKS_ADDON_ID as m, toNodeId as ma, ReadinessTimeoutError as mi, isAlertEpisodeSeverity as mn, snapshotCapability as mr, alertEpisodeId as mt, AGENT_MDNS_TXT_KEYS as n, parseJsonUnknown as na, HISTORY_DEFAULT_MIN_INTERVAL_MS as ni, evaluateCompositionField as nn, resolveCoreBlockFiles as nr, ScopedTokenSchema as nt, BaseDevice as o, readinessKey as oa, RECORD_BATCH_MAX as oi, extractNestedAddonId as on, resolveNotificationTapAddress as or, StorageLocationModeSchema as ot, COMPOSER_RUNNER_ID as p, sleep as pa, ReadinessRegistry as pi, isAlertEpisodeOpen as pn, siteZoneKey as pr, addonWidgetsCapability as pt, MINUTES_PER_DAY as q, isSecretMarker as qi, procedureAuthKey as qn, BaseAddon as qr, deviceExtensionCapability as qt, ALL_CAPABILITY_DEFINITIONS as r, parseSecretRef as ra, InvalidRecordError as ri, evictionPolicyOfLocation as rn, resolveHubAddressRoles as rr, ServerNameSchema as rt, BatteryStatusSchema as s, recordSecretRef as sa, RECORD_BATCH_MAX_BYTES as si, filesystemBrowseCapability as sn, runtimeStatePolicyFor as sr, StorageLocationTypeSchema as st, AGENT_MDNS_SERVICE_TYPE as t, parseJsonObject as ta, ForeignSecretMarkerError as ti, enumerateSchemaFields as tn, resolveCoreBlockEntry as tr, STREAM_PROFILE_META as tt, CAP_NAMES_WITH_STATUS as u, scopeKey as ua, REDACTED_SECRET as ui, formatMinutes as un, scoreRuntimes as ur, UserRecordSchema as ut, CoreBlockSchema as v, withoutCallerStamp as va, RecordUniqueViolationError as vi, isDefaultAppConnectionEndpoint as vn, storageMigrationCapability as vr, authProviderCapability as vt, DAY_NAMES as w, asJsonObject as wi, keychainCapability as wn, userManagementCapability as wr, buildDeviceSignatureMessage as wt, DATABASE_SNAPSHOT_SUFFIX as x, UnindexedFilterError as xi, isVoidInput as xn, streamCatalogCapability as xr, batteryCapability as xt, CredentialTokenClaimsSchema as y, EventCategory as ya, RevConflictError as yi, isLocationEnabled as yn, storageOccupancyCapability as yr, backupCapability as yt, HUB_MDNS_SERVICE_TYPE as z, emitReadiness as zi, normalizeCoreBlockWrite as zn, compositionSourceKey as zr, dataStoreProviderCapability as zt };
88879
+ export { PreferenceDeviceIdSchema as $, isEvent as $i, pickAppLinkHub as $n, DeviceRole as $r, describeComposableCaps as $t, DEVICE_SAN_CREDENTIAL_PREFIX as A, UnindexedFilterError as Ai, isVoidInput as An, streamCatalogCapability as Ar, buildCapabilityLookup as At, HISTORY_CATALOG as B, collectSecretMarkerRefs as Bi, logLevelAtMost as Bn, COMPOSER_ADDON_ID as Br, compositionSourceRefs as Bt, DATABASE_SNAPSHOT_TIMEOUT_MS as C, toNodeId as Ca, ReadinessTimeoutError as Ci, isAppLinkBase as Cn, snapshotCapability as Cr, alertEpisodePayload as Ct, DEVICE_ENROLLMENT_TTL_MS as D, withoutCallerStamp as Da, RecordUniqueViolationError as Di, isDefaultAppConnectionEndpoint as Dn, storageMigrationCapability as Dr, backupCapability as Dt, DERIVED_CAMERA_SILENCED_CAP_NAMES as E, userError as Ea, RecordTooLargeError as Ei, isCredentialTokenPayload as En, storageCapability as Er, authProviderCapability as Et, DeviceStatusSchema as F, asString$1 as Fi, legacyModeOf as Fn, validateCustomAddress as Fr, cameraGridLayoutCapability as Ft, KeychainResetRecordSchema as G, defineCustomActions as Gi, metricsProviderCapability as Gn, compositionFeatureEnabled as Gr, coreBlocksCapability as Gt, HUB_MDNS_TXT_KEYS as H, createEvent as Hi, mayReadLocation as Hn, cloneStatefulExpressionMemory as Hr, coreBlockComposition as Ht, DeviceTombstoneSchema as I, assertValidDeclaration as Ii, lifecycleJobSchema as In, vectorDimFromBase64 as Ir, canonicalIconKey as It, METHOD_ACCESS_MAP as J, emitReadiness as Ji, normalizeCoreBlockWrite as Jn, compositionSourceKey as Jr, databaseSnapshotCapability as Jt, LOG_LEVEL_RANK as K, defineRecordKinds as Ki, modeMayWrite as Kn, compositionItemFieldPath as Kr, createDeviceExtensionProvider as Kt, FIRST_LEVEL_MACRO_CLASSES as L, buildSecretRef as Li, localNetworkCapability as Ln, vectorIndexDimConflictError as Lr, checkRoleAddress as Lt, DEVICE_TOMBSTONE_RETENTION_MS as M, WELL_KNOWN_TAB_MAP as Mi, keychainAdminCapability as Mn, supportedRuntimes as Mr, buildDeviceSignatureMessage as Mt, DataStoreDatabaseSchema as N, asJsonObject as Ni, keychainCapability as Nn, userManagementCapability as Nr, buildStreamParamsConfigSchema as Nt, DEVICE_HISTORY_ENERGY_KEY as O, EventCategory as Oa, RevConflictError as Oi, isLocationEnabled as On, storageOccupancyCapability as Or, bareAddonId as Ot, DeclaredDevices as P, asNumber as Pi, legacyAutoLinkIds as Pn, validateComposition as Pr, calendarsCapability as Pt, PREFERENCES_MAX_VALUE_BYTES as Q, isDeviceConfigCap as Qi, parseStreamParamsFormPatch as Qn, DeviceFeature as Qr, deriveBatteryPresence as Qt, FieldClaimModeSchema as R, collectSecretConfigKeys as Ri, locationIconKey as Rn, vectorStoreCapability as Rr, composerCapability as Rt, DATABASE_SNAPSHOT_SUFFIX as S, sleep as Sa, ReadinessRegistry as Si, isAlertEpisodeSeverity as Sn, siteZoneKey as Sr, alertEpisodeId as St, DAY_NAMES as T, transformSecretWrite as Ta, RecordNotFoundError as Ti, isCollectionArrayMethod as Tn, storageAdminCapability as Tr, armRemovalReconcile as Tt, KEYCHAIN_RESET_TRIGGER_ACTOR as U, customAction as Ui, mayWriteToLocation as Un, composedDeviceRef as Ur, coreBlockIdFromAddonId as Ut, HUB_MDNS_SERVICE_TYPE as V, collectZodSecretPaths as Vi, looseSchema as Vn, buildFfmpegArgs as Vr, coreBlockAddonId as Vt, KeychainAuditEntrySchema as W, declarationsOf as Wi, memoizePinnedFfmpeg as Wn, composedDeviceStableId as Wr, coreBlockSourceKind as Wt, MOTION_CLOSE_AFTER_MS as X, formatSecretScope as Xi, objectInputDeclaresAddonId as Xn, disarmRoseMemory as Xr, decodeVectorBase64 as Xt, MINUTES_PER_DAY as Y, expandCapMethods as Yi, normalizeUnit as Yn, createStatefulExpressionMemory as Yr, declarationOwnerNodeId as Yt, NetworkTunnelStartedDataSchema as Z, hydrateSchema as Zi, objectInputDeclaresRequiredDeviceId as Zn, toExpressionValue as Zr, defineExtensionSlotProvider as Zt, CalendarPreferencesSchema as _, resolveCapMount as _a, RECORD_DELETE_BATCH as _i, formatDeviceRevoker as _n, scopesAllowAddon as _r, UNATTRIBUTED_BUCKET_KEY as _t, ApiKeyRecordSchema as a, makeSecretMarker as aa, DATAPLANE_SECRET_HEADER as ai, deviceStateCapability as an, recordsCapability as ar, STORAGE_ACCESS_FALLBACK as at, CredentialTokenClaimsSchema as b, secretTreeFromPaths as ba, REMOVE_LEAF as bi, interpolate as bn, settingsStoreCapability as br, addonSettingsCapability as bt, CAMERA_SWITCH_ORDER as c, normalizeNodeId as ca, DeclarationRefusedError as ci, enumerateItemArrayFields as cn, resolveAppConnections as cr, STREAM_PROFILE_META as ct, CATALOG_LANGS as d, parseJsonUnknown as da, HISTORY_DEFAULT_MIN_INTERVAL_MS as di, evictionPolicyOfLocation as dn, resolveCoreBlockFiles as dr, SsoBridgeClaimsSchema as dt, isKeychainStoredField as ea, DeviceType as ei, deviceCredentialsCapability as en, planComposition as er, PreferenceNamespaceSchema as et, COMPOSED_ITEM_FIXED_FIELDS as f, parseSecretRef as fa, InvalidRecordError as fi, expandContainer as fn, resolveHubAddressRoles as fr, StorageCleanupJobSchema as ft, CREDENTIAL_TOKEN_AUDIENCE as g, recordSecretRef as ga, RECORD_BATCH_MAX_BYTES as gi, foldSnapshotByFunction as gn, runtimeStatePolicyFor as gr, TokenScopeSchema as gt, CORE_BLOCK_ADDON_PREFIX as h, readinessKey as ha, RECORD_BATCH_MAX as hi, filesystemBrowseCapability as hn, resolveNotificationTapAddress as hr, StorageMigrationJobSchema as ht, AlertSchema as i, isSecretRefOwnedBy as ia, CALLER_STAMPED_CAPABILITIES as ii, deviceRemovalHookCapability as in, recordEntriesCapability as ir, RecordingStatusSchema as it, DEVICE_SAN_USER_PREFIX as j, UnknownRecordKindError as ji, kebabToCamel as jn, streamQualityLabel as jr, buildDeviceEnrollmentLink as jt, DEVICE_NONCE_TTL_MS as k, SECRET_CLEAR as ki, isObjectInput as kn, storageProviderCapability as kr, batteryCapability as kt, CAMSTACK_APP_LINK_ORIGIN as l, normalizeSecretOwner as la, FilterRequiredError as li, enumerateSchemaFields as ln, resolveBucketMs as lr, ScopedTokenSchema as lt, CORE_BLOCKS_ADDON_ID as m, parseSettingsBrokersAdoptsFrom as ma, PlaintextSecretError as mi, extractNestedAddonId as mn, resolveMethodAuth as mr, StorageLocationTypeSchema as mt, AGENT_MDNS_TXT_KEYS as n, isSecretMarker as na, BaseAddon as ni, deviceHistoryCapability as nn, procedureAuthKey as nr, RECORDING_SOURCE_CAMSTACK_ADDON as nt, BaseDevice as o, mapSecretLeaves as oa, DEVICE_SETTINGS_CONTRIBUTION_METHODS as oi, deviceStatusCapability as on, reducePoints as or, STORAGE_ADMIN_MOVED_COLLECTIONS as ot, COMPOSER_RUNNER_ID as p, parseSettingsArrayAdoptsFrom as pa, NoCallerError as pi, expressionContainsBuiltinCall as pn, resolveLocationMode as pr, StorageLocationModeSchema as pt, LegacyStorageLocationDefaultSchema as q, emitDownForOwnedCaps as qi, motionCapability as qn, compositionSliceKey as qr, dataStoreProviderCapability as qt, ALL_CAPABILITY_DEFINITIONS as r, isSecretMarkerLike as ra, BatchTooLargeError as ri, deviceManagerCapability as rn, ptzAutotrackCapability as rr, ROOT_BUCKET_KEY as rt, BatteryStatusSchema as s, nodePin as sa, DEVICE_STATUS_METHOD as si, enumerateInferenceDevices as sn, replacedFieldKeys as sr, STORAGE_ADMIN_SCOPED_BASES as st, AGENT_MDNS_SERVICE_TYPE as t, isSecretClear as ta, errMsg as ti, deviceExtensionCapability as tn, platformProbeCapability as tr, PreferenceValueSchema as tt, CAP_NAMES_WITH_STATUS as u, parseJsonObject as ua, ForeignSecretMarkerError as ui, evaluateCompositionField as un, resolveCoreBlockEntry as ur, ServerNameSchema as ut, CatalogFileSchema as v, resolveSecretMarkers as va, RECORD_SWEEP_INTERVAL_MS as vi, formatMinutes as vn, scopesAllowDeviceCap as vr, UserRecordSchema as vt, DATA_STORE_DATABASES as w, toSecretFieldView as wa, RecordKindDeclarationSchema as wi, isArrayOutputSchema as wn, splitTranslationRef as wr, alertsCapability as wt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as x, secretTreeFromSchema as xa, RUNTIME_DEFAULTS as xi, isAlertEpisodeOpen as xn, shortHostname as xr, addonWidgetsCapability as xt, CoreBlockSchema as y, scopeKey as ya, REDACTED_SECRET as yi, gbToBytes as yn, scoreRuntimes as yr, addonPagesCapability as yt, FieldClaimSchema as z, collectSecretLeaves as zi, logDestinationCapability as zn, withLocationMode as zr, compositionFieldKey as zt };