@camstack/addon-model-studio 1.1.257 → 1.1.258

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 (18) hide show
  1. package/dist/{MotionZonesSettings-BT84Wq37.mjs → MotionZonesSettings-CkV2aUvO.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DdIj9GFm.mjs → PrivacyMaskSettings-A04FmFki.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-BcP_WDA0.mjs → SceneMonitorEditor-BGsdcHlo.mjs} +3 -3
  4. package/dist/_stub.js +23 -23
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BleLhneU.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-C9097na_.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D_ZqRreN.mjs +26 -0
  7. package/dist/{hostInit-ny0khOL5.mjs → hostInit-kJIPeeR8.mjs} +2 -2
  8. package/dist/model-studio.addon.js +381 -0
  9. package/dist/model-studio.addon.mjs +381 -0
  10. package/dist/{player-overlays-ljYzYEn3.mjs → player-overlays-CEo6fyPi.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BDi_5uNs.mjs → responsive-Pow15MKn.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-BL2nsF7x.mjs → scene-monitor-copy-DtoPg3LV.mjs} +1 -1
  14. package/dist/{square-CoH9q721.mjs → square-CaF-sfeh.mjs} +1 -1
  15. package/dist/{trash-2-Cxq92wV_.mjs → trash-2-DBoe6JLZ.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CRMC3HGj.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-EXT3i1_G.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C-FI2Czt.mjs +0 -26
@@ -12767,6 +12767,167 @@ var ConvertResultSchema = object({
12767
12767
  entry: ModelCatalogEntrySchema,
12768
12768
  artifacts: array(ConvertArtifactSchema).readonly()
12769
12769
  });
12770
+ /**
12771
+ * Device certificates (D855) — the wire contract shared by the hub, the admin
12772
+ * UI and the native viewer.
12773
+ *
12774
+ * A device (a phone) generates its OWN P-256 key pair in hardware (Secure
12775
+ * Enclave / Android Keystore / a non-extractable WebCrypto key). The private
12776
+ * key never travels. The hub signs the PUBLIC key into an X.509 leaf under a
12777
+ * dedicated device CA; the device later proves possession of the key by
12778
+ * signing a hub-issued nonce, and the hub answers with the same session a
12779
+ * password login opens.
12780
+ *
12781
+ * Everything on the wire is a small string (a PEM, a base64url signature):
12782
+ * D613 is about bulk bytes, and a certificate is ~600 bytes.
12783
+ */
12784
+ /** Signature algorithm of every device credential: ECDSA, curve P-256, SHA-256. */
12785
+ var DEVICE_CERT_SIGNATURE = "ecdsa-p256-sha256";
12786
+ /** First line of every signed message; a change of format bumps the version. */
12787
+ var DEVICE_SIGNATURE_MESSAGE_VERSION = "camstack-device-cert-v1";
12788
+ _enum([
12789
+ "login",
12790
+ "renew",
12791
+ "revoke"
12792
+ ]);
12793
+ var DevicePlatformSchema = _enum([
12794
+ "ios",
12795
+ "android",
12796
+ "web",
12797
+ "other"
12798
+ ]);
12799
+ var Base64UrlSchema = string().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/);
12800
+ var PemSchema = string().min(1).max(16384);
12801
+ /**
12802
+ * Why a device-certificate endpoint said no. Distinct from a transport / 5xx
12803
+ * failure: those carry no reason and mean "try again", never "the credential is
12804
+ * dead". The viewer switches on this exhaustively.
12805
+ */
12806
+ var DeviceRefusalReasonSchema = _enum([
12807
+ "revoked",
12808
+ "unknown-credential",
12809
+ "expired",
12810
+ "bad-signature",
12811
+ "nonce-invalid",
12812
+ "rate-limited",
12813
+ "invalid-certificate",
12814
+ "superseded",
12815
+ "user-gone",
12816
+ "unavailable",
12817
+ "code-invalid",
12818
+ "self-enrollment-disabled",
12819
+ "step-up-required",
12820
+ "bad-public-key"
12821
+ ]);
12822
+ var DeviceRefusalSchema = object({
12823
+ ok: literal(false),
12824
+ reason: DeviceRefusalReasonSchema,
12825
+ definitive: boolean(),
12826
+ retryAfterSeconds: number().optional()
12827
+ });
12828
+ object({
12829
+ code: string().min(1).max(256),
12830
+ /** SubjectPublicKeyInfo DER of the device's P-256 public key, base64url. */
12831
+ publicKeySpki: Base64UrlSchema,
12832
+ deviceName: string().min(1).max(80).optional(),
12833
+ platform: DevicePlatformSchema
12834
+ });
12835
+ discriminatedUnion("ok", [object({
12836
+ credentialId: string(),
12837
+ certPem: PemSchema,
12838
+ /** The device CA certificate the leaf chains to. */
12839
+ chainPem: PemSchema,
12840
+ notAfter: number(),
12841
+ user: object({
12842
+ id: string(),
12843
+ username: string()
12844
+ })
12845
+ }).extend({ ok: literal(true) }), DeviceRefusalSchema]);
12846
+ object({
12847
+ /** The single-use step-up proof (`auth.deviceEnrollProofFrom…`). */
12848
+ proof: string().min(1).max(512),
12849
+ publicKeySpki: Base64UrlSchema,
12850
+ deviceName: string().min(1).max(80),
12851
+ platform: DevicePlatformSchema
12852
+ });
12853
+ object({
12854
+ proof: string(),
12855
+ expiresAt: number()
12856
+ });
12857
+ discriminatedUnion("ok", [object({
12858
+ nonce: string(),
12859
+ /** The origin to put in the signed message. The app compares it to the hub it dialled. */
12860
+ origin: string(),
12861
+ expiresAt: number(),
12862
+ signature: literal(DEVICE_CERT_SIGNATURE)
12863
+ }).extend({ ok: literal(true) }), DeviceRefusalSchema]);
12864
+ object({
12865
+ certPem: PemSchema,
12866
+ nonce: string().min(1).max(256),
12867
+ /** ECDSA P-256 SHA-256 over {@link buildDeviceSignatureMessage}; raw r||s or DER, base64url. */
12868
+ signature: Base64UrlSchema
12869
+ });
12870
+ discriminatedUnion("ok", [object({
12871
+ credentialId: string(),
12872
+ certPem: PemSchema,
12873
+ chainPem: PemSchema,
12874
+ notAfter: number()
12875
+ }).extend({ ok: literal(true) }), DeviceRefusalSchema]);
12876
+ discriminatedUnion("ok", [object({
12877
+ ok: literal(true),
12878
+ credentialId: string(),
12879
+ sessionsEnded: number().int()
12880
+ }), DeviceRefusalSchema]);
12881
+ var DeviceCredentialStatusSchema = _enum([
12882
+ "active",
12883
+ "expired",
12884
+ "revoked"
12885
+ ]);
12886
+ var DeviceCredentialSchema = object({
12887
+ id: string(),
12888
+ userId: string(),
12889
+ username: string().nullable(),
12890
+ deviceName: string(),
12891
+ platform: DevicePlatformSchema,
12892
+ enrolledVia: _enum(["qr", "self"]),
12893
+ /** SHA-256 of the leaf certificate DER, colon-hex. */
12894
+ fingerprint: string(),
12895
+ issuedAt: number(),
12896
+ expiresAt: number(),
12897
+ lastUsedAt: number().nullable(),
12898
+ lastUsedFrom: string().nullable(),
12899
+ revokedAt: number().nullable(),
12900
+ /** `admin:<userId>` | `user:<userId>` | `device` | `user-deleted`. */
12901
+ revokedBy: string().nullable(),
12902
+ status: DeviceCredentialStatusSchema
12903
+ });
12904
+ var StartEnrollmentOutputSchema = object({
12905
+ /** Shown once; only its hash is kept. */
12906
+ code: string(),
12907
+ expiresAt: number(),
12908
+ /** `camstack://enroll?hub=…&code=…` — what the QR encodes. */
12909
+ enrollUrl: string(),
12910
+ /** The hub origin in the link, or `null` when the hub could not name one (the link then has no `hub`). */
12911
+ hubOrigin: string().nullable(),
12912
+ /** Every origin the apps may try (role `appConnections`). */
12913
+ hubOrigins: array(string())
12914
+ });
12915
+ object({
12916
+ kind: literal("device-certificate"),
12917
+ id: literal("device-certificate"),
12918
+ label: string(),
12919
+ stage: literal("primary"),
12920
+ /** tRPC paths under the hub's `auth` router, so a client names no literal. */
12921
+ challengePath: literal("auth.getDeviceChallenge"),
12922
+ revokePath: literal("auth.revokeOwnDeviceCertificate"),
12923
+ enrollSelfPath: literal("auth.enrollSelf"),
12924
+ loginPath: literal("auth.loginWithDeviceCertificate"),
12925
+ renewPath: literal("auth.renewDeviceCertificate"),
12926
+ signature: literal(DEVICE_CERT_SIGNATURE),
12927
+ messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
12928
+ /** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
12929
+ clients: array(_enum(["native", "web"]))
12930
+ });
12770
12931
  var ExpressionBindingSourceSchema = union([
12771
12932
  object({
12772
12933
  kind: literal("field").optional(),
@@ -16367,6 +16528,136 @@ method(object({
16367
16528
  kind: "mutation",
16368
16529
  auth: "admin"
16369
16530
  }), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
16531
+ var DeviceCaStatusSchema = discriminatedUnion("state", [
16532
+ object({ state: literal("absent") }),
16533
+ object({
16534
+ state: literal("ready"),
16535
+ subject: string(),
16536
+ fingerprintSha256: string(),
16537
+ validTo: string()
16538
+ }),
16539
+ object({
16540
+ state: literal("unavailable"),
16541
+ reason: string()
16542
+ })
16543
+ ]);
16544
+ var DeviceCertificateSettingsSchema = object({ selfEnrollment: _enum(["allowed", "disabled"]) });
16545
+ method(object({
16546
+ userId: string().min(1).optional(),
16547
+ includeRevoked: boolean().default(false)
16548
+ }), array(DeviceCredentialSchema).readonly(), { auth: "admin" }), method(object({
16549
+ userId: string().min(1),
16550
+ deviceName: string().min(1).max(80)
16551
+ }), StartEnrollmentOutputSchema, {
16552
+ kind: "mutation",
16553
+ auth: "admin",
16554
+ caller: "required"
16555
+ }), method(object({ id: string().min(1) }), object({
16556
+ revoked: boolean(),
16557
+ sessionsEnded: number().int(),
16558
+ status: DeviceCredentialStatusSchema
16559
+ }), {
16560
+ kind: "mutation",
16561
+ auth: "admin",
16562
+ caller: "required"
16563
+ }), method(object({}), DeviceCertificateSettingsSchema, { auth: "admin" }), method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
16564
+ kind: "mutation",
16565
+ auth: "admin"
16566
+ }), method(object({ id: string().min(1) }), object({ result: _enum([
16567
+ "deleted",
16568
+ "live",
16569
+ "unknown"
16570
+ ]) }), {
16571
+ kind: "mutation",
16572
+ auth: "admin",
16573
+ caller: "required"
16574
+ }), method(object({}), DeviceCaStatusSchema, { auth: "admin" }), method(object({
16575
+ id: string().min(1),
16576
+ deviceName: string().min(1).max(80)
16577
+ }), object({ renamed: boolean() }), {
16578
+ kind: "mutation",
16579
+ auth: "admin"
16580
+ });
16581
+ /**
16582
+ * `node-certificates` - what a node holds and the two renewals the hub drives
16583
+ * (D856): the node's MESH leaf (mutual TLS to the hub) and its HTTPS leaf (issued
16584
+ * from the hub's local CA so a device that trusts the hub root trusts the node).
16585
+ *
16586
+ * Provided by the AGENT RUNTIME (the synthetic `agent-runtime` addon id, like
16587
+ * `server-management`): the hub reaches it through the ordinary node-pinned
16588
+ * capability call - no new Moleculer action. The hub's own certificates are
16589
+ * handled in-process by the hub (`certificates` router), so this cap has no hub
16590
+ * provider.
16591
+ *
16592
+ * No private key ever crosses the mesh: the node generates its key pair, sends a
16593
+ * CSR, and the hub returns only the signed certificate.
16594
+ */
16595
+ var MeshLeafInfoSchema = object({
16596
+ cn: string(),
16597
+ serial: string(),
16598
+ fingerprintSha256: string(),
16599
+ notBefore: number(),
16600
+ notAfter: number()
16601
+ });
16602
+ var HttpsLeafInfoSchema = object({
16603
+ fingerprintSha256: string(),
16604
+ issuer: string(),
16605
+ sans: array(string()),
16606
+ notBefore: number(),
16607
+ notAfter: number()
16608
+ });
16609
+ var NodeHttpsStateSchema = discriminatedUnion("state", [object({
16610
+ state: literal("served"),
16611
+ leaf: HttpsLeafInfoSchema
16612
+ }), object({
16613
+ state: literal("not-issued"),
16614
+ reason: string()
16615
+ })]);
16616
+ method(object({}), object({
16617
+ nodeId: string(),
16618
+ mesh: MeshLeafInfoSchema.nullable(),
16619
+ https: NodeHttpsStateSchema
16620
+ }), { auth: "admin" }), method(object({}), object({ csrPem: string() }), {
16621
+ kind: "mutation",
16622
+ auth: "admin"
16623
+ }), method(object({
16624
+ certPem: string().min(1),
16625
+ caCertPem: string().min(1),
16626
+ confirmWithinMs: number().int().min(1e4).max(6e5)
16627
+ }), object({
16628
+ fingerprintSha256: string(),
16629
+ serial: string()
16630
+ }), {
16631
+ kind: "mutation",
16632
+ auth: "admin"
16633
+ }), method(object({ fingerprintSha256: string() }), object({ confirmed: boolean() }), {
16634
+ kind: "mutation",
16635
+ auth: "admin"
16636
+ }), method(object({}), object({ rolledBack: boolean() }), {
16637
+ kind: "mutation",
16638
+ auth: "admin"
16639
+ }), method(object({}), object({
16640
+ csrPem: string(),
16641
+ hostnames: array(string()),
16642
+ addresses: array(string()),
16643
+ /** SHA-256 of the hub local CA this node pinned at its first install; `null` before one. */
16644
+ pinnedCaFingerprintSha256: string().nullable()
16645
+ }), {
16646
+ kind: "mutation",
16647
+ auth: "admin"
16648
+ }), method(object({
16649
+ certPem: string().min(1),
16650
+ caCertPem: string().min(1),
16651
+ /**
16652
+ * The hub signals that its local CA was rotated (D227) and this leaf chains to the NEW
16653
+ * one. Only the hub, over the authenticated mesh, can say so; a leaf with a different CA
16654
+ * and no signal is refused.
16655
+ */
16656
+ caRotation: boolean().optional()
16657
+ }), HttpsLeafInfoSchema, {
16658
+ kind: "mutation",
16659
+ auth: "admin"
16660
+ });
16370
16661
  var KeychainKeySourceSchema = object({
16371
16662
  kind: _enum([
16372
16663
  "config-file",
@@ -62374,6 +62665,54 @@ Object.freeze({
62374
62665
  addonId: null,
62375
62666
  access: "create"
62376
62667
  },
62668
+ "deviceCredentials.deleteDeviceCredential": {
62669
+ capName: "device-credentials",
62670
+ capScope: "system",
62671
+ addonId: null,
62672
+ access: "delete"
62673
+ },
62674
+ "deviceCredentials.getDeviceCaStatus": {
62675
+ capName: "device-credentials",
62676
+ capScope: "system",
62677
+ addonId: null,
62678
+ access: "view"
62679
+ },
62680
+ "deviceCredentials.getDeviceCertificateSettings": {
62681
+ capName: "device-credentials",
62682
+ capScope: "system",
62683
+ addonId: null,
62684
+ access: "view"
62685
+ },
62686
+ "deviceCredentials.listDeviceCredentials": {
62687
+ capName: "device-credentials",
62688
+ capScope: "system",
62689
+ addonId: null,
62690
+ access: "view"
62691
+ },
62692
+ "deviceCredentials.renameDeviceCredential": {
62693
+ capName: "device-credentials",
62694
+ capScope: "system",
62695
+ addonId: null,
62696
+ access: "create"
62697
+ },
62698
+ "deviceCredentials.revokeDeviceCredential": {
62699
+ capName: "device-credentials",
62700
+ capScope: "system",
62701
+ addonId: null,
62702
+ access: "delete"
62703
+ },
62704
+ "deviceCredentials.setDeviceCertificateSettings": {
62705
+ capName: "device-credentials",
62706
+ capScope: "system",
62707
+ addonId: null,
62708
+ access: "create"
62709
+ },
62710
+ "deviceCredentials.startEnrollment": {
62711
+ capName: "device-credentials",
62712
+ capScope: "system",
62713
+ addonId: null,
62714
+ access: "create"
62715
+ },
62377
62716
  "deviceDiscovery.adoptDevice": {
62378
62717
  capName: "device-discovery",
62379
62718
  capScope: "device",
@@ -64534,6 +64873,48 @@ Object.freeze({
64534
64873
  addonId: null,
64535
64874
  access: "create"
64536
64875
  },
64876
+ "nodeCertificates.confirmMeshLeaf": {
64877
+ capName: "node-certificates",
64878
+ capScope: "system",
64879
+ addonId: null,
64880
+ access: "create"
64881
+ },
64882
+ "nodeCertificates.getCertificates": {
64883
+ capName: "node-certificates",
64884
+ capScope: "system",
64885
+ addonId: null,
64886
+ access: "view"
64887
+ },
64888
+ "nodeCertificates.installHttpsCertificate": {
64889
+ capName: "node-certificates",
64890
+ capScope: "system",
64891
+ addonId: null,
64892
+ access: "create"
64893
+ },
64894
+ "nodeCertificates.installMeshLeaf": {
64895
+ capName: "node-certificates",
64896
+ capScope: "system",
64897
+ addonId: null,
64898
+ access: "create"
64899
+ },
64900
+ "nodeCertificates.prepareHttpsCertificate": {
64901
+ capName: "node-certificates",
64902
+ capScope: "system",
64903
+ addonId: null,
64904
+ access: "create"
64905
+ },
64906
+ "nodeCertificates.prepareMeshRenewal": {
64907
+ capName: "node-certificates",
64908
+ capScope: "system",
64909
+ addonId: null,
64910
+ access: "create"
64911
+ },
64912
+ "nodeCertificates.rollbackMeshLeaf": {
64913
+ capName: "node-certificates",
64914
+ capScope: "system",
64915
+ addonId: null,
64916
+ access: "create"
64917
+ },
64537
64918
  "nodes.clusterAddonStatus": {
64538
64919
  capName: "nodes",
64539
64920
  capScope: "system",