@camstack/system 1.2.435 → 1.2.437
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-B8lKYVtU.mjs → agent-https-BPfHrI4c.mjs} +3 -3
- package/dist/auth/login-session-manager.d.ts +2 -0
- package/dist/auth/session-revocation-bus.d.ts +32 -0
- 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 +5 -5
- 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 +6 -7
- package/dist/builtins/keychain/index.mjs +6 -7
- package/dist/builtins/keychain/keychain-service.d.ts +1 -2
- package/dist/builtins/keychain/system-held-secrets.d.ts +5 -5
- 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 +43 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +43 -3
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +4 -4
- 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 +10 -10
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +8 -8
- 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.d.ts +11 -23
- package/dist/builtins/system-config/system-config.addon.js +219 -1479
- package/dist/builtins/system-config/system-config.addon.mjs +222 -1472
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-Cm42mgbv.js → composition-sources-BIT8IUKm.js} +1 -1
- package/dist/{composition-sources-_7W2Ly9s.mjs → composition-sources-tpYR0f1x.mjs} +1 -1
- package/dist/constants-Bc6trhoW.mjs +20 -0
- package/dist/constants-CwRY32Nx.js +66 -0
- package/dist/{device-ca-B6YJZus6.mjs → device-ca-BhdBByGD.mjs} +1 -1
- package/dist/{device-ca-WXuKc8AX.js → device-ca-DImD8IzR.js} +1 -1
- package/dist/{dist-CnUtkSwN.js → dist-CEAyXW3Q.js} +42 -12
- package/dist/{dist-Bz4_y8Xy.mjs → dist-m5JkT8UN.mjs} +33 -3
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-DJRwtlA8.mjs → hub-mdns-ciao-DMlQTdPU.mjs} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +135 -796
- package/dist/index.mjs +150 -769
- package/dist/kernel/index.d.ts +7 -21
- package/dist/kernel/moleculer/agent-ui-unlock.d.ts +7 -32
- package/dist/kernel/moleculer/broker-factory.d.ts +3 -9
- package/dist/kernel/moleculer/broker-transport-swap.d.ts +17 -0
- package/dist/kernel/moleculer/hub-service.d.ts +6 -16
- package/dist/kernel/moleculer/mesh-access-middleware.d.ts +7 -17
- package/dist/kernel/moleculer/mesh-identity.d.ts +57 -0
- package/dist/kernel/moleculer/mesh-mtls/constants.d.ts +1 -4
- package/dist/kernel/moleculer/mesh-mtls/index.d.ts +1 -4
- package/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +1 -1
- package/dist/kernel/moleculer/mesh-mtls/mesh-renewal.d.ts +1 -1
- package/dist/kernel/moleculer/node-registry.d.ts +0 -6
- package/dist/kernel/moleculer/register-node-client.d.ts +9 -7
- package/dist/{restore-archive-BNoFLAg8.js → restore-archive-C75srVbG.js} +1 -1
- package/dist/{restore-archive-DJYuznWP.mjs → restore-archive-DNxAStrJ.mjs} +1 -1
- package/dist/{retired-settings-keys-9nA85bwT.mjs → retired-settings-keys-C5qP9QIf.mjs} +1 -1
- package/dist/{retired-settings-keys-CO3RqsDw.js → retired-settings-keys-DNfV28R_.js} +1 -1
- package/dist/{wal-maintenance-D3gwRj1B.js → wal-maintenance-Ch79gy9S.js} +0 -0
- package/dist/{wal-maintenance-DLrbapzi.mjs → wal-maintenance-DvnVO5IK.mjs} +0 -0
- package/package.json +1 -1
- package/dist/builtins/system-config/cluster-secret-keeper.d.ts +0 -63
- package/dist/constants-DL87WgeN.js +0 -221
- package/dist/constants-DoiTA134.mjs +0 -102
- package/dist/kernel/moleculer/agent-mesh-authenticator.d.ts +0 -91
- package/dist/kernel/moleculer/cluster-secret.d.ts +0 -46
- package/dist/kernel/moleculer/mesh-auth-mode.d.ts +0 -58
- package/dist/kernel/moleculer/mesh-authenticator.d.ts +0 -77
- package/dist/kernel/moleculer/mesh-auto-enforce.d.ts +0 -46
- package/dist/kernel/moleculer/mesh-join-client.d.ts +0 -73
- package/dist/kernel/moleculer/mesh-join-hold.d.ts +0 -85
- package/dist/kernel/moleculer/mesh-join-proof.d.ts +0 -39
- package/dist/kernel/moleculer/mesh-mtls/mesh-enroll.d.ts +0 -34
- package/dist/kernel/moleculer/mesh-mtls/mesh-join-token.d.ts +0 -56
|
@@ -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-CEAyXW3Q.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as BaseAddon, un as logDestinationCapability } from "../../dist-m5JkT8UN.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Sr as errMsg, hr as compositionSourceKey } from "./dist-m5JkT8UN.mjs";
|
|
2
2
|
//#region src/builtins/core-blocks/composition-sources.ts
|
|
3
3
|
/**
|
|
4
4
|
* Describe what a composition reads and writes for SAVE-time validation
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ir as buildSecretRef } from "./dist-m5JkT8UN.mjs";
|
|
2
|
+
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
3
|
+
var MESH_CA_KEY_REF = buildSecretRef({
|
|
4
|
+
owner: "system",
|
|
5
|
+
scope: { kind: "global" },
|
|
6
|
+
fieldPath: "meshCaKey"
|
|
7
|
+
});
|
|
8
|
+
/** `system-settings` key holding the public CA certificate PEM. */
|
|
9
|
+
var MESH_CA_SETTINGS_KEY = "cluster.meshCa";
|
|
10
|
+
/** Field inside the `cluster` section. */
|
|
11
|
+
var MESH_CA_FIELD = "meshCa";
|
|
12
|
+
var MESH_CA_VALIDITY_DAYS = 3650;
|
|
13
|
+
var DEFAULT_HUB_TLS_TCP_PORT = 6443;
|
|
14
|
+
/** Subject of the mesh root. Distinct from the HTTPS local CA. */
|
|
15
|
+
var MESH_CA_COMMON_NAME = "CamStack Mesh CA";
|
|
16
|
+
/** Client + server auth EKU OIDs (mutual TLS). */
|
|
17
|
+
var SERVER_AUTH_OID = "1.3.6.1.5.5.7.3.1";
|
|
18
|
+
var CLIENT_AUTH_OID = "1.3.6.1.5.5.7.3.2";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { MESH_CA_KEY_REF as a, SERVER_AUTH_OID as c, MESH_CA_FIELD as i, DEFAULT_HUB_TLS_TCP_PORT as n, MESH_CA_SETTINGS_KEY as o, MESH_CA_COMMON_NAME as r, MESH_CA_VALIDITY_DAYS as s, CLIENT_AUTH_OID as t };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-CEAyXW3Q.js").buildSecretRef({
|
|
3
|
+
owner: "system",
|
|
4
|
+
scope: { kind: "global" },
|
|
5
|
+
fieldPath: "meshCaKey"
|
|
6
|
+
});
|
|
7
|
+
/** `system-settings` key holding the public CA certificate PEM. */
|
|
8
|
+
var MESH_CA_SETTINGS_KEY = "cluster.meshCa";
|
|
9
|
+
/** Field inside the `cluster` section. */
|
|
10
|
+
var MESH_CA_FIELD = "meshCa";
|
|
11
|
+
var MESH_CA_VALIDITY_DAYS = 3650;
|
|
12
|
+
var DEFAULT_HUB_TLS_TCP_PORT = 6443;
|
|
13
|
+
/** Subject of the mesh root. Distinct from the HTTPS local CA. */
|
|
14
|
+
var MESH_CA_COMMON_NAME = "CamStack Mesh CA";
|
|
15
|
+
/** Client + server auth EKU OIDs (mutual TLS). */
|
|
16
|
+
var SERVER_AUTH_OID = "1.3.6.1.5.5.7.3.1";
|
|
17
|
+
var CLIENT_AUTH_OID = "1.3.6.1.5.5.7.3.2";
|
|
18
|
+
//#endregion
|
|
19
|
+
Object.defineProperty(exports, "CLIENT_AUTH_OID", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function() {
|
|
22
|
+
return CLIENT_AUTH_OID;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "DEFAULT_HUB_TLS_TCP_PORT", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function() {
|
|
28
|
+
return DEFAULT_HUB_TLS_TCP_PORT;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "MESH_CA_COMMON_NAME", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function() {
|
|
34
|
+
return MESH_CA_COMMON_NAME;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "MESH_CA_FIELD", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function() {
|
|
40
|
+
return MESH_CA_FIELD;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "MESH_CA_KEY_REF", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return MESH_CA_KEY_REF;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "MESH_CA_SETTINGS_KEY", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function() {
|
|
52
|
+
return MESH_CA_SETTINGS_KEY;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "MESH_CA_VALIDITY_DAYS", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function() {
|
|
58
|
+
return MESH_CA_VALIDITY_DAYS;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "SERVER_AUTH_OID", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function() {
|
|
64
|
+
return SERVER_AUTH_OID;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as DEVICE_SAN_USER_PREFIX,
|
|
1
|
+
import { E as DEVICE_SAN_USER_PREFIX, Ir as buildSecretRef, T as DEVICE_SAN_CREDENTIAL_PREFIX } from "./dist-m5JkT8UN.mjs";
|
|
2
2
|
import { a as KeyUsagesExtension, 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, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "./x509.es-CDvj67p1.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|
|
@@ -9769,6 +9769,7 @@ function scopesAllowAddon(scopes, addonId, access) {
|
|
|
9769
9769
|
return scopes.some((s) => s.type === "addon" && s.target === addonId && s.access.includes(access));
|
|
9770
9770
|
}
|
|
9771
9771
|
zod.z.enum(["new-session", "step-up"]);
|
|
9772
|
+
zod.z.enum(["en", "it"]);
|
|
9772
9773
|
/** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
|
|
9773
9774
|
var AppLoginPathSchema = zod.z.discriminatedUnion("kind", [zod.z.object({ kind: zod.z.literal("native") }), zod.z.object({
|
|
9774
9775
|
kind: zod.z.literal("browser"),
|
|
@@ -54193,7 +54194,9 @@ var SsoBridgeClaimsSchema = zod.z.object({
|
|
|
54193
54194
|
codeChallenge: zod.z.string(),
|
|
54194
54195
|
state: zod.z.string(),
|
|
54195
54196
|
purpose: zod.z.enum(["new-session", "step-up"]),
|
|
54196
|
-
redirect: zod.z.string()
|
|
54197
|
+
redirect: zod.z.string(),
|
|
54198
|
+
/** The page language the app asked for (D858); the confirm page speaks it. */
|
|
54199
|
+
lang: zod.z.enum(["en", "it"]).optional()
|
|
54197
54200
|
}).optional()
|
|
54198
54201
|
});
|
|
54199
54202
|
var ssoBridgeCapability = {
|
|
@@ -68642,6 +68645,27 @@ var switchCapability = {
|
|
|
68642
68645
|
}
|
|
68643
68646
|
}] }
|
|
68644
68647
|
};
|
|
68648
|
+
/** C0 controls, DEL and the C1 range: none of them belongs in a name. */
|
|
68649
|
+
function hasControlCharacter(value) {
|
|
68650
|
+
for (const char of value) {
|
|
68651
|
+
const code = char.codePointAt(0) ?? 0;
|
|
68652
|
+
if (code <= 31 || code >= 127 && code <= 159) return true;
|
|
68653
|
+
}
|
|
68654
|
+
return false;
|
|
68655
|
+
}
|
|
68656
|
+
/** A name an operator may save: trimmed, 1-48 characters, no control characters. */
|
|
68657
|
+
var ServerNameSchema = zod.z.string().transform((value) => value.trim()).pipe(zod.z.string().min(1, "The server name cannot be empty").max(48, `The server name is at most 48 characters`).refine((value) => !hasControlCharacter(value), { message: "The server name cannot contain control characters" }));
|
|
68658
|
+
/** What every reader gets: the name to show, and whether the hub chose it itself. */
|
|
68659
|
+
var ServerNameInfoSchema = zod.z.object({
|
|
68660
|
+
name: zod.z.string(),
|
|
68661
|
+
/** `true` when nobody named the hub: `name` is the machine hostname. */
|
|
68662
|
+
isDefault: zod.z.boolean()
|
|
68663
|
+
});
|
|
68664
|
+
/** The hostname without its domain (`nas.lan.example` becomes `nas`). */
|
|
68665
|
+
function shortHostname(hostname) {
|
|
68666
|
+
const first = hostname.trim().split(".")[0] ?? "";
|
|
68667
|
+
return first.length > 0 ? first : "hub";
|
|
68668
|
+
}
|
|
68645
68669
|
/**
|
|
68646
68670
|
* system — system-scoped singleton capability exposing hub-level
|
|
68647
68671
|
* health, feature flags, network interface enumeration, and the
|
|
@@ -68671,6 +68695,12 @@ var FeatureManifestSchema = zod.z.object({
|
|
|
68671
68695
|
backup: zod.z.boolean(),
|
|
68672
68696
|
repl: zod.z.boolean()
|
|
68673
68697
|
});
|
|
68698
|
+
/**
|
|
68699
|
+
* `system.info`: the feature flags plus the hub's human name (D861). The name is
|
|
68700
|
+
* `{ name, isDefault }` — `isDefault: true` means nobody named the hub and `name`
|
|
68701
|
+
* is the machine hostname.
|
|
68702
|
+
*/
|
|
68703
|
+
var SystemInfoSchema = FeatureManifestSchema.extend({ serverName: ServerNameInfoSchema });
|
|
68674
68704
|
var HealthStatusSchema = zod.z.object({
|
|
68675
68705
|
status: zod.z.literal("ok"),
|
|
68676
68706
|
uptime: zod.z.number()
|
|
@@ -69157,7 +69187,7 @@ var systemCapability = {
|
|
|
69157
69187
|
scope: "system",
|
|
69158
69188
|
mode: "singleton",
|
|
69159
69189
|
methods: {
|
|
69160
|
-
info: method(zod.z.void(),
|
|
69190
|
+
info: method(zod.z.void(), SystemInfoSchema),
|
|
69161
69191
|
health: method(zod.z.void(), HealthStatusSchema),
|
|
69162
69192
|
featureFlags: method(zod.z.void(), FeatureManifestSchema),
|
|
69163
69193
|
networkAddresses: method(zod.z.void(), zod.z.array(NetworkAddressSchema).readonly()),
|
|
@@ -85937,6 +85967,12 @@ Object.defineProperty(exports, "ScopedTokenSchema", {
|
|
|
85937
85967
|
return ScopedTokenSchema;
|
|
85938
85968
|
}
|
|
85939
85969
|
});
|
|
85970
|
+
Object.defineProperty(exports, "ServerNameSchema", {
|
|
85971
|
+
enumerable: true,
|
|
85972
|
+
get: function() {
|
|
85973
|
+
return ServerNameSchema;
|
|
85974
|
+
}
|
|
85975
|
+
});
|
|
85940
85976
|
Object.defineProperty(exports, "SsoBridgeClaimsSchema", {
|
|
85941
85977
|
enumerable: true,
|
|
85942
85978
|
get: function() {
|
|
@@ -86573,12 +86609,6 @@ Object.defineProperty(exports, "looseSchema", {
|
|
|
86573
86609
|
return looseSchema;
|
|
86574
86610
|
}
|
|
86575
86611
|
});
|
|
86576
|
-
Object.defineProperty(exports, "makeSecretMarker", {
|
|
86577
|
-
enumerable: true,
|
|
86578
|
-
get: function() {
|
|
86579
|
-
return makeSecretMarker;
|
|
86580
|
-
}
|
|
86581
|
-
});
|
|
86582
86612
|
Object.defineProperty(exports, "mayReadLocation", {
|
|
86583
86613
|
enumerable: true,
|
|
86584
86614
|
get: function() {
|
|
@@ -86819,16 +86849,16 @@ Object.defineProperty(exports, "secretTreeFromPaths", {
|
|
|
86819
86849
|
return secretTreeFromPaths;
|
|
86820
86850
|
}
|
|
86821
86851
|
});
|
|
86822
|
-
Object.defineProperty(exports, "
|
|
86852
|
+
Object.defineProperty(exports, "settingsStoreCapability", {
|
|
86823
86853
|
enumerable: true,
|
|
86824
86854
|
get: function() {
|
|
86825
|
-
return
|
|
86855
|
+
return settingsStoreCapability;
|
|
86826
86856
|
}
|
|
86827
86857
|
});
|
|
86828
|
-
Object.defineProperty(exports, "
|
|
86858
|
+
Object.defineProperty(exports, "shortHostname", {
|
|
86829
86859
|
enumerable: true,
|
|
86830
86860
|
get: function() {
|
|
86831
|
-
return
|
|
86861
|
+
return shortHostname;
|
|
86832
86862
|
}
|
|
86833
86863
|
});
|
|
86834
86864
|
Object.defineProperty(exports, "siteZoneKey", {
|
|
@@ -9769,6 +9769,7 @@ function scopesAllowAddon(scopes, addonId, access) {
|
|
|
9769
9769
|
return scopes.some((s) => s.type === "addon" && s.target === addonId && s.access.includes(access));
|
|
9770
9770
|
}
|
|
9771
9771
|
z.enum(["new-session", "step-up"]);
|
|
9772
|
+
z.enum(["en", "it"]);
|
|
9772
9773
|
/** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
|
|
9773
9774
|
var AppLoginPathSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("native") }), z.object({
|
|
9774
9775
|
kind: z.literal("browser"),
|
|
@@ -54193,7 +54194,9 @@ var SsoBridgeClaimsSchema = z.object({
|
|
|
54193
54194
|
codeChallenge: z.string(),
|
|
54194
54195
|
state: z.string(),
|
|
54195
54196
|
purpose: z.enum(["new-session", "step-up"]),
|
|
54196
|
-
redirect: z.string()
|
|
54197
|
+
redirect: z.string(),
|
|
54198
|
+
/** The page language the app asked for (D858); the confirm page speaks it. */
|
|
54199
|
+
lang: z.enum(["en", "it"]).optional()
|
|
54197
54200
|
}).optional()
|
|
54198
54201
|
});
|
|
54199
54202
|
var ssoBridgeCapability = {
|
|
@@ -68642,6 +68645,27 @@ var switchCapability = {
|
|
|
68642
68645
|
}
|
|
68643
68646
|
}] }
|
|
68644
68647
|
};
|
|
68648
|
+
/** C0 controls, DEL and the C1 range: none of them belongs in a name. */
|
|
68649
|
+
function hasControlCharacter(value) {
|
|
68650
|
+
for (const char of value) {
|
|
68651
|
+
const code = char.codePointAt(0) ?? 0;
|
|
68652
|
+
if (code <= 31 || code >= 127 && code <= 159) return true;
|
|
68653
|
+
}
|
|
68654
|
+
return false;
|
|
68655
|
+
}
|
|
68656
|
+
/** A name an operator may save: trimmed, 1-48 characters, no control characters. */
|
|
68657
|
+
var ServerNameSchema = z.string().transform((value) => value.trim()).pipe(z.string().min(1, "The server name cannot be empty").max(48, `The server name is at most 48 characters`).refine((value) => !hasControlCharacter(value), { message: "The server name cannot contain control characters" }));
|
|
68658
|
+
/** What every reader gets: the name to show, and whether the hub chose it itself. */
|
|
68659
|
+
var ServerNameInfoSchema = z.object({
|
|
68660
|
+
name: z.string(),
|
|
68661
|
+
/** `true` when nobody named the hub: `name` is the machine hostname. */
|
|
68662
|
+
isDefault: z.boolean()
|
|
68663
|
+
});
|
|
68664
|
+
/** The hostname without its domain (`nas.lan.example` becomes `nas`). */
|
|
68665
|
+
function shortHostname(hostname) {
|
|
68666
|
+
const first = hostname.trim().split(".")[0] ?? "";
|
|
68667
|
+
return first.length > 0 ? first : "hub";
|
|
68668
|
+
}
|
|
68645
68669
|
/**
|
|
68646
68670
|
* system — system-scoped singleton capability exposing hub-level
|
|
68647
68671
|
* health, feature flags, network interface enumeration, and the
|
|
@@ -68671,6 +68695,12 @@ var FeatureManifestSchema = z.object({
|
|
|
68671
68695
|
backup: z.boolean(),
|
|
68672
68696
|
repl: z.boolean()
|
|
68673
68697
|
});
|
|
68698
|
+
/**
|
|
68699
|
+
* `system.info`: the feature flags plus the hub's human name (D861). The name is
|
|
68700
|
+
* `{ name, isDefault }` — `isDefault: true` means nobody named the hub and `name`
|
|
68701
|
+
* is the machine hostname.
|
|
68702
|
+
*/
|
|
68703
|
+
var SystemInfoSchema = FeatureManifestSchema.extend({ serverName: ServerNameInfoSchema });
|
|
68674
68704
|
var HealthStatusSchema = z.object({
|
|
68675
68705
|
status: z.literal("ok"),
|
|
68676
68706
|
uptime: z.number()
|
|
@@ -69157,7 +69187,7 @@ var systemCapability = {
|
|
|
69157
69187
|
scope: "system",
|
|
69158
69188
|
mode: "singleton",
|
|
69159
69189
|
methods: {
|
|
69160
|
-
info: method(z.void(),
|
|
69190
|
+
info: method(z.void(), SystemInfoSchema),
|
|
69161
69191
|
health: method(z.void(), HealthStatusSchema),
|
|
69162
69192
|
featureFlags: method(z.void(), FeatureManifestSchema),
|
|
69163
69193
|
networkAddresses: method(z.void(), z.array(NetworkAddressSchema).readonly()),
|
|
@@ -85583,4 +85613,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
85583
85613
|
return out;
|
|
85584
85614
|
}
|
|
85585
85615
|
//#endregion
|
|
85586
|
-
export {
|
|
85616
|
+
export { addonPagesCapability as $, supportedRuntimes as $n, nodePin as $r, isLocationEnabled as $t, FieldClaimModeSchema as A, replacedFieldKeys as An, ReadinessTimeoutError as Ar, describeComposableCaps as At, NetworkTunnelStartedDataSchema as B, scopesAllowAddon as Bn, customAction as Br, evictionPolicyOfLocation as Bt, DEVICE_ENROLLMENT_TTL_MS as C, parseStreamParamsFormPatch as Cn, BaseAddon as Cr, createDeviceExtensionProvider as Ct, DeclaredDevices as D, procedureAuthKey as Dn, REDACTED_SECRET as Dr, decodeVectorBase64 as Dt, DEVICE_SAN_USER_PREFIX as E, platformProbeCapability as En, DEVICE_STATUS_METHOD as Er, declarationOwnerNodeId as Et, LOG_LEVEL_RANK as F, resolveHubAddressRoles as Fn, asString$1 as Fr, deviceStatusCapability as Ft, ScopedTokenSchema as G, siteZoneKey as Gn, formatSecretScope as Gr, foldSnapshotByFunction as Gt, RecordingStatusSchema as H, scoreRuntimes as Hn, emitDownForOwnedCaps as Hr, expressionContainsBuiltinCall as Ht, LegacyStorageLocationDefaultSchema as I, resolveLocationMode as In, buildSecretRef as Ir, enumerateInferenceDevices as It, StorageCleanupJobSchema as J, storageMigrationCapability as Jn, isEvent as Jr, gbToBytes as Jt, ServerNameSchema as K, snapshotCapability as Kn, hydrateSchema as Kr, formatDeviceRevoker as Kt, METHOD_ACCESS_MAP as L, resolveMethodAuth as Ln, collectSecretConfigKeys as Lr, enumerateItemArrayFields as Lt, HUB_MDNS_SERVICE_TYPE as M, resolveBucketMs as Mn, WELL_KNOWN_TAB_MAP as Mr, deviceExtensionCapability as Mt, HUB_MDNS_TXT_KEYS as N, resolveCoreBlockEntry as Nn, asJsonObject as Nr, deviceManagerCapability as Nt, DeviceStatusSchema as O, ptzAutotrackCapability as On, RUNTIME_DEFAULTS as Or, defineExtensionSlotProvider as Ot, KEYCHAIN_RESET_TRIGGER_ACTOR as P, resolveCoreBlockFiles as Pn, asNumber as Pr, deviceStateCapability as Pt, UserRecordSchema as Q, streamQualityLabel as Qn, isSecretMarkerLike as Qr, isDefaultAppConnectionEndpoint as Qt, MINUTES_PER_DAY as R, resolveNotificationTapAddress as Rn, collectZodSecretPaths as Rr, enumerateSchemaFields as Rt, DERIVED_CAMERA_SILENCED_CAP_NAMES as S, objectInputDeclaresRequiredDeviceId as Sn, errMsg as Sr, coreBlocksCapability as St, DEVICE_SAN_CREDENTIAL_PREFIX as T, planComposition as Tn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Tr, databaseSnapshotCapability as Tt, STORAGE_ACCESS_FALLBACK as U, settingsStoreCapability as Un, emitReadiness as Ur, extractNestedAddonId as Ut, RECORDING_SOURCE_CAMSTACK_ADDON as V, scopesAllowDeviceCap as Vn, defineCustomActions as Vr, expandContainer as Vt, STREAM_PROFILE_META as W, shortHostname as Wn, expandCapMethods as Wr, filesystemBrowseCapability as Wt, StorageLocationTypeSchema as X, storageProviderCapability as Xn, isSecretClear as Xr, isArrayOutputSchema as Xt, StorageLocationModeSchema as Y, storageOccupancyCapability as Yn, isKeychainStoredField as Yr, isAppLinkBase as Yt, StorageMigrationJobSchema as Z, streamCatalogCapability as Zn, isSecretMarker as Zr, isCollectionArrayMethod as Zt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as _, modeMayWrite as _n, disarmRoseMemory as _r, compositionSourceRefs as _t, ApiKeyRecordSchema as a, resolveCapMount as ai, legacyAutoLinkIds as an, vectorStoreCapability as ar, bareAddonId as at, DATA_STORE_DATABASES as b, normalizeUnit as bn, DeviceRole as br, coreBlockIdFromAddonId as bt, CAMERA_SWITCH_ORDER as c, secretTreeFromPaths as ci, localNetworkCapability as cn, buildFfmpegArgs as cr, buildDeviceEnrollmentLink as ct, COMPOSED_ITEM_FIXED_FIELDS as d, toSecretFieldView as di, logLevelAtMost as dn, composedDeviceStableId as dr, calendarsCapability as dt, normalizeSecretOwner as ei, isObjectInput as en, userManagementCapability as er, addonSettingsCapability as et, COMPOSER_RUNNER_ID as f, transformSecretWrite as fi, looseSchema as fn, compositionFeatureEnabled as fr, cameraGridLayoutCapability as ft, CoreBlockSchema as g, metricsProviderCapability as gn, createStatefulExpressionMemory as gr, compositionFieldKey as gt, CalendarPreferencesSchema as h, memoizePinnedFfmpeg as hn, compositionSourceKey as hr, composerCapability as ht, AlertSchema as i, readinessKey as ii, keychainCapability as in, vectorIndexDimConflictError as ir, backupCapability as it, FieldClaimSchema as j, resolveAppConnections as jn, SECRET_CLEAR as jr, deviceCredentialsCapability as jt, FIRST_LEVEL_MACRO_CLASSES as k, reducePoints as kn, ReadinessRegistry as kr, deriveBatteryPresence as kt, CAMSTACK_APP_LINK_ORIGIN as l, sleep as li, locationIconKey as ln, cloneStatefulExpressionMemory as lr, buildDeviceSignatureMessage as lt, CORE_BLOCK_ADDON_PREFIX as m, mayWriteToLocation as mn, compositionSliceKey as mr, checkRoleAddress as mt, AGENT_MDNS_TXT_KEYS as n, parseJsonUnknown as ni, kebabToCamel as nn, validateCustomAddress as nr, alertsCapability as nt, BaseDevice as o, resolveSecretMarkers as oi, legacyModeOf as on, withLocationMode as or, batteryCapability as ot, CORE_BLOCKS_ADDON_ID as p, EventCategory as pi, mayReadLocation as pn, compositionItemFieldPath as pr, canonicalIconKey as pt, SsoBridgeClaimsSchema as q, storageCapability as qn, isDeviceConfigCap as qr, formatMinutes as qt, ALL_CAPABILITY_DEFINITIONS as r, parseSecretRef as ri, keychainAdminCapability as rn, vectorDimFromBase64 as rr, authProviderCapability as rt, BatteryStatusSchema as s, scopeKey as si, lifecycleJobSchema as sn, COMPOSER_ADDON_ID as sr, buildCapabilityLookup as st, AGENT_MDNS_SERVICE_TYPE as t, parseJsonObject as ti, isVoidInput as tn, validateComposition as tr, addonWidgetsCapability as tt, CAP_NAMES_WITH_STATUS as u, toNodeId as ui, logDestinationCapability as un, composedDeviceRef as ur, buildStreamParamsConfigSchema as ut, DATABASE_SNAPSHOT_SUFFIX as v, motionCapability as vn, toExpressionValue as vr, coreBlockAddonId as vt, DEVICE_NONCE_TTL_MS as w, pickAppLinkHub as wn, DATAPLANE_SECRET_HEADER as wr, dataStoreProviderCapability as wt, DAY_NAMES as x, objectInputDeclaresAddonId as xn, DeviceType as xr, coreBlockSourceKind as xt, DATABASE_SNAPSHOT_TIMEOUT_MS as y, normalizeCoreBlockWrite as yn, DeviceFeature as yr, coreBlockComposition as yt, MOTION_CLOSE_AFTER_MS as z, runtimeStatePolicyFor as zn, createEvent as zr, evaluateCompositionField as zt };
|
package/dist/file-host-worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-Ch79gy9S.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as callControl, E as controlTargetOf, T as callVector, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, c as SqliteSettingsBackend, h as serializeError, o as createVectorIndex, s as vectorProviderOf, w as callData, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-
|
|
1
|
+
import { C as callControl, E as controlTargetOf, T as callVector, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, c as SqliteSettingsBackend, h as serializeError, o as createVectorIndex, s as vectorProviderOf, w as callData, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-DvnVO5IK.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { D as reasonRequiresNewCa, E as evaluateExistingCert, _ as generateCa, b as collectCertIdentity, v as issueLeaf, y as loadCa } from "./agent-https-
|
|
2
|
+
import { D as reasonRequiresNewCa, E as evaluateExistingCert, _ as generateCa, b as collectCertIdentity, v as issueLeaf, y as loadCa } from "./agent-https-BPfHrI4c.mjs";
|
|
3
3
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
4
4
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
5
5
|
import { mkdir, writeFile } from "node:fs/promises";
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export type { TokenExpiryResult } from "./auth/token-expiry.js";
|
|
|
14
14
|
export { parseTokenExpiry } from "./auth/token-expiry.js";
|
|
15
15
|
export type { CreateLoginSessionInput, LoginSessionCheck, LoginSessionMethod, LoginSessionRecord, LoginSessionRefresh, LoginSessionRevocation, LoginSessionSummary } from "./auth/login-session-manager.js";
|
|
16
16
|
export { LoginSessionManager, REFRESH_TOKEN_PREFIX } from "./auth/login-session-manager.js";
|
|
17
|
+
export { onSessionsRevoked } from "./auth/session-revocation-bus.js";
|
|
18
|
+
export type { SessionsRevokedEvent, SessionsRevokedListener } from "./auth/session-revocation-bus.js";
|
|
17
19
|
export type { AdminTokenRecord } from "./auth/admin-token-manager.js";
|
|
18
20
|
export { ADMIN_TOKEN_MAX_LIFETIME_MS, ADMIN_TOKEN_PREFIX, AdminTokenManager } from "./auth/admin-token-manager.js";
|
|
19
21
|
export { DeviceCaStore } from "./auth/device-ca-store.js";
|