@camstack/addon-pipeline 1.2.367 → 1.2.369

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 (35) hide show
  1. package/dist/audio-analyzer/index.js +3 -3
  2. package/dist/audio-analyzer/index.mjs +3 -3
  3. package/dist/{custom-model-catalog-CESZ9DM5.js → custom-model-catalog-C3PYjN8c.js} +2 -2
  4. package/dist/{custom-model-catalog-BqKEZYFI.mjs → custom-model-catalog-uHzR2xWY.mjs} +2 -2
  5. package/dist/detection-pipeline/index.js +4 -4
  6. package/dist/detection-pipeline/index.mjs +4 -4
  7. package/dist/{dist-BmQm6_nm.js → dist-D3PtiAhd.js} +692 -4
  8. package/dist/{dist-ClKIJKn0.mjs → dist-DKSwif2M.mjs} +692 -4
  9. package/dist/{model-catalogs-DKHNVZC0.mjs → model-catalogs-CVd4TcTQ.mjs} +1 -1
  10. package/dist/{model-catalogs-B3lwxS5R.js → model-catalogs-kGqNkIuV.js} +1 -1
  11. package/dist/motion-wasm/index.js +1 -1
  12. package/dist/motion-wasm/index.mjs +1 -1
  13. package/dist/{node-BqTmCMlP.js → node--15m1sN3.js} +1 -1
  14. package/dist/{node-DlpWXqvO.mjs → node-C_Fqti3A.mjs} +1 -1
  15. package/dist/pipeline-runner/index.js +3 -3
  16. package/dist/pipeline-runner/index.mjs +3 -3
  17. package/dist/{process-memory-DHF3ynR3.js → process-memory-DELcKfDf.js} +1 -1
  18. package/dist/{process-memory-BjIiiXGZ.mjs → process-memory-Dq_Omilr.mjs} +1 -1
  19. package/dist/recorder/index.js +13 -2
  20. package/dist/recorder/index.mjs +13 -2
  21. package/dist/{segment-demux-js-Du_eAog1.mjs → segment-demux-js-BTUbXt7b.mjs} +2 -2
  22. package/dist/{segment-demux-js-D1Up0mTP.js → segment-demux-js-DSYbEqvj.js} +2 -2
  23. package/dist/stream-broker/_stub.js +2 -2
  24. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CRxJwkgE.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CMHYV8dG.mjs} +2 -2
  25. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DBku2n1V.mjs +26 -0
  26. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DNC4tvrD.mjs +26 -0
  27. package/dist/stream-broker/demux-worker-child.js +1 -1
  28. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  29. package/dist/stream-broker/{hostInit-DEnYuDjZ.mjs → hostInit-Cz1kTtGe.mjs} +2 -2
  30. package/dist/stream-broker/index.js +123 -57
  31. package/dist/stream-broker/index.mjs +123 -57
  32. package/dist/stream-broker/remoteEntry.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CIBBQAJc.mjs +0 -26
  35. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DNGQ-Tic.mjs +0 -26
