@camstack/system 1.2.114 → 1.2.116
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/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- 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.d.ts +1 -1
- package/dist/builtins/alerts/alerts.addon.js +6 -1
- package/dist/builtins/alerts/alerts.addon.mjs +6 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- 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 +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- 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/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- 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 +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +3 -3
- package/dist/builtins/local-network/local-hostname.d.ts +15 -0
- package/dist/builtins/local-network/local-network.addon.d.ts +31 -7
- package/dist/builtins/local-network/local-network.addon.js +177 -28
- package/dist/builtins/local-network/local-network.addon.mjs +177 -28
- 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/sqlite-settings.addon.js +2 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- 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 +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-CJ8RRSvQ.mjs → dist-BpzbLPel.mjs} +149 -6
- package/dist/{dist-C1Aea3c6.js → dist-Cri60Jd0.js} +149 -6
- package/dist/http/lan-http-bind.d.ts +19 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +30 -82
- package/dist/index.mjs +11 -83
- package/dist/lan-http-bind-BDJm4d-K.mjs +716 -0
- package/dist/lan-http-bind-CZ4EBeD_.js +848 -0
- package/dist/{retired-settings-keys-B52KsNz8.js → retired-settings-keys-BVAxT5XL.js} +1 -1
- package/dist/{retired-settings-keys-C1efPfyW.mjs → retired-settings-keys-SrxMH3OT.mjs} +1 -1
- package/dist/tls/cert-evaluation.d.ts +41 -0
- package/dist/tls/cert-identity.d.ts +37 -0
- package/dist/tls/cert-manager.d.ts +71 -6
- package/dist/tls/cert-openssl.d.ts +23 -0
- package/dist/tls/index.d.ts +5 -1
- package/dist/tls/tls-status.d.ts +16 -0
- package/dist/tls/uploaded-cert.d.ts +14 -0
- package/package.json +1 -1
- package/dist/{manifest-python-deps-MA_BZGBz.js → manifest-python-deps-CwBbX4Ut.js} +1 -1
- package/dist/{manifest-python-deps-Cb1ANt3i.mjs → manifest-python-deps-SGdbr9D5.mjs} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -15,6 +15,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
15
15
|
*/
|
|
16
16
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
17
17
|
/**
|
|
18
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
19
|
+
* Emitted only when the material on disk actually changed, so an
|
|
20
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
21
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
22
|
+
*
|
|
23
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
24
|
+
*/
|
|
25
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
26
|
+
/**
|
|
18
27
|
* A newer addon or server-root package version was found by the
|
|
19
28
|
* authoritative registry check. Emitted once when any observed
|
|
20
29
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19217,7 +19226,12 @@ var TerminalSessionInfoSchema = z.object({
|
|
|
19217
19226
|
var TerminalProfileInfoSchema = z.object({
|
|
19218
19227
|
profileId: z.string(),
|
|
19219
19228
|
label: z.string(),
|
|
19220
|
-
description: z.string().optional()
|
|
19229
|
+
description: z.string().optional(),
|
|
19230
|
+
/** Spawn defaults the instance form copies on create. */
|
|
19231
|
+
executable: z.string().optional(),
|
|
19232
|
+
args: z.array(z.string()).readonly().optional(),
|
|
19233
|
+
cwd: z.string().optional(),
|
|
19234
|
+
environment: z.array(z.string()).readonly().optional()
|
|
19221
19235
|
});
|
|
19222
19236
|
/**
|
|
19223
19237
|
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
@@ -19230,7 +19244,11 @@ var TerminalInstanceInfoSchema = z.object({
|
|
|
19230
19244
|
profileId: z.string(),
|
|
19231
19245
|
profileLabel: z.string(),
|
|
19232
19246
|
name: z.string(),
|
|
19233
|
-
enabled: z.boolean()
|
|
19247
|
+
enabled: z.boolean(),
|
|
19248
|
+
executable: z.string(),
|
|
19249
|
+
args: z.array(z.string()).readonly(),
|
|
19250
|
+
cwd: z.string(),
|
|
19251
|
+
environment: z.array(z.string()).readonly()
|
|
19234
19252
|
});
|
|
19235
19253
|
var TerminalLegacyCameraSchema = z.object({
|
|
19236
19254
|
stableId: z.string(),
|
|
@@ -19276,7 +19294,22 @@ var terminalSessionCapability = {
|
|
|
19276
19294
|
createInstance: method(z.object({
|
|
19277
19295
|
targetNodeId: z.string().min(1),
|
|
19278
19296
|
profileId: z.string().min(1),
|
|
19279
|
-
name: z.string().trim().min(1).max(160).optional()
|
|
19297
|
+
name: z.string().trim().min(1).max(160).optional(),
|
|
19298
|
+
executable: z.string().max(1024).optional(),
|
|
19299
|
+
args: z.array(z.string().max(2048)).max(64).optional(),
|
|
19300
|
+
cwd: z.string().max(1024).optional(),
|
|
19301
|
+
environment: z.array(z.string().max(4096)).max(64).optional()
|
|
19302
|
+
}), TerminalInstanceInfoSchema, {
|
|
19303
|
+
kind: "mutation",
|
|
19304
|
+
auth: "admin"
|
|
19305
|
+
}),
|
|
19306
|
+
updateInstance: method(z.object({
|
|
19307
|
+
instanceId: z.string().min(1),
|
|
19308
|
+
name: z.string().trim().min(1).max(160).optional(),
|
|
19309
|
+
executable: z.string().max(1024).optional(),
|
|
19310
|
+
args: z.array(z.string().max(2048)).max(64).optional(),
|
|
19311
|
+
cwd: z.string().max(1024).optional(),
|
|
19312
|
+
environment: z.array(z.string().max(4096)).max(64).optional()
|
|
19280
19313
|
}), TerminalInstanceInfoSchema, {
|
|
19281
19314
|
kind: "mutation",
|
|
19282
19315
|
auth: "admin"
|
|
@@ -19311,7 +19344,11 @@ var terminalSessionCapability = {
|
|
|
19311
19344
|
openSession: method(z.object({
|
|
19312
19345
|
profileId: z.string(),
|
|
19313
19346
|
cols: z.number().int().positive(),
|
|
19314
|
-
rows: z.number().int().positive()
|
|
19347
|
+
rows: z.number().int().positive(),
|
|
19348
|
+
executable: z.string().max(1024).optional(),
|
|
19349
|
+
args: z.array(z.string().max(2048)).max(64).optional(),
|
|
19350
|
+
cwd: z.string().max(1024).optional(),
|
|
19351
|
+
environment: z.array(z.string().max(4096)).max(64).optional()
|
|
19315
19352
|
}), TerminalSessionInfoSchema, {
|
|
19316
19353
|
kind: "mutation",
|
|
19317
19354
|
auth: "admin"
|
|
@@ -23910,6 +23947,20 @@ var AllowedAddressesSchema = z.object({
|
|
|
23910
23947
|
* Network Addresses admin page and persisted by the addon.
|
|
23911
23948
|
*/
|
|
23912
23949
|
addresses: z.array(z.string()).readonly() });
|
|
23950
|
+
var TlsStatusSchema = z.object({
|
|
23951
|
+
mode: z.enum([
|
|
23952
|
+
"generated",
|
|
23953
|
+
"uploaded",
|
|
23954
|
+
"disabled"
|
|
23955
|
+
]),
|
|
23956
|
+
leafFingerprintSha256: z.string().nullable(),
|
|
23957
|
+
caFingerprintSha256: z.string().nullable(),
|
|
23958
|
+
validTo: z.string().nullable(),
|
|
23959
|
+
sans: z.array(z.string()),
|
|
23960
|
+
caCertPem: z.string().nullable(),
|
|
23961
|
+
reissueError: z.string().nullable(),
|
|
23962
|
+
restartRequired: z.boolean()
|
|
23963
|
+
});
|
|
23913
23964
|
var localNetworkCapability = {
|
|
23914
23965
|
name: "local-network",
|
|
23915
23966
|
scope: "system",
|
|
@@ -24015,7 +24066,34 @@ var localNetworkCapability = {
|
|
|
24015
24066
|
* when the operator wants to wipe their manual edits and start
|
|
24016
24067
|
* over from the auto-detected best matches.
|
|
24017
24068
|
*/
|
|
24018
|
-
resetAllowlistToBestMatch: method(z.void(), AllowedAddressesSchema, { kind: "mutation" })
|
|
24069
|
+
resetAllowlistToBestMatch: method(z.void(), AllowedAddressesSchema, { kind: "mutation" }),
|
|
24070
|
+
/**
|
|
24071
|
+
* Live TLS material for the Network → Local access certificate card.
|
|
24072
|
+
* LAN HTTP / hostname are addon settings (`globalSettingsSchema`), not
|
|
24073
|
+
* a second store — this query is status, not configuration.
|
|
24074
|
+
*/
|
|
24075
|
+
getTlsStatus: method(z.void(), TlsStatusSchema),
|
|
24076
|
+
/** Issue a new leaf under the existing local CA. Disabled in uploaded mode. */
|
|
24077
|
+
regenerateCertificate: method(z.object({ reason: z.string().optional() }), TlsStatusSchema, {
|
|
24078
|
+
kind: "mutation",
|
|
24079
|
+
auth: "admin"
|
|
24080
|
+
}),
|
|
24081
|
+
/** Replace the served material with operator-supplied PEMs. */
|
|
24082
|
+
uploadCertificate: method(z.object({
|
|
24083
|
+
certPem: z.string().min(1),
|
|
24084
|
+
keyPem: z.string().min(1),
|
|
24085
|
+
caPem: z.string().optional()
|
|
24086
|
+
}), TlsStatusSchema, {
|
|
24087
|
+
kind: "mutation",
|
|
24088
|
+
auth: "admin"
|
|
24089
|
+
}),
|
|
24090
|
+
/** The local CA PEM, or empty when there is none to download. */
|
|
24091
|
+
downloadCa: method(z.void(), z.object({ pem: z.string() })),
|
|
24092
|
+
/** Drop uploaded material and return to the generated local CA. */
|
|
24093
|
+
revertToGeneratedCertificate: method(z.void(), TlsStatusSchema, {
|
|
24094
|
+
kind: "mutation",
|
|
24095
|
+
auth: "admin"
|
|
24096
|
+
})
|
|
24019
24097
|
},
|
|
24020
24098
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
24021
24099
|
mount: { kind: "hub-only" }
|
|
@@ -32469,6 +32547,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32469
32547
|
addonId: null,
|
|
32470
32548
|
access: "create"
|
|
32471
32549
|
},
|
|
32550
|
+
"localNetwork.downloadCa": {
|
|
32551
|
+
capName: "local-network",
|
|
32552
|
+
capScope: "system",
|
|
32553
|
+
addonId: null,
|
|
32554
|
+
access: "view"
|
|
32555
|
+
},
|
|
32472
32556
|
"localNetwork.getAllowedAddresses": {
|
|
32473
32557
|
capName: "local-network",
|
|
32474
32558
|
capScope: "system",
|
|
@@ -32493,18 +32577,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32493
32577
|
addonId: null,
|
|
32494
32578
|
access: "view"
|
|
32495
32579
|
},
|
|
32580
|
+
"localNetwork.getTlsStatus": {
|
|
32581
|
+
capName: "local-network",
|
|
32582
|
+
capScope: "system",
|
|
32583
|
+
addonId: null,
|
|
32584
|
+
access: "view"
|
|
32585
|
+
},
|
|
32496
32586
|
"localNetwork.list": {
|
|
32497
32587
|
capName: "local-network",
|
|
32498
32588
|
capScope: "system",
|
|
32499
32589
|
addonId: null,
|
|
32500
32590
|
access: "view"
|
|
32501
32591
|
},
|
|
32592
|
+
"localNetwork.regenerateCertificate": {
|
|
32593
|
+
capName: "local-network",
|
|
32594
|
+
capScope: "system",
|
|
32595
|
+
addonId: null,
|
|
32596
|
+
access: "create"
|
|
32597
|
+
},
|
|
32502
32598
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
32503
32599
|
capName: "local-network",
|
|
32504
32600
|
capScope: "system",
|
|
32505
32601
|
addonId: null,
|
|
32506
32602
|
access: "delete"
|
|
32507
32603
|
},
|
|
32604
|
+
"localNetwork.revertToGeneratedCertificate": {
|
|
32605
|
+
capName: "local-network",
|
|
32606
|
+
capScope: "system",
|
|
32607
|
+
addonId: null,
|
|
32608
|
+
access: "create"
|
|
32609
|
+
},
|
|
32508
32610
|
"localNetwork.setAllowedAddresses": {
|
|
32509
32611
|
capName: "local-network",
|
|
32510
32612
|
capScope: "system",
|
|
@@ -32517,6 +32619,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32517
32619
|
addonId: null,
|
|
32518
32620
|
access: "create"
|
|
32519
32621
|
},
|
|
32622
|
+
"localNetwork.uploadCertificate": {
|
|
32623
|
+
capName: "local-network",
|
|
32624
|
+
capScope: "system",
|
|
32625
|
+
addonId: null,
|
|
32626
|
+
access: "create"
|
|
32627
|
+
},
|
|
32520
32628
|
"lockControl.lock": {
|
|
32521
32629
|
capName: "lock-control",
|
|
32522
32630
|
capScope: "device",
|
|
@@ -35397,6 +35505,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
35397
35505
|
addonId: null,
|
|
35398
35506
|
access: "create"
|
|
35399
35507
|
},
|
|
35508
|
+
"terminalSession.updateInstance": {
|
|
35509
|
+
capName: "terminal-session",
|
|
35510
|
+
capScope: "system",
|
|
35511
|
+
addonId: null,
|
|
35512
|
+
access: "create"
|
|
35513
|
+
},
|
|
35400
35514
|
"terminalSession.writeInput": {
|
|
35401
35515
|
capName: "terminal-session",
|
|
35402
35516
|
capScope: "system",
|
|
@@ -38164,6 +38278,35 @@ Object.freeze(Object.fromEntries([{
|
|
|
38164
38278
|
}]
|
|
38165
38279
|
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
38166
38280
|
z.string().min(1);
|
|
38281
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
38282
|
+
stepId: "face-embedding",
|
|
38283
|
+
key: "minLandmarkFaceSize",
|
|
38284
|
+
label: "Min face size for recognition (detection px)",
|
|
38285
|
+
description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
|
|
38286
|
+
type: "slider",
|
|
38287
|
+
min: 0,
|
|
38288
|
+
max: 64,
|
|
38289
|
+
step: 2,
|
|
38290
|
+
default: 24
|
|
38291
|
+
}];
|
|
38292
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
38293
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
38294
|
+
}
|
|
38295
|
+
var ClusterSettingNumberSchema = z.number().finite();
|
|
38296
|
+
function readClusterStepSettings(config) {
|
|
38297
|
+
const out = {};
|
|
38298
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
38299
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
38300
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
38301
|
+
const existing = out[field.stepId] ?? {};
|
|
38302
|
+
out[field.stepId] = {
|
|
38303
|
+
...existing,
|
|
38304
|
+
[field.key]: value
|
|
38305
|
+
};
|
|
38306
|
+
}
|
|
38307
|
+
return out;
|
|
38308
|
+
}
|
|
38309
|
+
readClusterStepSettings({});
|
|
38167
38310
|
z.object({
|
|
38168
38311
|
/**
|
|
38169
38312
|
* Fraction of the box's own size added on EACH side before cutting.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let zod = require("zod");
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -15,6 +15,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
15
15
|
*/
|
|
16
16
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
17
17
|
/**
|
|
18
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
19
|
+
* Emitted only when the material on disk actually changed, so an
|
|
20
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
21
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
22
|
+
*
|
|
23
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
24
|
+
*/
|
|
25
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
26
|
+
/**
|
|
18
27
|
* A newer addon or server-root package version was found by the
|
|
19
28
|
* authoritative registry check. Emitted once when any observed
|
|
20
29
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19217,7 +19226,12 @@ var TerminalSessionInfoSchema = zod.z.object({
|
|
|
19217
19226
|
var TerminalProfileInfoSchema = zod.z.object({
|
|
19218
19227
|
profileId: zod.z.string(),
|
|
19219
19228
|
label: zod.z.string(),
|
|
19220
|
-
description: zod.z.string().optional()
|
|
19229
|
+
description: zod.z.string().optional(),
|
|
19230
|
+
/** Spawn defaults the instance form copies on create. */
|
|
19231
|
+
executable: zod.z.string().optional(),
|
|
19232
|
+
args: zod.z.array(zod.z.string()).readonly().optional(),
|
|
19233
|
+
cwd: zod.z.string().optional(),
|
|
19234
|
+
environment: zod.z.array(zod.z.string()).readonly().optional()
|
|
19221
19235
|
});
|
|
19222
19236
|
/**
|
|
19223
19237
|
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
@@ -19230,7 +19244,11 @@ var TerminalInstanceInfoSchema = zod.z.object({
|
|
|
19230
19244
|
profileId: zod.z.string(),
|
|
19231
19245
|
profileLabel: zod.z.string(),
|
|
19232
19246
|
name: zod.z.string(),
|
|
19233
|
-
enabled: zod.z.boolean()
|
|
19247
|
+
enabled: zod.z.boolean(),
|
|
19248
|
+
executable: zod.z.string(),
|
|
19249
|
+
args: zod.z.array(zod.z.string()).readonly(),
|
|
19250
|
+
cwd: zod.z.string(),
|
|
19251
|
+
environment: zod.z.array(zod.z.string()).readonly()
|
|
19234
19252
|
});
|
|
19235
19253
|
var TerminalLegacyCameraSchema = zod.z.object({
|
|
19236
19254
|
stableId: zod.z.string(),
|
|
@@ -19276,7 +19294,22 @@ var terminalSessionCapability = {
|
|
|
19276
19294
|
createInstance: method(zod.z.object({
|
|
19277
19295
|
targetNodeId: zod.z.string().min(1),
|
|
19278
19296
|
profileId: zod.z.string().min(1),
|
|
19279
|
-
name: zod.z.string().trim().min(1).max(160).optional()
|
|
19297
|
+
name: zod.z.string().trim().min(1).max(160).optional(),
|
|
19298
|
+
executable: zod.z.string().max(1024).optional(),
|
|
19299
|
+
args: zod.z.array(zod.z.string().max(2048)).max(64).optional(),
|
|
19300
|
+
cwd: zod.z.string().max(1024).optional(),
|
|
19301
|
+
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
|
|
19302
|
+
}), TerminalInstanceInfoSchema, {
|
|
19303
|
+
kind: "mutation",
|
|
19304
|
+
auth: "admin"
|
|
19305
|
+
}),
|
|
19306
|
+
updateInstance: method(zod.z.object({
|
|
19307
|
+
instanceId: zod.z.string().min(1),
|
|
19308
|
+
name: zod.z.string().trim().min(1).max(160).optional(),
|
|
19309
|
+
executable: zod.z.string().max(1024).optional(),
|
|
19310
|
+
args: zod.z.array(zod.z.string().max(2048)).max(64).optional(),
|
|
19311
|
+
cwd: zod.z.string().max(1024).optional(),
|
|
19312
|
+
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
|
|
19280
19313
|
}), TerminalInstanceInfoSchema, {
|
|
19281
19314
|
kind: "mutation",
|
|
19282
19315
|
auth: "admin"
|
|
@@ -19311,7 +19344,11 @@ var terminalSessionCapability = {
|
|
|
19311
19344
|
openSession: method(zod.z.object({
|
|
19312
19345
|
profileId: zod.z.string(),
|
|
19313
19346
|
cols: zod.z.number().int().positive(),
|
|
19314
|
-
rows: zod.z.number().int().positive()
|
|
19347
|
+
rows: zod.z.number().int().positive(),
|
|
19348
|
+
executable: zod.z.string().max(1024).optional(),
|
|
19349
|
+
args: zod.z.array(zod.z.string().max(2048)).max(64).optional(),
|
|
19350
|
+
cwd: zod.z.string().max(1024).optional(),
|
|
19351
|
+
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
|
|
19315
19352
|
}), TerminalSessionInfoSchema, {
|
|
19316
19353
|
kind: "mutation",
|
|
19317
19354
|
auth: "admin"
|
|
@@ -23910,6 +23947,20 @@ var AllowedAddressesSchema = zod.z.object({
|
|
|
23910
23947
|
* Network Addresses admin page and persisted by the addon.
|
|
23911
23948
|
*/
|
|
23912
23949
|
addresses: zod.z.array(zod.z.string()).readonly() });
|
|
23950
|
+
var TlsStatusSchema = zod.z.object({
|
|
23951
|
+
mode: zod.z.enum([
|
|
23952
|
+
"generated",
|
|
23953
|
+
"uploaded",
|
|
23954
|
+
"disabled"
|
|
23955
|
+
]),
|
|
23956
|
+
leafFingerprintSha256: zod.z.string().nullable(),
|
|
23957
|
+
caFingerprintSha256: zod.z.string().nullable(),
|
|
23958
|
+
validTo: zod.z.string().nullable(),
|
|
23959
|
+
sans: zod.z.array(zod.z.string()),
|
|
23960
|
+
caCertPem: zod.z.string().nullable(),
|
|
23961
|
+
reissueError: zod.z.string().nullable(),
|
|
23962
|
+
restartRequired: zod.z.boolean()
|
|
23963
|
+
});
|
|
23913
23964
|
var localNetworkCapability = {
|
|
23914
23965
|
name: "local-network",
|
|
23915
23966
|
scope: "system",
|
|
@@ -24015,7 +24066,34 @@ var localNetworkCapability = {
|
|
|
24015
24066
|
* when the operator wants to wipe their manual edits and start
|
|
24016
24067
|
* over from the auto-detected best matches.
|
|
24017
24068
|
*/
|
|
24018
|
-
resetAllowlistToBestMatch: method(zod.z.void(), AllowedAddressesSchema, { kind: "mutation" })
|
|
24069
|
+
resetAllowlistToBestMatch: method(zod.z.void(), AllowedAddressesSchema, { kind: "mutation" }),
|
|
24070
|
+
/**
|
|
24071
|
+
* Live TLS material for the Network → Local access certificate card.
|
|
24072
|
+
* LAN HTTP / hostname are addon settings (`globalSettingsSchema`), not
|
|
24073
|
+
* a second store — this query is status, not configuration.
|
|
24074
|
+
*/
|
|
24075
|
+
getTlsStatus: method(zod.z.void(), TlsStatusSchema),
|
|
24076
|
+
/** Issue a new leaf under the existing local CA. Disabled in uploaded mode. */
|
|
24077
|
+
regenerateCertificate: method(zod.z.object({ reason: zod.z.string().optional() }), TlsStatusSchema, {
|
|
24078
|
+
kind: "mutation",
|
|
24079
|
+
auth: "admin"
|
|
24080
|
+
}),
|
|
24081
|
+
/** Replace the served material with operator-supplied PEMs. */
|
|
24082
|
+
uploadCertificate: method(zod.z.object({
|
|
24083
|
+
certPem: zod.z.string().min(1),
|
|
24084
|
+
keyPem: zod.z.string().min(1),
|
|
24085
|
+
caPem: zod.z.string().optional()
|
|
24086
|
+
}), TlsStatusSchema, {
|
|
24087
|
+
kind: "mutation",
|
|
24088
|
+
auth: "admin"
|
|
24089
|
+
}),
|
|
24090
|
+
/** The local CA PEM, or empty when there is none to download. */
|
|
24091
|
+
downloadCa: method(zod.z.void(), zod.z.object({ pem: zod.z.string() })),
|
|
24092
|
+
/** Drop uploaded material and return to the generated local CA. */
|
|
24093
|
+
revertToGeneratedCertificate: method(zod.z.void(), TlsStatusSchema, {
|
|
24094
|
+
kind: "mutation",
|
|
24095
|
+
auth: "admin"
|
|
24096
|
+
})
|
|
24019
24097
|
},
|
|
24020
24098
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
24021
24099
|
mount: { kind: "hub-only" }
|
|
@@ -32469,6 +32547,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32469
32547
|
addonId: null,
|
|
32470
32548
|
access: "create"
|
|
32471
32549
|
},
|
|
32550
|
+
"localNetwork.downloadCa": {
|
|
32551
|
+
capName: "local-network",
|
|
32552
|
+
capScope: "system",
|
|
32553
|
+
addonId: null,
|
|
32554
|
+
access: "view"
|
|
32555
|
+
},
|
|
32472
32556
|
"localNetwork.getAllowedAddresses": {
|
|
32473
32557
|
capName: "local-network",
|
|
32474
32558
|
capScope: "system",
|
|
@@ -32493,18 +32577,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32493
32577
|
addonId: null,
|
|
32494
32578
|
access: "view"
|
|
32495
32579
|
},
|
|
32580
|
+
"localNetwork.getTlsStatus": {
|
|
32581
|
+
capName: "local-network",
|
|
32582
|
+
capScope: "system",
|
|
32583
|
+
addonId: null,
|
|
32584
|
+
access: "view"
|
|
32585
|
+
},
|
|
32496
32586
|
"localNetwork.list": {
|
|
32497
32587
|
capName: "local-network",
|
|
32498
32588
|
capScope: "system",
|
|
32499
32589
|
addonId: null,
|
|
32500
32590
|
access: "view"
|
|
32501
32591
|
},
|
|
32592
|
+
"localNetwork.regenerateCertificate": {
|
|
32593
|
+
capName: "local-network",
|
|
32594
|
+
capScope: "system",
|
|
32595
|
+
addonId: null,
|
|
32596
|
+
access: "create"
|
|
32597
|
+
},
|
|
32502
32598
|
"localNetwork.resetAllowlistToBestMatch": {
|
|
32503
32599
|
capName: "local-network",
|
|
32504
32600
|
capScope: "system",
|
|
32505
32601
|
addonId: null,
|
|
32506
32602
|
access: "delete"
|
|
32507
32603
|
},
|
|
32604
|
+
"localNetwork.revertToGeneratedCertificate": {
|
|
32605
|
+
capName: "local-network",
|
|
32606
|
+
capScope: "system",
|
|
32607
|
+
addonId: null,
|
|
32608
|
+
access: "create"
|
|
32609
|
+
},
|
|
32508
32610
|
"localNetwork.setAllowedAddresses": {
|
|
32509
32611
|
capName: "local-network",
|
|
32510
32612
|
capScope: "system",
|
|
@@ -32517,6 +32619,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32517
32619
|
addonId: null,
|
|
32518
32620
|
access: "create"
|
|
32519
32621
|
},
|
|
32622
|
+
"localNetwork.uploadCertificate": {
|
|
32623
|
+
capName: "local-network",
|
|
32624
|
+
capScope: "system",
|
|
32625
|
+
addonId: null,
|
|
32626
|
+
access: "create"
|
|
32627
|
+
},
|
|
32520
32628
|
"lockControl.lock": {
|
|
32521
32629
|
capName: "lock-control",
|
|
32522
32630
|
capScope: "device",
|
|
@@ -35397,6 +35505,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
35397
35505
|
addonId: null,
|
|
35398
35506
|
access: "create"
|
|
35399
35507
|
},
|
|
35508
|
+
"terminalSession.updateInstance": {
|
|
35509
|
+
capName: "terminal-session",
|
|
35510
|
+
capScope: "system",
|
|
35511
|
+
addonId: null,
|
|
35512
|
+
access: "create"
|
|
35513
|
+
},
|
|
35400
35514
|
"terminalSession.writeInput": {
|
|
35401
35515
|
capName: "terminal-session",
|
|
35402
35516
|
capScope: "system",
|
|
@@ -38164,6 +38278,35 @@ Object.freeze(Object.fromEntries([{
|
|
|
38164
38278
|
}]
|
|
38165
38279
|
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
38166
38280
|
zod.z.string().min(1);
|
|
38281
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
38282
|
+
stepId: "face-embedding",
|
|
38283
|
+
key: "minLandmarkFaceSize",
|
|
38284
|
+
label: "Min face size for recognition (detection px)",
|
|
38285
|
+
description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
|
|
38286
|
+
type: "slider",
|
|
38287
|
+
min: 0,
|
|
38288
|
+
max: 64,
|
|
38289
|
+
step: 2,
|
|
38290
|
+
default: 24
|
|
38291
|
+
}];
|
|
38292
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
38293
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
38294
|
+
}
|
|
38295
|
+
var ClusterSettingNumberSchema = zod.z.number().finite();
|
|
38296
|
+
function readClusterStepSettings(config) {
|
|
38297
|
+
const out = {};
|
|
38298
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
38299
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
38300
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
38301
|
+
const existing = out[field.stepId] ?? {};
|
|
38302
|
+
out[field.stepId] = {
|
|
38303
|
+
...existing,
|
|
38304
|
+
[field.key]: value
|
|
38305
|
+
};
|
|
38306
|
+
}
|
|
38307
|
+
return out;
|
|
38308
|
+
}
|
|
38309
|
+
readClusterStepSettings({});
|
|
38167
38310
|
zod.z.object({
|
|
38168
38311
|
/**
|
|
38169
38312
|
* Fraction of the box's own size added on EACH side before cutting.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
export interface LanHttpBindOptions {
|
|
3
|
+
readonly enabled: boolean;
|
|
4
|
+
readonly port: number;
|
|
5
|
+
readonly host: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LanHttpBindResult {
|
|
8
|
+
readonly listening: boolean;
|
|
9
|
+
readonly error: string | null;
|
|
10
|
+
readonly port: number;
|
|
11
|
+
}
|
|
12
|
+
export type LanHttpRequestHandler = (req: IncomingMessage, res: ServerResponse) => void;
|
|
13
|
+
export declare const DEFAULT_LAN_HTTP_PORT = 4480;
|
|
14
|
+
export declare function registerLanHttpHandler(next: LanHttpRequestHandler | null): void;
|
|
15
|
+
export declare function readLanHttpState(): LanHttpBindResult;
|
|
16
|
+
export declare function applyLanHttp(options: LanHttpBindOptions): Promise<LanHttpBindResult>;
|
|
17
|
+
/** After the hub registers the Fastify request handler, bind whatever was pending. */
|
|
18
|
+
export declare function bindPendingLanHttp(): Promise<LanHttpBindResult>;
|
|
19
|
+
export declare function closeLanHttp(): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export { StorageLocationManager } from './storage/storage-location-manager.js';
|
|
|
80
80
|
export type { IFileStorage, IStorageLocation, IStorageProvider as ICoreStorageProvider, IStructuredStorage, QueryFilter, StorageRecord, } from './storage/storage-manager.js';
|
|
81
81
|
export { StorageManager } from './storage/storage-manager.js';
|
|
82
82
|
export * from './tls/index.js';
|
|
83
|
+
export { applyLanHttp, bindPendingLanHttp, closeLanHttp, DEFAULT_LAN_HTTP_PORT, readLanHttpState, registerLanHttpHandler, } from './http/lan-http-bind.js';
|
|
83
84
|
export { IntegrationRegistry } from './builtins/sqlite-storage/integration-registry.js';
|
|
84
85
|
export { type EnsureAddonNativePrebuildsOptions, ensureAddonNativePrebuilds, type NativeEnsureOutcome, type NativeEnsureResult, } from './kernel/deps/ensure-addon-natives.js';
|
|
85
86
|
export { type EnsureNativePrebuildsOptions, ensureNativePrebuilds, hasDotNode, NATIVE_SCAN_DEPTH, type PrebuildFetchFn, type PrebuildTarget, TRADITIONAL_NATIVE_PACKAGES, } from './kernel/deps/ensure-native-prebuilds.js';
|