@camstack/system 1.2.433 → 1.2.435
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.
- package/dist/{agent-https-DtRU9A7I.mjs → agent-https-B8lKYVtU.mjs} +34 -6
- package/dist/{agent-https-CHZTxK-q.js → agent-https-BZIwS4xF.js} +34 -6
- package/dist/auth/device-ca.d.ts +0 -10
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +3 -3
- package/dist/builtins/keychain/index.mjs +3 -3
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +9 -4
- package/dist/builtins/local-auth/local-auth.addon.mjs +9 -4
- package/dist/builtins/local-network/address-book.d.ts +13 -0
- package/dist/builtins/local-network/local-network.addon.d.ts +4 -2
- package/dist/builtins/local-network/local-network.addon.js +78 -22
- package/dist/builtins/local-network/local-network.addon.mjs +78 -22
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +23 -8
- package/dist/builtins/system-config/system-config.addon.mjs +23 -8
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-BgJWQMjr.js → composition-sources-Cm42mgbv.js} +1 -1
- package/dist/{composition-sources-8-cpAt1c.mjs → composition-sources-_7W2Ly9s.mjs} +1 -1
- package/dist/{constants-Ah3T_KAW.js → constants-DL87WgeN.js} +1 -1
- package/dist/{constants-Cg9ve13y.mjs → constants-DoiTA134.mjs} +1 -1
- package/dist/{device-ca-DUrcTW5h.mjs → device-ca-B6YJZus6.mjs} +17 -6
- package/dist/{device-ca-NNP4Jz0P.js → device-ca-WXuKc8AX.js} +17 -6
- package/dist/{dist-DJnlnL7P.mjs → dist-Bz4_y8Xy.mjs} +80 -11
- package/dist/{dist-C6Yvfhpq.js → dist-CnUtkSwN.js} +91 -10
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-B50jAU5C.js → hub-mdns-ciao-CBLvq2oj.js} +2 -2
- package/dist/{hub-mdns-ciao-8_Ed1Za5.mjs → hub-mdns-ciao-DJRwtlA8.mjs} +2 -2
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +0 -9
- package/dist/{lib-B_R6sPC3.mjs → lib-BeGzVQcd.mjs} +1 -1
- package/dist/{lib-DOJ5yyWA.js → lib-NNxHSOIE.js} +1 -1
- package/dist/{restore-archive-DqPaRjjY.js → restore-archive-BNoFLAg8.js} +1 -1
- package/dist/{restore-archive-C3_rzOCx.mjs → restore-archive-DJYuznWP.mjs} +1 -1
- package/dist/{retired-settings-keys-CAWHWDwy.mjs → retired-settings-keys-9nA85bwT.mjs} +1 -1
- package/dist/{retired-settings-keys-DJBQkZok.js → retired-settings-keys-CO3RqsDw.js} +1 -1
- package/dist/tls/cert-backdate.d.ts +10 -0
- package/dist/tls/cert-issue.d.ts +0 -20
- package/dist/{wal-maintenance-CPLvZbzA.js → wal-maintenance-D3gwRj1B.js} +0 -0
- package/dist/{wal-maintenance-Bc38yI3r.mjs → wal-maintenance-DLrbapzi.mjs} +0 -0
- package/dist/{x509.es-CAjSsrkk.mjs → x509.es-CDvj67p1.mjs} +14 -1
- package/dist/{x509.es-Dzl0BbmG.js → x509.es-r7Ht1thA.js} +19 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as KeyUsagesExtension, c as Pkcs10CertificateRequestGenerator, d as X509Certificate$1, f as X509CertificateGenerator, i as KeyUsageFlags, l as SubjectAlternativeNameExtension, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, s as Pkcs10CertificateRequest, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "./x509.es-
|
|
1
|
+
import { a as KeyUsagesExtension, c as Pkcs10CertificateRequestGenerator, d as X509Certificate$1, f as X509CertificateGenerator, g as backdatedNotBefore, i as KeyUsageFlags, l as SubjectAlternativeNameExtension, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, s as Pkcs10CertificateRequest, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "./x509.es-CDvj67p1.mjs";
|
|
2
2
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
3
3
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
4
4
|
import { isIP } from "node:net";
|
|
@@ -301,11 +301,39 @@ function collectCertIdentity(options) {
|
|
|
301
301
|
}
|
|
302
302
|
//#endregion
|
|
303
303
|
//#region src/tls/cert-issue.ts
|
|
304
|
+
/**
|
|
305
|
+
* Certificate issuance. Isolated so `cert-manager.ts` reads as policy and
|
|
306
|
+
* this file reads as mechanics.
|
|
307
|
+
*
|
|
308
|
+
* **In-process, by decision (D551).** This used to shell out to `openssl`
|
|
309
|
+
* three times. The hub's own TLS identity is not allowed to be a function
|
|
310
|
+
* of which openssl happens to sit on the host: this fleet alone runs four
|
|
311
|
+
* of them, and one — Ubuntu 20.04's 1.1.1f — silently ADDED the ambient
|
|
312
|
+
* `/etc/ssl/openssl.cnf` `[req] x509_extensions = v3_ca` block on top of
|
|
313
|
+
* our `-addext` flags, producing a root with two `basicConstraints` and
|
|
314
|
+
* two `subjectKeyIdentifier` extensions. RFC 5280 §4.2 allows each at
|
|
315
|
+
* most once, so OpenSSL 3 (which is what `node:crypto` is) marked that
|
|
316
|
+
* root invalid: `X509Certificate.ca` read `false` on our own CA and
|
|
317
|
+
* `checkIssued()` refused the pair. Under D227 that means "not issued by
|
|
318
|
+
* the local CA", i.e. rotate the root — on every boot, forever, voiding
|
|
319
|
+
* every trust an operator had granted by hand.
|
|
320
|
+
*
|
|
321
|
+
* Keys come from WebCrypto (`node:crypto`'s own implementation) and the
|
|
322
|
+
* DER is assembled by `@peculiar/x509`. Nothing here reads the host.
|
|
323
|
+
*/
|
|
304
324
|
cryptoProvider.set(webcrypto);
|
|
305
325
|
/** Subject of the local root. Distinct from the leaf's CN by construction. */
|
|
306
326
|
var CA_COMMON_NAME = "CamStack Local CA";
|
|
307
327
|
var MS_PER_DAY = 864e5;
|
|
308
328
|
/**
|
|
329
|
+
* Expiry of a served leaf. Browsers cap the TOTAL span (notBefore to notAfter) at 397 days, so
|
|
330
|
+
* the span is `validDays` counted from the backdated start: the backdate costs five minutes of
|
|
331
|
+
* expiry here, never extra span.
|
|
332
|
+
*/
|
|
333
|
+
function leafNotAfter(now, validDays) {
|
|
334
|
+
return new Date(backdatedNotBefore(now).getTime() + validDays * MS_PER_DAY);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
309
337
|
* RSA-2048 / SHA-256. Unchanged from the openssl invocation this replaces:
|
|
310
338
|
* every client that trusted the previous material still understands this.
|
|
311
339
|
*/
|
|
@@ -364,7 +392,7 @@ async function generateCa(now) {
|
|
|
364
392
|
const cert = await X509CertificateGenerator.createSelfSigned({
|
|
365
393
|
serialNumber: freshSerial(),
|
|
366
394
|
name: `CN=${CA_COMMON_NAME}`,
|
|
367
|
-
notBefore: now,
|
|
395
|
+
notBefore: backdatedNotBefore(now),
|
|
368
396
|
notAfter: new Date(now.getTime() + CA_VALIDITY_DAYS * MS_PER_DAY),
|
|
369
397
|
keys,
|
|
370
398
|
signingAlgorithm: SIGNING_ALGORITHM,
|
|
@@ -406,8 +434,8 @@ async function issueLeaf(ca, identity, commonName, validDays, now) {
|
|
|
406
434
|
serialNumber: freshSerial(),
|
|
407
435
|
subject: `CN=${commonName}`,
|
|
408
436
|
issuer: ca.cert.subject,
|
|
409
|
-
notBefore: now,
|
|
410
|
-
notAfter:
|
|
437
|
+
notBefore: backdatedNotBefore(now),
|
|
438
|
+
notAfter: leafNotAfter(now, validDays),
|
|
411
439
|
publicKey: keys.publicKey,
|
|
412
440
|
signingKey: ca.privateKey,
|
|
413
441
|
signingAlgorithm: SIGNING_ALGORITHM,
|
|
@@ -437,8 +465,8 @@ async function issueLeafFromCsr(ca, csrPem, identity, commonName, validDays, now
|
|
|
437
465
|
serialNumber: freshSerial(),
|
|
438
466
|
subject: `CN=${commonName}`,
|
|
439
467
|
issuer: ca.cert.subject,
|
|
440
|
-
notBefore: now,
|
|
441
|
-
notAfter:
|
|
468
|
+
notBefore: backdatedNotBefore(now),
|
|
469
|
+
notAfter: leafNotAfter(now, validDays),
|
|
442
470
|
publicKey: csr.publicKey,
|
|
443
471
|
signingKey: ca.privateKey,
|
|
444
472
|
signingAlgorithm: SIGNING_ALGORITHM,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_x509_es = require("./x509.es-
|
|
2
|
+
const require_x509_es = require("./x509.es-r7Ht1thA.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let _camstack_types_node = require("@camstack/types/node");
|
|
5
5
|
let node_net = require("node:net");
|
|
@@ -303,11 +303,39 @@ function collectCertIdentity(options) {
|
|
|
303
303
|
}
|
|
304
304
|
//#endregion
|
|
305
305
|
//#region src/tls/cert-issue.ts
|
|
306
|
+
/**
|
|
307
|
+
* Certificate issuance. Isolated so `cert-manager.ts` reads as policy and
|
|
308
|
+
* this file reads as mechanics.
|
|
309
|
+
*
|
|
310
|
+
* **In-process, by decision (D551).** This used to shell out to `openssl`
|
|
311
|
+
* three times. The hub's own TLS identity is not allowed to be a function
|
|
312
|
+
* of which openssl happens to sit on the host: this fleet alone runs four
|
|
313
|
+
* of them, and one — Ubuntu 20.04's 1.1.1f — silently ADDED the ambient
|
|
314
|
+
* `/etc/ssl/openssl.cnf` `[req] x509_extensions = v3_ca` block on top of
|
|
315
|
+
* our `-addext` flags, producing a root with two `basicConstraints` and
|
|
316
|
+
* two `subjectKeyIdentifier` extensions. RFC 5280 §4.2 allows each at
|
|
317
|
+
* most once, so OpenSSL 3 (which is what `node:crypto` is) marked that
|
|
318
|
+
* root invalid: `X509Certificate.ca` read `false` on our own CA and
|
|
319
|
+
* `checkIssued()` refused the pair. Under D227 that means "not issued by
|
|
320
|
+
* the local CA", i.e. rotate the root — on every boot, forever, voiding
|
|
321
|
+
* every trust an operator had granted by hand.
|
|
322
|
+
*
|
|
323
|
+
* Keys come from WebCrypto (`node:crypto`'s own implementation) and the
|
|
324
|
+
* DER is assembled by `@peculiar/x509`. Nothing here reads the host.
|
|
325
|
+
*/
|
|
306
326
|
require_x509_es.cryptoProvider.set(node_crypto.webcrypto);
|
|
307
327
|
/** Subject of the local root. Distinct from the leaf's CN by construction. */
|
|
308
328
|
var CA_COMMON_NAME = "CamStack Local CA";
|
|
309
329
|
var MS_PER_DAY = 864e5;
|
|
310
330
|
/**
|
|
331
|
+
* Expiry of a served leaf. Browsers cap the TOTAL span (notBefore to notAfter) at 397 days, so
|
|
332
|
+
* the span is `validDays` counted from the backdated start: the backdate costs five minutes of
|
|
333
|
+
* expiry here, never extra span.
|
|
334
|
+
*/
|
|
335
|
+
function leafNotAfter(now, validDays) {
|
|
336
|
+
return new Date(require_x509_es.backdatedNotBefore(now).getTime() + validDays * MS_PER_DAY);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
311
339
|
* RSA-2048 / SHA-256. Unchanged from the openssl invocation this replaces:
|
|
312
340
|
* every client that trusted the previous material still understands this.
|
|
313
341
|
*/
|
|
@@ -366,7 +394,7 @@ async function generateCa(now) {
|
|
|
366
394
|
const cert = await require_x509_es.X509CertificateGenerator.createSelfSigned({
|
|
367
395
|
serialNumber: freshSerial(),
|
|
368
396
|
name: `CN=${CA_COMMON_NAME}`,
|
|
369
|
-
notBefore: now,
|
|
397
|
+
notBefore: require_x509_es.backdatedNotBefore(now),
|
|
370
398
|
notAfter: new Date(now.getTime() + CA_VALIDITY_DAYS * MS_PER_DAY),
|
|
371
399
|
keys,
|
|
372
400
|
signingAlgorithm: SIGNING_ALGORITHM,
|
|
@@ -408,8 +436,8 @@ async function issueLeaf(ca, identity, commonName, validDays, now) {
|
|
|
408
436
|
serialNumber: freshSerial(),
|
|
409
437
|
subject: `CN=${commonName}`,
|
|
410
438
|
issuer: ca.cert.subject,
|
|
411
|
-
notBefore: now,
|
|
412
|
-
notAfter:
|
|
439
|
+
notBefore: require_x509_es.backdatedNotBefore(now),
|
|
440
|
+
notAfter: leafNotAfter(now, validDays),
|
|
413
441
|
publicKey: keys.publicKey,
|
|
414
442
|
signingKey: ca.privateKey,
|
|
415
443
|
signingAlgorithm: SIGNING_ALGORITHM,
|
|
@@ -439,8 +467,8 @@ async function issueLeafFromCsr(ca, csrPem, identity, commonName, validDays, now
|
|
|
439
467
|
serialNumber: freshSerial(),
|
|
440
468
|
subject: `CN=${commonName}`,
|
|
441
469
|
issuer: ca.cert.subject,
|
|
442
|
-
notBefore: now,
|
|
443
|
-
notAfter:
|
|
470
|
+
notBefore: require_x509_es.backdatedNotBefore(now),
|
|
471
|
+
notAfter: leafNotAfter(now, validDays),
|
|
444
472
|
publicKey: csr.publicKey,
|
|
445
473
|
signingKey: ca.privateKey,
|
|
446
474
|
signingAlgorithm: SIGNING_ALGORITHM,
|
package/dist/auth/device-ca.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Device CA (D855) — the THIRD certificate authority, distinct from the HTTPS
|
|
3
|
-
* local CA (`tls/cert-issue.ts`, RSA) and the mesh CA
|
|
4
|
-
* (`kernel/moleculer/mesh-mtls/mesh-ca.ts`). EC P-256, key in the keychain
|
|
5
|
-
* (owner `system`), certificate persisted like `cluster.meshCa`.
|
|
6
|
-
*
|
|
7
|
-
* It signs ONE kind of leaf: a device credential. The device generated the key
|
|
8
|
-
* pair; the hub only ever sees the public half (an SPKI). Same library and
|
|
9
|
-
* WebCrypto path as the other two CAs, same pinned `@peculiar/x509`.
|
|
10
|
-
*/
|
|
11
1
|
import type { webcrypto as WebCrypto } from "node:crypto";
|
|
12
2
|
import { X509Certificate as PeculiarCertificate } from "@peculiar/x509";
|
|
13
3
|
/** `secret://system/global/deviceCaKey` — EC P-256 PKCS#8 PEM of the device CA. */
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as addonPagesCapability, br as errMsg, pi as EventCategory, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { br as errMsg, et as addonWidgetsCapability, pi as EventCategory, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
//#region src/builtins/alerts/device-label.ts
|
|
8
8
|
/**
|
|
9
9
|
* Operator-facing device label for alert messages.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Lr as createEvent, br as errMsg, i as AlertSchema, pi as EventCategory, tt as alertsCapability, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
//#region src/builtins/alerts/device-label.ts
|
|
3
3
|
/**
|
|
4
4
|
* Operator-facing device label for alert messages.
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dn as ptzAutotrackCapability, Kr as isEvent, br as errMsg, it as bareAddonId, k as FIRST_LEVEL_MACRO_CLASSES, pi as EventCategory, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_restore_archive = require("../../restore-archive-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
|
+
const require_restore_archive = require("../../restore-archive-BNoFLAg8.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
10
10
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-
|
|
1
|
+
import { Qr as nodePin, pi as EventCategory, pn as mayWriteToLocation, qn as storageOccupancyCapability, rt as backupCapability, ui as toNodeId, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
|
+
import { a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-DJYuznWP.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as CalendarPreferencesSchema, ut as calendarsCapability, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as DeclaredDevices, Lr as createEvent, S as DERIVED_CAMERA_SILENCED_CAP_NAMES, Tt as declarationOwnerNodeId, Wn as snapshotCapability, Wr as hydrateSchema, Yn as streamCatalogCapability, _n as motionCapability, _r as DeviceFeature, br as errMsg, dt as cameraGridLayoutCapability, mn as memoizePinnedFfmpeg, o as BaseDevice, or as buildFfmpegArgs, pi as EventCategory, xr as BaseAddon, yr as DeviceType, z as MOTION_CLOSE_AFTER_MS } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-Cm42mgbv.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/shared/device-state-changed.ts
|
|
10
10
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DeclaredDevices,
|
|
2
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
1
|
+
import { D as DeclaredDevices, Lr as createEvent, Rt as evaluateCompositionField, Vt as expressionContainsBuiltinCall, ar as COMPOSER_ADDON_ID, br as errMsg, cr as composedDeviceRef, d as COMPOSED_ITEM_FIXED_FIELDS, dr as compositionItemFieldPath, fr as compositionSliceKey, gr as toExpressionValue, hr as disarmRoseMemory, ht as compositionFieldKey, lr as composedDeviceStableId, mr as createStatefulExpressionMemory, mt as composerCapability, o as BaseDevice, ot as buildCapabilityLookup, pi as EventCategory, pr as compositionSourceKey, r as ALL_CAPABILITY_DEFINITIONS, sr as cloneStatefulExpressionMemory, ur as compositionFeatureEnabled, wn as planComposition, xr as BaseAddon, yr as DeviceType } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
|
+
import { n as normalizedNativeOwner } from "../../composition-sources-_7W2Ly9s.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/shared/device-state-changed.ts
|
|
5
5
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ln as logDestinationCapability, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
4
|
-
const require_composition_sources = require("../../composition-sources-
|
|
3
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
4
|
+
const require_composition_sources = require("../../composition-sources-Cm42mgbv.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as describeCompositionSources } from "../../composition-sources-
|
|
1
|
+
import { $n as validateComposition, D as DeclaredDevices, Mn as resolveCoreBlockEntry, Nn as resolveCoreBlockFiles, Wr as hydrateSchema, _t as coreBlockAddonId, br as errMsg, bt as coreBlockSourceKind, cr as composedDeviceRef, f as COMPOSER_RUNNER_ID, g as CoreBlockSchema, gt as compositionSourceRefs, kn as replacedFieldKeys, kt as describeComposableCaps, m as CORE_BLOCK_ADDON_PREFIX, ot as buildCapabilityLookup, p as CORE_BLOCKS_ADDON_ID, pr as compositionSourceKey, r as ALL_CAPABILITY_DEFINITIONS, vn as normalizeCoreBlockWrite, vt as coreBlockComposition, wn as planComposition, xr as BaseAddon, xt as coreBlocksCapability, yt as coreBlockIdFromAddonId } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
|
+
import { t as describeCompositionSources } from "../../composition-sources-_7W2Ly9s.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { customizationBlockName } from "@camstack/types/node";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-CO3RqsDw.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as FieldClaimModeSchema,
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { A as FieldClaimModeSchema, Ar as WELL_KNOWN_TAB_MAP, Bt as expandContainer, Dt as defineExtensionSlotProvider, Gr as isDeviceConfigCap, Ir as collectZodSecretPaths, It as enumerateItemArrayFields, Jr as isSecretClear, Kt as formatMinutes, Lt as enumerateSchemaFields, Mt as deviceManagerCapability, Nt as deviceStateCapability, O as DeviceStatusSchema, Pt as deviceStatusCapability, R as MINUTES_PER_DAY, Rn as runtimeStatePolicyFor, Sn as parseStreamParamsFormPatch, St as createDeviceExtensionProvider, Un as siteZoneKey, W as STREAM_PROFILE_META, Xr as isSecretMarkerLike, Yr as isSecretMarker, _r as DeviceFeature, ai as resolveSecretMarkers, br as errMsg, c as CAMERA_SWITCH_ORDER, cn as locationIconKey, di as toSecretFieldView, fi as transformSecretWrite, ft as canonicalIconKey, in as legacyAutoLinkIds, j as FieldClaimSchema, jt as deviceExtensionCapability, kr as SECRET_CLEAR, li as sleep$1, lt as buildStreamParamsConfigSchema, pi as EventCategory, qr as isKeychainStoredField, r as ALL_CAPABILITY_DEFINITIONS, si as secretTreeFromPaths, u as CAP_NAMES_WITH_STATUS, vr as DeviceRole, x as DAY_NAMES, xr as BaseAddon, yn as normalizeUnit, yr as DeviceType } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-9nA85bwT.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ln as logDestinationCapability, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
8
|
-
const require_constants = require("../../constants-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-WXuKc8AX.js");
|
|
8
|
+
const require_constants = require("../../constants-DL87WgeN.js");
|
|
9
9
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
10
10
|
let node_crypto = require("node:crypto");
|
|
11
11
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
3
|
-
import { a as MESH_CA_KEY_REF, p as CLUSTER_SECRET_SETTINGS_KEY } from "../../constants-
|
|
1
|
+
import { $r as normalizeSecretOwner, P as KEYCHAIN_RESET_TRIGGER_ACTOR, Ur as formatSecretScope, ni as parseSecretRef, nn as keychainAdminCapability, pi as EventCategory, rn as keychainCapability, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-B6YJZus6.mjs";
|
|
3
|
+
import { a as MESH_CA_KEY_REF, p as CLUSTER_SECRET_SETTINGS_KEY } from "../../constants-DoiTA134.mjs";
|
|
4
4
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
5
5
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
6
6
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
4
4
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
5
5
|
var NO_DEVICES = "liveness:no-devices";
|
|
6
6
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as RecordingStatusSchema, Lr as createEvent, V as RECORDING_SOURCE_CAMSTACK_ADDON, br as errMsg, pi as EventCategory, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
2
2
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
3
3
|
var NO_DEVICES = "liveness:no-devices";
|
|
4
4
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -3,10 +3,10 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CnUtkSwN.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
9
|
-
const require_device_ca = require("../../device-ca-
|
|
9
|
+
const require_device_ca = require("../../device-ca-WXuKc8AX.js");
|
|
10
10
|
let node_crypto = require("node:crypto");
|
|
11
11
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
12
12
|
let crypto$1 = require("crypto");
|
|
@@ -6125,7 +6125,8 @@ var AuthManager = class {
|
|
|
6125
6125
|
...payload.refreshTtl !== void 0 ? { refreshTtl: payload.refreshTtl } : {},
|
|
6126
6126
|
...payload.linkIntent !== void 0 ? { linkIntent: payload.linkIntent } : {},
|
|
6127
6127
|
...payload.issuer !== void 0 ? { issuer: payload.issuer } : {},
|
|
6128
|
-
...payload.browserBinding !== void 0 ? { browserBinding: payload.browserBinding } : {}
|
|
6128
|
+
...payload.browserBinding !== void 0 ? { browserBinding: payload.browserBinding } : {},
|
|
6129
|
+
...payload.app !== void 0 ? { app: payload.app } : {}
|
|
6129
6130
|
};
|
|
6130
6131
|
/**
|
|
6131
6132
|
* `'never'` mints with NO `exp` claim, and the option must be OMITTED to do
|
|
@@ -6170,6 +6171,9 @@ var AuthManager = class {
|
|
|
6170
6171
|
const linkIntent = typeof decoded["linkIntent"] === "string" ? decoded["linkIntent"] : void 0;
|
|
6171
6172
|
const issuer = typeof decoded["issuer"] === "string" ? decoded["issuer"] : void 0;
|
|
6172
6173
|
const browserBinding = typeof decoded["browserBinding"] === "string" ? decoded["browserBinding"] : void 0;
|
|
6174
|
+
const appParsed = require_dist.SsoBridgeClaimsSchema.shape.app.safeParse(decoded["app"]);
|
|
6175
|
+
if (!appParsed.success) return null;
|
|
6176
|
+
const app = appParsed.data;
|
|
6173
6177
|
const rawRefreshTtl = decoded["refreshTtl"];
|
|
6174
6178
|
const refreshTtl = rawRefreshTtl === "never" || typeof rawRefreshTtl === "number" && rawRefreshTtl > 0 ? rawRefreshTtl : void 0;
|
|
6175
6179
|
return {
|
|
@@ -6188,7 +6192,8 @@ var AuthManager = class {
|
|
|
6188
6192
|
...refreshTtl !== void 0 ? { refreshTtl } : {},
|
|
6189
6193
|
...linkIntent !== void 0 ? { linkIntent } : {},
|
|
6190
6194
|
...issuer !== void 0 ? { issuer } : {},
|
|
6191
|
-
...browserBinding !== void 0 ? { browserBinding } : {}
|
|
6195
|
+
...browserBinding !== void 0 ? { browserBinding } : {},
|
|
6196
|
+
...app !== void 0 ? { app } : {}
|
|
6192
6197
|
};
|
|
6193
6198
|
} catch {
|
|
6194
6199
|
return null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { C as DEVICE_ENROLLMENT_TTL_MS,
|
|
2
|
+
import { At as deviceCredentialsCapability, C as DEVICE_ENROLLMENT_TTL_MS, G as ScopedTokenSchema, Gt as formatDeviceRevoker, K as SsoBridgeClaimsSchema, Qn as userManagementCapability, Z as UserRecordSchema, a as ApiKeyRecordSchema, ct as buildDeviceSignatureMessage, nt as authProviderCapability, st as buildDeviceEnrollmentLink, w as DEVICE_NONCE_TTL_MS, xr as BaseAddon } from "../../dist-Bz4_y8Xy.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-
|
|
5
|
+
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-B6YJZus6.mjs";
|
|
6
6
|
import * as crypto$1 from "node:crypto";
|
|
7
7
|
import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import nodeCrypto from "crypto";
|
|
@@ -6115,7 +6115,8 @@ var AuthManager = class {
|
|
|
6115
6115
|
...payload.refreshTtl !== void 0 ? { refreshTtl: payload.refreshTtl } : {},
|
|
6116
6116
|
...payload.linkIntent !== void 0 ? { linkIntent: payload.linkIntent } : {},
|
|
6117
6117
|
...payload.issuer !== void 0 ? { issuer: payload.issuer } : {},
|
|
6118
|
-
...payload.browserBinding !== void 0 ? { browserBinding: payload.browserBinding } : {}
|
|
6118
|
+
...payload.browserBinding !== void 0 ? { browserBinding: payload.browserBinding } : {},
|
|
6119
|
+
...payload.app !== void 0 ? { app: payload.app } : {}
|
|
6119
6120
|
};
|
|
6120
6121
|
/**
|
|
6121
6122
|
* `'never'` mints with NO `exp` claim, and the option must be OMITTED to do
|
|
@@ -6160,6 +6161,9 @@ var AuthManager = class {
|
|
|
6160
6161
|
const linkIntent = typeof decoded["linkIntent"] === "string" ? decoded["linkIntent"] : void 0;
|
|
6161
6162
|
const issuer = typeof decoded["issuer"] === "string" ? decoded["issuer"] : void 0;
|
|
6162
6163
|
const browserBinding = typeof decoded["browserBinding"] === "string" ? decoded["browserBinding"] : void 0;
|
|
6164
|
+
const appParsed = SsoBridgeClaimsSchema.shape.app.safeParse(decoded["app"]);
|
|
6165
|
+
if (!appParsed.success) return null;
|
|
6166
|
+
const app = appParsed.data;
|
|
6163
6167
|
const rawRefreshTtl = decoded["refreshTtl"];
|
|
6164
6168
|
const refreshTtl = rawRefreshTtl === "never" || typeof rawRefreshTtl === "number" && rawRefreshTtl > 0 ? rawRefreshTtl : void 0;
|
|
6165
6169
|
return {
|
|
@@ -6178,7 +6182,8 @@ var AuthManager = class {
|
|
|
6178
6182
|
...refreshTtl !== void 0 ? { refreshTtl } : {},
|
|
6179
6183
|
...linkIntent !== void 0 ? { linkIntent } : {},
|
|
6180
6184
|
...issuer !== void 0 ? { issuer } : {},
|
|
6181
|
-
...browserBinding !== void 0 ? { browserBinding } : {}
|
|
6185
|
+
...browserBinding !== void 0 ? { browserBinding } : {},
|
|
6186
|
+
...app !== void 0 ? { app } : {}
|
|
6182
6187
|
};
|
|
6183
6188
|
} catch {
|
|
6184
6189
|
return null;
|
|
@@ -80,6 +80,19 @@ export declare function customEndpoint(entry: CustomAddress): ConnectionEndpoint
|
|
|
80
80
|
* addresses flagged `appConnections` (a detected URL is never listed twice).
|
|
81
81
|
*/
|
|
82
82
|
export declare function withAppConnectionCustomEndpoints(detected: readonly ConnectionEndpoint[], state: AddressBookState): ConnectionEndpoint[];
|
|
83
|
+
/**
|
|
84
|
+
* The HTTPS counterpart of every LAN address advertised over plain HTTP
|
|
85
|
+
* (D859): `http://<lan>:<httpPort>` gains `https://<lan>:<httpsPort>`, the hub's
|
|
86
|
+
* TLS listener, as its own row straight after it. The twin is an ordinary
|
|
87
|
+
* detected LAN row — ticked, unticked and flagged like any other, on by default
|
|
88
|
+
* (a LAN row is an automatic app connection). A phone that does not trust the
|
|
89
|
+
* hub's local CA fails that candidate in the race it already runs; one that
|
|
90
|
+
* does reaches it. Only the app-connection palette and the table carry twins:
|
|
91
|
+
* the palette `internal` and `publicEndpoint` resolve over never does, so those
|
|
92
|
+
* roles keep their answer. Rows already on https (LAN HTTP off), the public
|
|
93
|
+
* tunnel, the mesh, custom addresses and loopback have no twin.
|
|
94
|
+
*/
|
|
95
|
+
export declare function withLanHttpsCounterparts(palette: readonly ConnectionEndpoint[], httpsPort: number): ConnectionEndpoint[];
|
|
83
96
|
export interface AddressBookInputs {
|
|
84
97
|
/** Detected endpoints in the scheme the rows are shown in. */
|
|
85
98
|
readonly rowsPalette: readonly ConnectionEndpoint[];
|
|
@@ -75,6 +75,8 @@ export declare class LocalNetworkAddon extends BaseAddon<LocalNetworkConfig> {
|
|
|
75
75
|
/** Optional public hostname tracked from `NetworkTunnelStarted`/
|
|
76
76
|
* `Stopped` events on the bus. */
|
|
77
77
|
private publicHostname;
|
|
78
|
+
/** False for a Quick tunnel: shown in the palette, never picked automatically (D860). */
|
|
79
|
+
private publicHostnameStable;
|
|
78
80
|
/**
|
|
79
81
|
* Mesh-reachable endpoint (Tailscale MagicDNS / 100.x), learned from
|
|
80
82
|
* the `MeshNetworkChanged` event-tail and refreshed by a pull-reconcile
|
|
@@ -142,7 +144,7 @@ export declare class LocalNetworkAddon extends BaseAddon<LocalNetworkConfig> {
|
|
|
142
144
|
* `onInitialize`. This setter exists for tests + future direct
|
|
143
145
|
* callers; cleared by passing an empty string.
|
|
144
146
|
*/
|
|
145
|
-
setPublicHostname(hostname: string): void;
|
|
147
|
+
setPublicHostname(hostname: string, stable?: boolean): void;
|
|
146
148
|
/**
|
|
147
149
|
* Replace the cached mesh endpoint. Set from the `MeshNetworkChanged`
|
|
148
150
|
* event-tail + the pull-reconcile; exposed for tests + future direct
|
|
@@ -270,7 +272,7 @@ export interface LanHttpAdvertisement {
|
|
|
270
272
|
* only emitted on `includeAppLink: true`.
|
|
271
273
|
*/
|
|
272
274
|
export declare function appLinkEndpoint(): ConnectionEndpoint;
|
|
273
|
-
export declare function buildEndpoints(interfaces: readonly LocalInterface[], port: number, includeLoopback: boolean, ipv4Only: boolean, publicHostname: string, scheme?: "http" | "https", meshEndpoint?: MeshEndpointCache | null, lanHttp?: LanHttpAdvertisement | null): ConnectionEndpoint[];
|
|
275
|
+
export declare function buildEndpoints(interfaces: readonly LocalInterface[], port: number, includeLoopback: boolean, ipv4Only: boolean, publicHostname: string, scheme?: "http" | "https", meshEndpoint?: MeshEndpointCache | null, lanHttp?: LanHttpAdvertisement | null, publicHostnameStable?: boolean): ConnectionEndpoint[];
|
|
274
276
|
/**
|
|
275
277
|
* First-boot heuristic: which addresses should the allowlist start
|
|
276
278
|
* with? Includes LAN + Wi-Fi IPv4 addresses + plausible IPv6:
|