@@ -5387,7 +5387,7 @@ var ZodIssueCode = {
5387
5387
  var ZodFirstPartyTypeKind;
5388
5388
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5389
5389
  //#endregion
5390
- //#region ../types/dist/sleep-BBF1iXUi.mjs
5390
+ //#region ../types/dist/sleep--g-h2_c_.mjs
5391
5391
  /**
5392
5392
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5393
5393
  * window to float samples (D455).
@@ -14652,6 +14652,167 @@ var ConvertResultSchema = object({
14652
14652
  files: array(string()).readonly()
14653
14653
  })).readonly()
14654
14654
  });
14655
+ /**
14656
+ * Device certificates (D855) — the wire contract shared by the hub, the admin
14657
+ * UI and the native viewer.
14658
+ *
14659
+ * A device (a phone) generates its OWN P-256 key pair in hardware (Secure
14660
+ * Enclave / Android Keystore / a non-extractable WebCrypto key). The private
14661
+ * key never travels. The hub signs the PUBLIC key into an X.509 leaf under a
14662
+ * dedicated device CA; the device later proves possession of the key by
14663
+ * signing a hub-issued nonce, and the hub answers with the same session a
14664
+ * password login opens.
14665
+ *
14666
+ * Everything on the wire is a small string (a PEM, a base64url signature):
14667
+ * D613 is about bulk bytes, and a certificate is ~600 bytes.
14668
+ */
14669
+ /** Signature algorithm of every device credential: ECDSA, curve P-256, SHA-256. */
14670
+ var DEVICE_CERT_SIGNATURE = "ecdsa-p256-sha256";
14671
+ /** First line of every signed message; a change of format bumps the version. */
14672
+ var DEVICE_SIGNATURE_MESSAGE_VERSION = "camstack-device-cert-v1";
14673
+ _enum([
14674
+ "login",
14675
+ "renew",
14676
+ "revoke"
14677
+ ]);
14678
+ var DevicePlatformSchema = _enum([
14679
+ "ios",
14680
+ "android",
14681
+ "web",
14682
+ "other"
14683
+ ]);
14684
+ var Base64UrlSchema = string().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/);
14685
+ var PemSchema = string().min(1).max(16384);
14686
+ /**
14687
+ * Why a device-certificate endpoint said no. Distinct from a transport / 5xx
14688
+ * failure: those carry no reason and mean "try again", never "the credential is
14689
+ * dead". The viewer switches on this exhaustively.
14690
+ */
14691
+ var DeviceRefusalReasonSchema = _enum([
14692
+ "revoked",
14693
+ "unknown-credential",
14694
+ "expired",
14695
+ "bad-signature",
14696
+ "nonce-invalid",
14697
+ "rate-limited",
14698
+ "invalid-certificate",
14699
+ "superseded",
14700
+ "user-gone",
14701
+ "unavailable",
14702
+ "code-invalid",
14703
+ "self-enrollment-disabled",
14704
+ "step-up-required",
14705
+ "bad-public-key"
14706
+ ]);
14707
+ var DeviceRefusalSchema = object({
14708
+ ok: literal(false),
14709
+ reason: DeviceRefusalReasonSchema,
14710
+ definitive: boolean(),
14711
+ retryAfterSeconds: number().optional()
14712
+ });
14713
+ object({
14714
+ code: string().min(1).max(256),
14715
+ /** SubjectPublicKeyInfo DER of the device's P-256 public key, base64url. */
14716
+ publicKeySpki: Base64UrlSchema,
14717
+ deviceName: string().min(1).max(80).optional(),
14718
+ platform: DevicePlatformSchema
14719
+ });
14720
+ discriminatedUnion("ok", [object({
14721
+ credentialId: string(),
14722
+ certPem: PemSchema,
14723
+ /** The device CA certificate the leaf chains to. */
14724
+ chainPem: PemSchema,
14725
+ notAfter: number(),
14726
+ user: object({
14727
+ id: string(),
14728
+ username: string()
14729
+ })
14730
+ }).extend({ ok: literal(true) }), DeviceRefusalSchema]);
14731
+ object({
14732
+ /** The single-use step-up proof (`auth.deviceEnrollProofFrom…`). */
14733
+ proof: string().min(1).max(512),
14734
+ publicKeySpki: Base64UrlSchema,
14735
+ deviceName: string().min(1).max(80),
14736
+ platform: DevicePlatformSchema
14737
+ });
14738
+ object({
14739
+ proof: string(),
14740
+ expiresAt: number()
14741
+ });
14742
+ discriminatedUnion("ok", [object({
14743
+ nonce: string(),
14744
+ /** The origin to put in the signed message. The app compares it to the hub it dialled. */
14745
+ origin: string(),
14746
+ expiresAt: number(),
14747
+ signature: literal(DEVICE_CERT_SIGNATURE)
14748
+ }).extend({ ok: literal(true) }), DeviceRefusalSchema]);
14749
+ object({
14750
+ certPem: PemSchema,
14751
+ nonce: string().min(1).max(256),
14752
+ /** ECDSA P-256 SHA-256 over {@link buildDeviceSignatureMessage}; raw r||s or DER, base64url. */
14753
+ signature: Base64UrlSchema
14754
+ });
14755
+ discriminatedUnion("ok", [object({
14756
+ credentialId: string(),
14757
+ certPem: PemSchema,
14758
+ chainPem: PemSchema,
14759
+ notAfter: number()
14760
+ }).extend({ ok: literal(true) }), DeviceRefusalSchema]);
14761
+ discriminatedUnion("ok", [object({
14762
+ ok: literal(true),
14763
+ credentialId: string(),
14764
+ sessionsEnded: number().int()
14765
+ }), DeviceRefusalSchema]);
14766
+ var DeviceCredentialStatusSchema = _enum([
14767
+ "active",
14768
+ "expired",
14769
+ "revoked"
14770
+ ]);
14771
+ var DeviceCredentialSchema = object({
14772
+ id: string(),
14773
+ userId: string(),
14774
+ username: string().nullable(),
14775
+ deviceName: string(),
14776
+ platform: DevicePlatformSchema,
14777
+ enrolledVia: _enum(["qr", "self"]),
14778
+ /** SHA-256 of the leaf certificate DER, colon-hex. */
14779
+ fingerprint: string(),
14780
+ issuedAt: number(),
14781
+ expiresAt: number(),
14782
+ lastUsedAt: number().nullable(),
14783
+ lastUsedFrom: string().nullable(),
14784
+ revokedAt: number().nullable(),
14785
+ /** `admin:<userId>` | `user:<userId>` | `device` | `user-deleted`. */
14786
+ revokedBy: string().nullable(),
14787
+ status: DeviceCredentialStatusSchema
14788
+ });
14789
+ var StartEnrollmentOutputSchema = object({
14790
+ /** Shown once; only its hash is kept. */
14791
+ code: string(),
14792
+ expiresAt: number(),
14793
+ /** `camstack://enroll?hub=…&code=…` — what the QR encodes. */
14794
+ enrollUrl: string(),
14795
+ /** The hub origin in the link, or `null` when the hub could not name one (the link then has no `hub`). */
14796
+ hubOrigin: string().nullable(),
14797
+ /** Every origin the apps may try (role `appConnections`). */
14798
+ hubOrigins: array(string())
14799
+ });
14800
+ object({
14801
+ kind: literal("device-certificate"),
14802
+ id: literal("device-certificate"),
14803
+ label: string(),
14804
+ stage: literal("primary"),
14805
+ /** tRPC paths under the hub's `auth` router, so a client names no literal. */
14806
+ challengePath: literal("auth.getDeviceChallenge"),
14807
+ revokePath: literal("auth.revokeOwnDeviceCertificate"),
14808
+ enrollSelfPath: literal("auth.enrollSelf"),
14809
+ loginPath: literal("auth.loginWithDeviceCertificate"),
14810
+ renewPath: literal("auth.renewDeviceCertificate"),
14811
+ signature: literal(DEVICE_CERT_SIGNATURE),
14812
+ messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
14813
+ /** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
14814
+ clients: array(_enum(["native", "web"]))
14815
+ });
14655
14816
  var ExpressionBindingSourceSchema = union([
14656
14817
  object({
14657
14818
  kind: literal("field").optional(),
@@ -17842,7 +18003,11 @@ var cameraStreamsCapability = {
17842
18003
  * See `RuntimeStateDurability`. Enforced by
17843
18004
  * `scripts/check-runtime-state-durability.ts`.
17844
18005
  */
17845
- durability: "session"
18006
+ durability: "session",
18007
+ /**
18008
+ * History (D850): none — `online` duplicates device-status.online (one authority); slot data is nested enum/string.
18009
+ */
18010
+ history: "none"
17846
18011
  };
17847
18012
  EventCategory.DoorbellOnPressed;
17848
18013
  var CompositionEventPlanSchema = object({
@@ -18675,6 +18840,341 @@ method(object({
18675
18840
  kind: "mutation",
18676
18841
  auth: "admin"
18677
18842
  }), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
18843
+ /**
18844
+ * device-history — the ONE mechanism for numeric history (D850).
18845
+ *
18846
+ * A device value is recorded because its capability says so (the `history`
18847
+ * block of a `*.cap.ts`, captured hub-side from `DeviceStateChanged`); any
18848
+ * other series is DECLARED by the addon that produces it and fed with points
18849
+ * (`record`) or closed five-minute buckets (`recordBuckets`). Rollups 5m / 1h /
18850
+ * 1d are computed here and nowhere else. Storage is `history.db` (D851).
18851
+ *
18852
+ * Who the PRODUCER is: `declareSeries`, `record` and `recordBuckets` are owner
18853
+ * checked against the `callerAddonId` the transport stamps into a call that
18854
+ * crossed a process (never in an input schema, so a session cannot supply it).
18855
+ * A call with no stamp is refused `not-owner`. The methods are `admin` so a
18856
+ * non-admin session never reaches them; an addon's `ctx.api` call bypasses the
18857
+ * tier by design.
18858
+ */
18859
+ /** Whose history: a real device, or a cluster node (load, memory). */
18860
+ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
18861
+ kind: literal("device"),
18862
+ deviceId: number().int()
18863
+ }), object({
18864
+ kind: literal("node"),
18865
+ nodeId: string().min(1)
18866
+ })]);
18867
+ var DeviceHistoryKindSchema = _enum([
18868
+ "gauge",
18869
+ "counter",
18870
+ "boolean"
18871
+ ]);
18872
+ var DeviceHistoryResolutionSchema = _enum([
18873
+ "raw",
18874
+ "5m",
18875
+ "1h",
18876
+ "1d"
18877
+ ]);
18878
+ /** Why a producer's point or bucket was not stored. Counted, never silent (D391). */
18879
+ var DeviceHistoryRefusalReasonSchema = _enum([
18880
+ "undeclared",
18881
+ "not-owner",
18882
+ "opted-out",
18883
+ "not-a-real-device",
18884
+ "rate",
18885
+ "ingest-mismatch",
18886
+ "out-of-range"
18887
+ ]);
18888
+ var RefusalSchema = object({
18889
+ key: string(),
18890
+ reason: DeviceHistoryRefusalReasonSchema,
18891
+ count: number().int()
18892
+ });
18893
+ var IngestResultSchema = object({
18894
+ accepted: number().int(),
18895
+ refused: array(RefusalSchema).readonly()
18896
+ });
18897
+ var SeriesInfoSchema = object({
18898
+ key: string(),
18899
+ scope: string(),
18900
+ kind: DeviceHistoryKindSchema,
18901
+ /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
18902
+ unit: string().nullable(),
18903
+ displayName: string(),
18904
+ source: _enum(["cap", "addon"]),
18905
+ firstTs: number(),
18906
+ lastTs: number()
18907
+ });
18908
+ var QueryPointSchema = object({
18909
+ /** Raw: the point's time. Rollup: the bucket start. */
18910
+ t: number(),
18911
+ samples: number().int(),
18912
+ /** `sum / samples`. */
18913
+ mean: number().nullable(),
18914
+ /** Time-weighted mean (`tw_sum / tw_ms`); `null` for bucket-ingested series. For a boolean: the fraction of time true. */
18915
+ twMean: number().nullable(),
18916
+ min: number(),
18917
+ max: number(),
18918
+ /** `null` is unknown, never zero (D393). */
18919
+ last: number().nullable()
18920
+ });
18921
+ var QuerySeriesSchema = object({
18922
+ scope: string(),
18923
+ /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
18924
+ before: object({
18925
+ t: number(),
18926
+ value: number().nullable()
18927
+ }).nullable(),
18928
+ points: array(QueryPointSchema).readonly()
18929
+ });
18930
+ /** The window part of a query, shared by the device and node forms. */
18931
+ var QueryWindowShape = {
18932
+ key: string(),
18933
+ scope: string().optional(),
18934
+ from: number(),
18935
+ to: number(),
18936
+ resolution: union([DeviceHistoryResolutionSchema, literal("auto")]).default("auto"),
18937
+ maxPoints: number().int().positive().max(5e3).default(1e3)
18938
+ };
18939
+ var QueryResultSchema = object({
18940
+ resolution: DeviceHistoryResolutionSchema,
18941
+ series: array(QuerySeriesSchema).readonly(),
18942
+ truncated: boolean()
18943
+ });
18944
+ var TierStatusSchema = object({
18945
+ tier: DeviceHistoryResolutionSchema,
18946
+ /** `null` until the first background count answered. */
18947
+ rows: number().int().nullable(),
18948
+ /** `rows` times a fixed per-row estimate — approximate, labelled so. */
18949
+ approxBytes: number().nullable(),
18950
+ countedAt: number().nullable()
18951
+ });
18952
+ /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
18953
+ var DeviceHistoryStatusSchema = object({
18954
+ startedAt: number(),
18955
+ /** The store is declared, series loaded and the first reconcile has answered. */
18956
+ ready: boolean(),
18957
+ series: number().int(),
18958
+ metrics: number().int(),
18959
+ optedOutDevices: number().int(),
18960
+ tiers: array(TierStatusSchema).readonly(),
18961
+ capture: object({
18962
+ eventsSeen: number().int(),
18963
+ pointsEmitted: number().int(),
18964
+ pointsWritten: number().int(),
18965
+ pointsDropped: number().int(),
18966
+ bufferDepth: number().int(),
18967
+ trailingEmitted: number().int(),
18968
+ reconciledPoints: number().int(),
18969
+ reconcileRuns: number().int(),
18970
+ reconcileFailures: number().int(),
18971
+ lastReconcileAt: number().nullable(),
18972
+ lastFlushAt: number().nullable(),
18973
+ flushFailures: number().int(),
18974
+ skipped: record(string(), number().int())
18975
+ }),
18976
+ ingest: object({
18977
+ accepted: number().int(),
18978
+ refused: record(string(), number().int())
18979
+ }),
18980
+ rollup: object({
18981
+ last5mAt: number().nullable(),
18982
+ last1hAt: number().nullable(),
18983
+ last1dAt: number().nullable(),
18984
+ errors: number().int(),
18985
+ dirty5m: number().int(),
18986
+ dirty1h: number().int(),
18987
+ dirty1d: number().int()
18988
+ }),
18989
+ retention: object({
18990
+ lastRunAt: number().nullable(),
18991
+ deleted: record(string(), number().int()),
18992
+ purgedSeries: number().int()
18993
+ }),
18994
+ directory: object({
18995
+ devices: number().int(),
18996
+ lastRefreshAt: number().nullable()
18997
+ })
18998
+ });
18999
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
19000
+ deviceId: number().int(),
19001
+ ...QueryWindowShape
19002
+ }), QueryResultSchema), method(object({
19003
+ nodeId: string().min(1),
19004
+ ...QueryWindowShape
19005
+ }), QueryResultSchema, { auth: "admin" }), method(object({
19006
+ name: string().regex(/^[a-z0-9-]+$/),
19007
+ subjectKind: _enum(["device", "node"]),
19008
+ kind: DeviceHistoryKindSchema,
19009
+ unit: string().optional(),
19010
+ displayName: string().min(1),
19011
+ ingest: _enum(["points", "buckets"])
19012
+ }), object({ key: string() }), {
19013
+ kind: "mutation",
19014
+ auth: "admin"
19015
+ }), method(object({ points: array(object({
19016
+ key: string(),
19017
+ subject: DeviceHistorySubjectSchema,
19018
+ scope: string().default(""),
19019
+ ts: number(),
19020
+ value: number()
19021
+ })).max(5e3) }), IngestResultSchema, {
19022
+ kind: "mutation",
19023
+ auth: "admin"
19024
+ }), method(object({ buckets: array(object({
19025
+ key: string(),
19026
+ subject: DeviceHistorySubjectSchema,
19027
+ scope: string().default(""),
19028
+ bucketStart: number(),
19029
+ samples: number().int().positive(),
19030
+ sum: number(),
19031
+ min: number(),
19032
+ max: number(),
19033
+ last: number().nullable(),
19034
+ lastTs: number().nullable()
19035
+ })).max(5e3) }), IngestResultSchema, {
19036
+ kind: "mutation",
19037
+ auth: "admin"
19038
+ }), method(object({ deviceId: number().int() }), object({ enabled: boolean() })), method(object({
19039
+ deviceId: number().int(),
19040
+ enabled: boolean()
19041
+ }), object({ enabled: boolean() }), {
19042
+ kind: "mutation",
19043
+ auth: "admin"
19044
+ }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
19045
+ var DeviceCaStatusSchema = discriminatedUnion("state", [
19046
+ object({ state: literal("absent") }),
19047
+ object({
19048
+ state: literal("ready"),
19049
+ subject: string(),
19050
+ fingerprintSha256: string(),
19051
+ validTo: string()
19052
+ }),
19053
+ object({
19054
+ state: literal("unavailable"),
19055
+ reason: string()
19056
+ })
19057
+ ]);
19058
+ var DeviceCertificateSettingsSchema = object({ selfEnrollment: _enum(["allowed", "disabled"]) });
19059
+ method(object({
19060
+ userId: string().min(1).optional(),
19061
+ includeRevoked: boolean().default(false)
19062
+ }), array(DeviceCredentialSchema).readonly(), { auth: "admin" }), method(object({
19063
+ userId: string().min(1),
19064
+ deviceName: string().min(1).max(80)
19065
+ }), StartEnrollmentOutputSchema, {
19066
+ kind: "mutation",
19067
+ auth: "admin",
19068
+ caller: "required"
19069
+ }), method(object({ id: string().min(1) }), object({
19070
+ revoked: boolean(),
19071
+ sessionsEnded: number().int(),
19072
+ status: DeviceCredentialStatusSchema
19073
+ }), {
19074
+ kind: "mutation",
19075
+ auth: "admin",
19076
+ caller: "required"
19077
+ }), method(object({}), DeviceCertificateSettingsSchema, { auth: "admin" }), method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
19078
+ kind: "mutation",
19079
+ auth: "admin"
19080
+ }), method(object({ id: string().min(1) }), object({ result: _enum([
19081
+ "deleted",
19082
+ "live",
19083
+ "unknown"
19084
+ ]) }), {
19085
+ kind: "mutation",
19086
+ auth: "admin",
19087
+ caller: "required"
19088
+ }), method(object({}), DeviceCaStatusSchema, { auth: "admin" }), method(object({
19089
+ id: string().min(1),
19090
+ deviceName: string().min(1).max(80)
19091
+ }), object({ renamed: boolean() }), {
19092
+ kind: "mutation",
19093
+ auth: "admin"
19094
+ });
19095
+ /**
19096
+ * `node-certificates` - what a node holds and the two renewals the hub drives
19097
+ * (D856): the node's MESH leaf (mutual TLS to the hub) and its HTTPS leaf (issued
19098
+ * from the hub's local CA so a device that trusts the hub root trusts the node).
19099
+ *
19100
+ * Provided by the AGENT RUNTIME (the synthetic `agent-runtime` addon id, like
19101
+ * `server-management`): the hub reaches it through the ordinary node-pinned
19102
+ * capability call - no new Moleculer action. The hub's own certificates are
19103
+ * handled in-process by the hub (`certificates` router), so this cap has no hub
19104
+ * provider.
19105
+ *
19106
+ * No private key ever crosses the mesh: the node generates its key pair, sends a
19107
+ * CSR, and the hub returns only the signed certificate.
19108
+ */
19109
+ var MeshLeafInfoSchema = object({
19110
+ cn: string(),
19111
+ serial: string(),
19112
+ fingerprintSha256: string(),
19113
+ notBefore: number(),
19114
+ notAfter: number()
19115
+ });
19116
+ var HttpsLeafInfoSchema = object({
19117
+ fingerprintSha256: string(),
19118
+ issuer: string(),
19119
+ sans: array(string()),
19120
+ notBefore: number(),
19121
+ notAfter: number()
19122
+ });
19123
+ var NodeHttpsStateSchema = discriminatedUnion("state", [object({
19124
+ state: literal("served"),
19125
+ leaf: HttpsLeafInfoSchema
19126
+ }), object({
19127
+ state: literal("not-issued"),
19128
+ reason: string()
19129
+ })]);
19130
+ method(object({}), object({
19131
+ nodeId: string(),
19132
+ mesh: MeshLeafInfoSchema.nullable(),
19133
+ https: NodeHttpsStateSchema
19134
+ }), { auth: "admin" }), method(object({}), object({ csrPem: string() }), {
19135
+ kind: "mutation",
19136
+ auth: "admin"
19137
+ }), method(object({
19138
+ certPem: string().min(1),
19139
+ caCertPem: string().min(1),
19140
+ confirmWithinMs: number().int().min(1e4).max(6e5)
19141
+ }), object({
19142
+ fingerprintSha256: string(),
19143
+ serial: string()
19144
+ }), {
19145
+ kind: "mutation",
19146
+ auth: "admin"
19147
+ }), method(object({ fingerprintSha256: string() }), object({ confirmed: boolean() }), {
19148
+ kind: "mutation",
19149
+ auth: "admin"
19150
+ }), method(object({}), object({ rolledBack: boolean() }), {
19151
+ kind: "mutation",
19152
+ auth: "admin"
19153
+ }), method(object({}), object({
19154
+ csrPem: string(),
19155
+ hostnames: array(string()),
19156
+ addresses: array(string()),
19157
+ /** SHA-256 of the hub local CA this node pinned at its first install; `null` before one. */
19158
+ pinnedCaFingerprintSha256: string().nullable()
19159
+ }), {
19160
+ kind: "mutation",
19161
+ auth: "admin"
19162
+ }), method(object({}), object({ ok: literal(true) }), {
19163
+ kind: "mutation",
19164
+ auth: "admin"
19165
+ }), method(object({
19166
+ certPem: string().min(1),
19167
+ caCertPem: string().min(1),
19168
+ /**
19169
+ * The hub signals that its local CA was rotated (D227) and this leaf chains to the NEW
19170
+ * one. Only the hub, over the authenticated mesh, can say so; a leaf with a different CA
19171
+ * and no signal is refused.
19172
+ */
19173
+ caRotation: boolean().optional()
19174
+ }), HttpsLeafInfoSchema, {
19175
+ kind: "mutation",
19176
+ auth: "admin"
19177
+ });
18678
19178
  var KeychainKeySourceSchema = object({
18679
19179
  kind: _enum([
18680
19180
  "config-file",
@@ -56054,6 +56554,13 @@ onStatusChanged: { data: object({
56054
56554
  * `scripts/check-runtime-state-durability.ts`.
56055
56555
  */
56056
56556
  durability: "restored",
56557
+ /**
56558
+ * History (D850): recorded series. The generic capture replaces the `battery` series of `pipeline-analytics:stats-5m`.
56559
+ */
56560
+ history: { fields: { percentage: {
56561
+ kind: "gauge",
56562
+ unit: "%"
56563
+ } } },
56057
56564
  /** Clock fields: written, but excluded from the compare that decides
56058
56565
  * whether persisting is worth a SQLite commit. */
56059
56566
  volatileStateFields: ["lastUpdated"]
@@ -58750,7 +59257,7 @@ var MotionOnMotionChangedDataSchema = object({
58750
59257
  /** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
58751
59258
  triggeredBy: MotionTriggeredBySchema.optional()
58752
59259
  });
58753
- DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
59260
+ DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean()), DeviceType.Camera;
58754
59261
  object({
58755
59262
  enabled: boolean(),
58756
59263
  /** Ms epoch of the last operator-driven change. */
@@ -62614,7 +63121,11 @@ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) }
62614
63121
  * See `RuntimeStateDurability`. Enforced by
62615
63122
  * `scripts/check-runtime-state-durability.ts`.
62616
63123
  */
62617
- durability: "session"
63124
+ durability: "session",
63125
+ /**
63126
+ * History (D850): none — recording intent is already in the recordings ledger.
63127
+ */
63128
+ history: "none"
62618
63129
  };
62619
63130
  /**
62620
63131
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -66495,6 +67006,54 @@ Object.freeze({
66495
67006
  addonId: null,
66496
67007
  access: "create"
66497
67008
  },
67009
+ "deviceCredentials.deleteDeviceCredential": {
67010
+ capName: "device-credentials",
67011
+ capScope: "system",
67012
+ addonId: null,
67013
+ access: "delete"
67014
+ },
67015
+ "deviceCredentials.getDeviceCaStatus": {
67016
+ capName: "device-credentials",
67017
+ capScope: "system",
67018
+ addonId: null,
67019
+ access: "view"
67020
+ },
67021
+ "deviceCredentials.getDeviceCertificateSettings": {
67022
+ capName: "device-credentials",
67023
+ capScope: "system",
67024
+ addonId: null,
67025
+ access: "view"
67026
+ },
67027
+ "deviceCredentials.listDeviceCredentials": {
67028
+ capName: "device-credentials",
67029
+ capScope: "system",
67030
+ addonId: null,
67031
+ access: "view"
67032
+ },
67033
+ "deviceCredentials.renameDeviceCredential": {
67034
+ capName: "device-credentials",
67035
+ capScope: "system",
67036
+ addonId: null,
67037
+ access: "create"
67038
+ },
67039
+ "deviceCredentials.revokeDeviceCredential": {
67040
+ capName: "device-credentials",
67041
+ capScope: "system",
67042
+ addonId: null,
67043
+ access: "delete"
67044
+ },
67045
+ "deviceCredentials.setDeviceCertificateSettings": {
67046
+ capName: "device-credentials",
67047
+ capScope: "system",
67048
+ addonId: null,
67049
+ access: "create"
67050
+ },
67051
+ "deviceCredentials.startEnrollment": {
67052
+ capName: "device-credentials",
67053
+ capScope: "system",
67054
+ addonId: null,
67055
+ access: "create"
67056
+ },
66498
67057
  "deviceDiscovery.adoptDevice": {
66499
67058
  capName: "device-discovery",
66500
67059
  capScope: "device",
@@ -66597,6 +67156,66 @@ Object.freeze({
66597
67156
  addonId: null,
66598
67157
  access: "create"
66599
67158
  },
67159
+ "deviceHistory.declareSeries": {
67160
+ capName: "device-history",
67161
+ capScope: "system",
67162
+ addonId: null,
67163
+ access: "create"
67164
+ },
67165
+ "deviceHistory.getDeviceEnabled": {
67166
+ capName: "device-history",
67167
+ capScope: "system",
67168
+ addonId: null,
67169
+ access: "view"
67170
+ },
67171
+ "deviceHistory.getStatus": {
67172
+ capName: "device-history",
67173
+ capScope: "system",
67174
+ addonId: null,
67175
+ access: "view"
67176
+ },
67177
+ "deviceHistory.listNodeSeries": {
67178
+ capName: "device-history",
67179
+ capScope: "system",
67180
+ addonId: null,
67181
+ access: "view"
67182
+ },
67183
+ "deviceHistory.listSeries": {
67184
+ capName: "device-history",
67185
+ capScope: "system",
67186
+ addonId: null,
67187
+ access: "view"
67188
+ },
67189
+ "deviceHistory.query": {
67190
+ capName: "device-history",
67191
+ capScope: "system",
67192
+ addonId: null,
67193
+ access: "view"
67194
+ },
67195
+ "deviceHistory.queryNode": {
67196
+ capName: "device-history",
67197
+ capScope: "system",
67198
+ addonId: null,
67199
+ access: "view"
67200
+ },
67201
+ "deviceHistory.record": {
67202
+ capName: "device-history",
67203
+ capScope: "system",
67204
+ addonId: null,
67205
+ access: "create"
67206
+ },
67207
+ "deviceHistory.recordBuckets": {
67208
+ capName: "device-history",
67209
+ capScope: "system",
67210
+ addonId: null,
67211
+ access: "create"
67212
+ },
67213
+ "deviceHistory.setDeviceEnabled": {
67214
+ capName: "device-history",
67215
+ capScope: "system",
67216
+ addonId: null,
67217
+ access: "create"
67218
+ },
66600
67219
  "deviceManager.addLocation": {
66601
67220
  capName: "device-manager",
66602
67221
  capScope: "system",
@@ -68655,6 +69274,54 @@ Object.freeze({
68655
69274
  addonId: null,
68656
69275
  access: "create"
68657
69276
  },
69277
+ "nodeCertificates.confirmMeshLeaf": {
69278
+ capName: "node-certificates",
69279
+ capScope: "system",
69280
+ addonId: null,
69281
+ access: "create"
69282
+ },
69283
+ "nodeCertificates.forgetHub": {
69284
+ capName: "node-certificates",
69285
+ capScope: "system",
69286
+ addonId: null,
69287
+ access: "delete"
69288
+ },
69289
+ "nodeCertificates.getCertificates": {
69290
+ capName: "node-certificates",
69291
+ capScope: "system",
69292
+ addonId: null,
69293
+ access: "view"
69294
+ },
69295
+ "nodeCertificates.installHttpsCertificate": {
69296
+ capName: "node-certificates",
69297
+ capScope: "system",
69298
+ addonId: null,
69299
+ access: "create"
69300
+ },
69301
+ "nodeCertificates.installMeshLeaf": {
69302
+ capName: "node-certificates",
69303
+ capScope: "system",
69304
+ addonId: null,
69305
+ access: "create"
69306
+ },
69307
+ "nodeCertificates.prepareHttpsCertificate": {
69308
+ capName: "node-certificates",
69309
+ capScope: "system",
69310
+ addonId: null,
69311
+ access: "create"
69312
+ },
69313
+ "nodeCertificates.prepareMeshRenewal": {
69314
+ capName: "node-certificates",
69315
+ capScope: "system",
69316
+ addonId: null,
69317
+ access: "create"
69318
+ },
69319
+ "nodeCertificates.rollbackMeshLeaf": {
69320
+ capName: "node-certificates",
69321
+ capScope: "system",
69322
+ addonId: null,
69323
+ access: "create"
69324
+ },
68658
69325
  "nodes.clusterAddonStatus": {
68659
69326
  capName: "nodes",
68660
69327
  capScope: "system",
@@ -73346,6 +74013,26 @@ Object.freeze({
73346
74013
  form: "single",
73347
74014
  optional: false
73348
74015
  }],
74016
+ "deviceHistory.getDeviceEnabled": [{
74017
+ name: "deviceId",
74018
+ form: "single",
74019
+ optional: false
74020
+ }],
74021
+ "deviceHistory.listSeries": [{
74022
+ name: "deviceId",
74023
+ form: "single",
74024
+ optional: false
74025
+ }],
74026
+ "deviceHistory.query": [{
74027
+ name: "deviceId",
74028
+ form: "single",
74029
+ optional: false
74030
+ }],
74031
+ "deviceHistory.setDeviceEnabled": [{
74032
+ name: "deviceId",
74033
+ form: "single",
74034
+ optional: false
74035
+ }],
73349
74036
  "deviceManager.adoptionRelease": [{
73350
74037
  name: "camDeviceId",
73351
74038
  form: "single",
@@ -75524,6 +76211,7 @@ Object.freeze({
75524
76211
  "network-access": "ingress",
75525
76212
  "smtp-provider": "email"
75526
76213
  });
76214
+ DeviceType.Camera;
75527
76215
  var G711_SCALE_CORRECTION_DB = {
75528
76216
  PCMU: 20 * Math.log10(4),
75529
76217
  PCMA: 20 * Math.log10(8)