@camstack/system 1.2.353 → 1.2.355
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.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 +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/calendars/calendar-prefs-store.d.ts +7 -0
- package/dist/builtins/calendars/calendars.addon.js +3 -2
- package/dist/builtins/calendars/calendars.addon.mjs +3 -2
- 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 +56 -5
- package/dist/builtins/composer/composer.addon.mjs +56 -5
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/block-settings-store.d.ts +5 -0
- package/dist/builtins/core-blocks/core-blocks.addon.js +7 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +7 -2
- package/dist/builtins/device-manager/device-manager.addon.js +3 -3
- package/dist/builtins/device-manager/device-manager.addon.mjs +3 -3
- 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 +1 -1
- package/dist/builtins/local-network/local-network.addon.d.ts +21 -6
- package/dist/builtins/local-network/local-network.addon.js +81 -54
- package/dist/builtins/local-network/local-network.addon.mjs +81 -55
- 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/analyze-stats.d.ts +0 -2
- 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-backend.d.ts +9 -11
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +2 -2
- 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/{child-cap-dispatch-CvYlCq60.js → child-cap-dispatch-CqV-7-QZ.js} +27 -86
- package/dist/{child-cap-dispatch-C6IpRb4P.mjs → child-cap-dispatch-DMx2axev.mjs} +28 -81
- package/dist/{composition-sources-CAFDvTRs.js → composition-sources-Bk-MjK1D.js} +1 -1
- package/dist/{composition-sources-BGlDi3CT.mjs → composition-sources-Dpl1G0Gr.mjs} +1 -1
- package/dist/{dist-CXVXFdJX.js → dist-BWicEEVA.js} +233 -79
- package/dist/{dist-Cm556q2j.mjs → dist-OCi0K-iM.mjs} +216 -80
- package/dist/http/reverse-proxy.d.ts +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +71 -56
- package/dist/index.mjs +72 -56
- package/dist/kernel/config-schema.d.ts +1 -0
- package/dist/kernel/event-plane-report.d.ts +7 -36
- package/dist/kernel/fs-utils.d.ts +1 -5
- package/dist/kernel/heap-spaces.d.ts +2 -23
- package/dist/kernel/index.d.ts +0 -2
- package/dist/kernel/moleculer/event-bus-core.d.ts +6 -28
- package/dist/kernel/moleculer/process-service.d.ts +2 -5
- package/dist/kernel/moleculer/runner-native-allocator.d.ts +1 -6
- package/dist/kernel/transport/index.d.ts +1 -1
- package/dist/kernel/transport/local-child-registry.d.ts +8 -41
- package/dist/kernel/transport/uds-event-bridge.d.ts +2 -2
- package/dist/{retired-settings-keys-D24IW4qo.js → retired-settings-keys-DLJ7MvIB.js} +1 -1
- package/dist/{retired-settings-keys-DzkSqnH0.mjs → retired-settings-keys-TDzxE6GA.mjs} +1 -1
- package/package.json +1 -1
- package/dist/kernel/heap-allocation-sample.d.ts +0 -107
|
@@ -7867,6 +7867,57 @@ var ClipSearchStrictnessSchema = z.enum([
|
|
|
7867
7867
|
"balanced",
|
|
7868
7868
|
"strict"
|
|
7869
7869
|
]);
|
|
7870
|
+
new Set([
|
|
7871
|
+
{
|
|
7872
|
+
id: "person",
|
|
7873
|
+
name: "Person"
|
|
7874
|
+
},
|
|
7875
|
+
{
|
|
7876
|
+
id: "vehicle",
|
|
7877
|
+
name: "Vehicle"
|
|
7878
|
+
},
|
|
7879
|
+
{
|
|
7880
|
+
id: "animal",
|
|
7881
|
+
name: "Animal"
|
|
7882
|
+
},
|
|
7883
|
+
{
|
|
7884
|
+
id: "package",
|
|
7885
|
+
name: "Package"
|
|
7886
|
+
}
|
|
7887
|
+
].map((l) => l.id));
|
|
7888
|
+
var COCO_TO_MACRO = {
|
|
7889
|
+
mapping: {
|
|
7890
|
+
person: "person",
|
|
7891
|
+
bicycle: "vehicle",
|
|
7892
|
+
car: "vehicle",
|
|
7893
|
+
motorcycle: "vehicle",
|
|
7894
|
+
airplane: "vehicle",
|
|
7895
|
+
bus: "vehicle",
|
|
7896
|
+
train: "vehicle",
|
|
7897
|
+
truck: "vehicle",
|
|
7898
|
+
boat: "vehicle",
|
|
7899
|
+
bird: "animal",
|
|
7900
|
+
cat: "animal",
|
|
7901
|
+
dog: "animal",
|
|
7902
|
+
horse: "animal",
|
|
7903
|
+
sheep: "animal",
|
|
7904
|
+
cow: "animal",
|
|
7905
|
+
elephant: "animal",
|
|
7906
|
+
bear: "animal",
|
|
7907
|
+
zebra: "animal",
|
|
7908
|
+
giraffe: "animal",
|
|
7909
|
+
suitcase: "package",
|
|
7910
|
+
backpack: "package",
|
|
7911
|
+
handbag: "package"
|
|
7912
|
+
},
|
|
7913
|
+
preserveOriginal: false
|
|
7914
|
+
};
|
|
7915
|
+
/** Steps a root detector may declare it fills. */
|
|
7916
|
+
var FILLABLE_STEP_IDS = [
|
|
7917
|
+
"animal-classifier",
|
|
7918
|
+
"vehicle-classifier",
|
|
7919
|
+
"package-detection"
|
|
7920
|
+
];
|
|
7870
7921
|
var MODEL_FORMATS = [
|
|
7871
7922
|
"onnx",
|
|
7872
7923
|
"coreml",
|
|
@@ -8000,6 +8051,12 @@ var ModelLicenseRecordSchema = z.object({
|
|
|
8000
8051
|
* `camstack/docs` → `/docs/detection/models`.
|
|
8001
8052
|
*/
|
|
8002
8053
|
var ModelLicenseSchema = z.preprocess((value) => typeof value === "string" ? { weights: value } : value, ModelLicenseRecordSchema);
|
|
8054
|
+
/** One `fillsClassifierEffects` entry — see `ModelCatalogEntry.fillsClassifierEffects`. */
|
|
8055
|
+
var FillsClassifierEffectSchema = z.object({
|
|
8056
|
+
stepId: z.enum(FILLABLE_STEP_IDS),
|
|
8057
|
+
labelToEffect: z.record(z.string(), z.string()),
|
|
8058
|
+
uncovered: z.array(z.string()).readonly()
|
|
8059
|
+
});
|
|
8003
8060
|
var ModelCatalogEntrySchema = z.object({
|
|
8004
8061
|
id: z.string(),
|
|
8005
8062
|
name: z.string(),
|
|
@@ -8126,6 +8183,16 @@ var ModelCatalogEntrySchema = z.object({
|
|
|
8126
8183
|
*/
|
|
8127
8184
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
8128
8185
|
/**
|
|
8186
|
+
* The pipeline steps this ROOT detector already does the work of (D715):
|
|
8187
|
+
* its labels name the effect the step exists to produce (`deer` for
|
|
8188
|
+
* `animal-classifier`, `package` for `package-detection`). Derived from the
|
|
8189
|
+
* labelmap by `deriveClassifierFills`, never hand-written; a COCO model
|
|
8190
|
+
* declares none. Whether a declaration is honoured is the step's own
|
|
8191
|
+
* `labelLink` policy (`resolveLabelLink`). `labelToEffect` values are in
|
|
8192
|
+
* `FILLABLE_STEP_VOCABULARIES` (guard `check-label-link-vocabulary`).
|
|
8193
|
+
*/
|
|
8194
|
+
fillsClassifierEffects: z.array(FillsClassifierEffectSchema).readonly().optional(),
|
|
8195
|
+
/**
|
|
8129
8196
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
8130
8197
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
8131
8198
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -14169,7 +14236,7 @@ var detectionPipelineCapability = {
|
|
|
14169
14236
|
* This matters here more than anywhere else in the repo, because every provider
|
|
14170
14237
|
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
14171
14238
|
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
14172
|
-
* and `http://admin:hunter2@192.168.
|
|
14239
|
+
* and `http://admin:hunter2@192.168.60.139/` is a URL a browser accepts. The
|
|
14173
14240
|
* camera's own page will ask for its own login. That is correct, and pre-
|
|
14174
14241
|
* filling it is the operator's business, not ours.
|
|
14175
14242
|
*
|
|
@@ -19213,51 +19280,6 @@ var notificationOutputCapability = {
|
|
|
19213
19280
|
})
|
|
19214
19281
|
}
|
|
19215
19282
|
};
|
|
19216
|
-
new Set([
|
|
19217
|
-
{
|
|
19218
|
-
id: "person",
|
|
19219
|
-
name: "Person"
|
|
19220
|
-
},
|
|
19221
|
-
{
|
|
19222
|
-
id: "vehicle",
|
|
19223
|
-
name: "Vehicle"
|
|
19224
|
-
},
|
|
19225
|
-
{
|
|
19226
|
-
id: "animal",
|
|
19227
|
-
name: "Animal"
|
|
19228
|
-
},
|
|
19229
|
-
{
|
|
19230
|
-
id: "package",
|
|
19231
|
-
name: "Package"
|
|
19232
|
-
}
|
|
19233
|
-
].map((l) => l.id));
|
|
19234
|
-
var COCO_TO_MACRO = {
|
|
19235
|
-
mapping: {
|
|
19236
|
-
person: "person",
|
|
19237
|
-
bicycle: "vehicle",
|
|
19238
|
-
car: "vehicle",
|
|
19239
|
-
motorcycle: "vehicle",
|
|
19240
|
-
airplane: "vehicle",
|
|
19241
|
-
bus: "vehicle",
|
|
19242
|
-
train: "vehicle",
|
|
19243
|
-
truck: "vehicle",
|
|
19244
|
-
boat: "vehicle",
|
|
19245
|
-
bird: "animal",
|
|
19246
|
-
cat: "animal",
|
|
19247
|
-
dog: "animal",
|
|
19248
|
-
horse: "animal",
|
|
19249
|
-
sheep: "animal",
|
|
19250
|
-
cow: "animal",
|
|
19251
|
-
elephant: "animal",
|
|
19252
|
-
bear: "animal",
|
|
19253
|
-
zebra: "animal",
|
|
19254
|
-
giraffe: "animal",
|
|
19255
|
-
suitcase: "package",
|
|
19256
|
-
backpack: "package",
|
|
19257
|
-
handbag: "package"
|
|
19258
|
-
},
|
|
19259
|
-
preserveOriginal: false
|
|
19260
|
-
};
|
|
19261
19283
|
var AUDIO_MACRO_LABELS = [
|
|
19262
19284
|
{
|
|
19263
19285
|
id: "speech",
|
|
@@ -21164,8 +21186,9 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
21164
21186
|
disabledTargetIds: z.array(z.string()).default([])
|
|
21165
21187
|
});
|
|
21166
21188
|
/**
|
|
21167
|
-
* The state-summary SECTIONS (D647 / D698): the D637 kind groups that
|
|
21168
|
-
* still-true state. `
|
|
21189
|
+
* The state-summary SECTIONS (D647 / D698 / D708): the D637 kind groups that
|
|
21190
|
+
* report a still-true state. `addons` is the crash-looped addons only and
|
|
21191
|
+
* `addon-updates` the addons that are behind (D708 split them). `backups-exports` and `alarm` are not sections — a completed
|
|
21169
21192
|
* job is not an open state, and the alarm stays instant.
|
|
21170
21193
|
*/
|
|
21171
21194
|
var NcStateSummarySectionIdSchema = z.enum([
|
|
@@ -21177,6 +21200,7 @@ var NcStateSummarySectionIdSchema = z.enum([
|
|
|
21177
21200
|
"detection-blind",
|
|
21178
21201
|
"nodes",
|
|
21179
21202
|
"addons",
|
|
21203
|
+
"addon-updates",
|
|
21180
21204
|
"updates"
|
|
21181
21205
|
]);
|
|
21182
21206
|
/** One section of a previewed state summary. `unavailable` = its state could not be read. */
|
|
@@ -21671,7 +21695,19 @@ var NcAlarmModeDelaysSchema = z.object({
|
|
|
21671
21695
|
* When this mode may be armed. Absent / null = always allowed (same as a
|
|
21672
21696
|
* rule with no `schedule`). Evaluated with {@link isScheduleActive}.
|
|
21673
21697
|
*/
|
|
21674
|
-
schedule: NcScheduleSchema.optional()
|
|
21698
|
+
schedule: NcScheduleSchema.optional(),
|
|
21699
|
+
/**
|
|
21700
|
+
* D706: while this mode's ENTRY DELAY runs, do the alarm rules' own pushes go out (as an
|
|
21701
|
+
* intrusion naming the locations)? Absent = false — the entry-delay notification is the
|
|
21702
|
+
* only one, and the matches ride the triggered notification's mosaic (D705).
|
|
21703
|
+
*/
|
|
21704
|
+
notifyDuringEntryDelay: z.boolean().optional(),
|
|
21705
|
+
/**
|
|
21706
|
+
* D706: notify "watched again" when a sensor this arm bypassed closes and opens again.
|
|
21707
|
+
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
21708
|
+
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
21709
|
+
*/
|
|
21710
|
+
notifySensorRewatched: z.boolean().optional()
|
|
21675
21711
|
});
|
|
21676
21712
|
var NcAlarmModeDelaysListSchema = z.array(NcAlarmModeDelaysSchema).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
21677
21713
|
/**
|
|
@@ -21686,7 +21722,11 @@ var NcAlarmModeDelaysEditSchema = z.object({
|
|
|
21686
21722
|
triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional(),
|
|
21687
21723
|
postTriggeredAction: NcAlarmPostTriggeredActionSchema.nullable().optional(),
|
|
21688
21724
|
/** Set a schedule, or `null` to clear (mode always allowed again). */
|
|
21689
|
-
schedule: NcScheduleSchema.nullable().optional()
|
|
21725
|
+
schedule: NcScheduleSchema.nullable().optional(),
|
|
21726
|
+
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
21727
|
+
notifyDuringEntryDelay: z.boolean().nullable().optional(),
|
|
21728
|
+
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
21729
|
+
notifySensorRewatched: z.boolean().nullable().optional()
|
|
21690
21730
|
});
|
|
21691
21731
|
var NcAlarmModeDelaysEditListSchema = z.array(NcAlarmModeDelaysEditSchema).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
21692
21732
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
@@ -25601,7 +25641,8 @@ var PipelineModelOptionSchema = z.object({
|
|
|
25601
25641
|
group: ModelVariantGroupSchema.optional(),
|
|
25602
25642
|
legacy: z.boolean().optional(),
|
|
25603
25643
|
provider: ModelProviderIdSchema.optional(),
|
|
25604
|
-
defaultConfidence: z.number().optional()
|
|
25644
|
+
defaultConfidence: z.number().optional(),
|
|
25645
|
+
fillsClassifierEffects: z.array(FillsClassifierEffectSchema).readonly().optional()
|
|
25605
25646
|
});
|
|
25606
25647
|
var ConfigFieldBridge = z.custom();
|
|
25607
25648
|
var PipelineAddonSchemaSchema = z.object({
|
|
@@ -26630,6 +26671,22 @@ var MotionSourceEnum = z.enum([
|
|
|
26630
26671
|
"device-activity"
|
|
26631
26672
|
]);
|
|
26632
26673
|
/**
|
|
26674
|
+
* What opened an on-motion detection SESSION: the motion source that passed the
|
|
26675
|
+
* camera's `motionSources` gate, and what raised it (the camera itself, or a
|
|
26676
|
+
* sensor the operator attached — D672). `sensorName` is the attached sensor's
|
|
26677
|
+
* device name as the orchestrator's camera-sensors resolution last read it;
|
|
26678
|
+
* absent when unknown or when the camera itself triggered.
|
|
26679
|
+
*
|
|
26680
|
+
* Carried on the session attach ONLY so the runner's `DetectionPhaseTransition`
|
|
26681
|
+
* can say what started the session (D672 rule 11, amended 2026-10-06). The
|
|
26682
|
+
* runner never decides anything on it.
|
|
26683
|
+
*/
|
|
26684
|
+
var SessionTriggerSchema = z.object({
|
|
26685
|
+
source: MotionSourceEnum,
|
|
26686
|
+
triggeredBy: MotionTriggeredBySchema,
|
|
26687
|
+
sensorName: z.string().optional()
|
|
26688
|
+
});
|
|
26689
|
+
/**
|
|
26633
26690
|
* List of motion sources active on a camera. Empty array is valid:
|
|
26634
26691
|
* "no source" — happens for battery cams without firmware motion when
|
|
26635
26692
|
* the operator hasn't opted into the SW analyzer (would hold the
|
|
@@ -26881,6 +26938,14 @@ var RunnerCameraConfigSchema = z.object({
|
|
|
26881
26938
|
*/
|
|
26882
26939
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
26883
26940
|
/**
|
|
26941
|
+
* What opened this attach, on a SESSION attach only (see
|
|
26942
|
+
* {@link SessionTriggerSchema}). OPTIONAL with no default: absent on a
|
|
26943
|
+
* standing attach, an occupancy burst, a re-dispatch with no motion event
|
|
26944
|
+
* behind it, and every attach from an orchestrator older than the field — the
|
|
26945
|
+
* runner then names no source on the phase event.
|
|
26946
|
+
*/
|
|
26947
|
+
sessionTrigger: SessionTriggerSchema.optional(),
|
|
26948
|
+
/**
|
|
26884
26949
|
* WHICH root detector runs for this camera. The detection counterpart of
|
|
26885
26950
|
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
26886
26951
|
* of sources the system understands, vendor-agnostic, owned here.
|
|
@@ -31445,6 +31510,50 @@ var videoclipsCapability = {
|
|
|
31445
31510
|
})
|
|
31446
31511
|
}
|
|
31447
31512
|
};
|
|
31513
|
+
/** The central link domain the viewer app claims (Universal Links / App Links). */
|
|
31514
|
+
var CAMSTACK_APP_LINK_ORIGIN = "https://camstack.zentik.app";
|
|
31515
|
+
/**
|
|
31516
|
+
* Reduce a base URL to the bare origin the central page accepts as `hub=`,
|
|
31517
|
+
* or `null` when it cannot be one: not http(s), carries credentials, or does
|
|
31518
|
+
* not parse. A path/query/fragment is dropped — the central page mounts the
|
|
31519
|
+
* viewer under the origin itself.
|
|
31520
|
+
*/
|
|
31521
|
+
function toAppLinkHubOrigin(baseUrl) {
|
|
31522
|
+
let parsed;
|
|
31523
|
+
try {
|
|
31524
|
+
parsed = new URL(baseUrl);
|
|
31525
|
+
} catch {
|
|
31526
|
+
return null;
|
|
31527
|
+
}
|
|
31528
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return null;
|
|
31529
|
+
if (parsed.username !== "" || parsed.password !== "") return null;
|
|
31530
|
+
if (parsed.hostname === "") return null;
|
|
31531
|
+
return parsed.origin;
|
|
31532
|
+
}
|
|
31533
|
+
/**
|
|
31534
|
+
* The hub address an app link carries as `hub=`, chosen from the hub's OWN
|
|
31535
|
+
* advertised palette so it always agrees with what the Network page lists:
|
|
31536
|
+
* the public tunnel first, then the mesh (Tailscale MagicDNS) — HTTPS only,
|
|
31537
|
+
* because the app and the hosted viewer reach it from off the LAN. `null`
|
|
31538
|
+
* when the hub advertises neither.
|
|
31539
|
+
*/
|
|
31540
|
+
function pickAppLinkHub(endpoints) {
|
|
31541
|
+
const rank = (e) => {
|
|
31542
|
+
if (e.kind !== "public" || !e.baseUrl.startsWith("https://")) return null;
|
|
31543
|
+
if (e.interfaceKind === "public") return 0;
|
|
31544
|
+
if (e.interfaceKind === "vpn") return 1;
|
|
31545
|
+
return null;
|
|
31546
|
+
};
|
|
31547
|
+
return endpoints.flatMap((e) => {
|
|
31548
|
+
const r = rank(e);
|
|
31549
|
+
const origin = toAppLinkHubOrigin(e.baseUrl);
|
|
31550
|
+
return r === null || origin === null ? [] : [{
|
|
31551
|
+
r,
|
|
31552
|
+
p: e.priority,
|
|
31553
|
+
origin
|
|
31554
|
+
}];
|
|
31555
|
+
}).toSorted((a, b) => a.r - b.r || a.p - b.p)[0]?.origin ?? null;
|
|
31556
|
+
}
|
|
31448
31557
|
/**
|
|
31449
31558
|
* Optional client-side hints sent at session creation to help the provider
|
|
31450
31559
|
* pick the best native source. All fields optional — a viewer that knows
|
|
@@ -36148,7 +36257,7 @@ var LocalInterfaceSchema = z.object({
|
|
|
36148
36257
|
name: z.string(),
|
|
36149
36258
|
family: z.enum(["IPv4", "IPv6"]),
|
|
36150
36259
|
address: z.string(),
|
|
36151
|
-
/** CIDR shorthand (e.g. `192.168.
|
|
36260
|
+
/** CIDR shorthand (e.g. `192.168.10.10/24`). Empty when OS doesn't expose. */
|
|
36152
36261
|
cidr: z.string(),
|
|
36153
36262
|
/** OS netmask. Stable across calls so the SDK can hash on it. */
|
|
36154
36263
|
netmask: z.string(),
|
|
@@ -36202,7 +36311,8 @@ var ConnectionEndpointSchema = z.object({
|
|
|
36202
36311
|
"lan-ipv4",
|
|
36203
36312
|
"lan-ipv6",
|
|
36204
36313
|
"public",
|
|
36205
|
-
"loopback"
|
|
36314
|
+
"loopback",
|
|
36315
|
+
"app-link"
|
|
36206
36316
|
]),
|
|
36207
36317
|
/**
|
|
36208
36318
|
* Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
|
|
@@ -36271,15 +36381,27 @@ var GetConnectionEndpointsResultSchema = z.object({
|
|
|
36271
36381
|
localPort: AdvertisedLocalPortSchema
|
|
36272
36382
|
});
|
|
36273
36383
|
/**
|
|
36274
|
-
* The
|
|
36275
|
-
*
|
|
36276
|
-
*
|
|
36384
|
+
* The address flagged for notification links. `baseUrl: null` = AUTO, which
|
|
36385
|
+
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
36386
|
+
* so the UI can show it either way.
|
|
36277
36387
|
*/
|
|
36278
36388
|
var NotificationEndpointSchema = z.object({
|
|
36279
36389
|
/** The operator's explicit choice, or null for AUTO. */
|
|
36280
36390
|
baseUrl: z.string().nullable(),
|
|
36281
|
-
/**
|
|
36282
|
-
|
|
36391
|
+
/**
|
|
36392
|
+
* The effective flagged address: the explicit choice, else (AUTO) the
|
|
36393
|
+
* CamStack app link `https://camstack.zentik.app` (D709). A pre-D709 hub
|
|
36394
|
+
* answered the public tunnel / mesh here, or null.
|
|
36395
|
+
*/
|
|
36396
|
+
resolved: z.string().nullable(),
|
|
36397
|
+
/**
|
|
36398
|
+
* The hub origin an app link carries as `hub=` (D709): the hub's best
|
|
36399
|
+
* public HTTPS address — the tunnel, then the mesh (Tailscale MagicDNS) —
|
|
36400
|
+
* picked from this cap's own palette by `pickAppLinkHub`. `null` when the
|
|
36401
|
+
* hub advertises neither; the app link is then minted without `hub=`.
|
|
36402
|
+
* Absent on a pre-D709 hub.
|
|
36403
|
+
*/
|
|
36404
|
+
appLinkHub: z.string().nullable()
|
|
36283
36405
|
});
|
|
36284
36406
|
/**
|
|
36285
36407
|
* The URLs the SDK / viewer should race for API access. `baseUrls` empty =
|
|
@@ -36347,7 +36469,7 @@ var localNetworkCapability = {
|
|
|
36347
36469
|
* every client a second authority on a socket only the hub binds. A viewer
|
|
36348
36470
|
* configured with a port-less public URL (`https://camstack.example.top`)
|
|
36349
36471
|
* infers 443 from the scheme, asks with 443, and was handed
|
|
36350
|
-
* `https://192.168.
|
|
36472
|
+
* `https://192.168.10.9:443` for a hub listening on 4443. That candidate
|
|
36351
36473
|
* cannot ever answer, and losing its race reads in the log exactly like
|
|
36352
36474
|
* "the LAN was tried and it was slower" — so an operator sitting on his own
|
|
36353
36475
|
* WiFi stayed on the public tunnel for weeks, with the LAN candidate born
|
|
@@ -36380,13 +36502,21 @@ var localNetworkCapability = {
|
|
|
36380
36502
|
* Pass `'https'` when the caller is itself loaded over HTTPS
|
|
36381
36503
|
* to avoid mixed-content blocks in the browser. The public
|
|
36382
36504
|
* tunnel always emits `https://` regardless. */
|
|
36383
|
-
scheme: z.enum(["http", "https"]).optional()
|
|
36505
|
+
scheme: z.enum(["http", "https"]).optional(),
|
|
36506
|
+
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
36507
|
+
* an address notification links can be flagged with, not a hub
|
|
36508
|
+
* route. Default `false`: racers and rankers never see it. */
|
|
36509
|
+
includeAppLink: z.boolean().optional()
|
|
36384
36510
|
}), GetConnectionEndpointsResultSchema),
|
|
36385
36511
|
/**
|
|
36386
|
-
* The
|
|
36387
|
-
*
|
|
36388
|
-
*
|
|
36389
|
-
*
|
|
36512
|
+
* The address notification links are flagged with. `baseUrl: null` means
|
|
36513
|
+
* AUTO, which is the CamStack app link (D709): viewer taps go through
|
|
36514
|
+
* `https://camstack.zentik.app/…?hub=<appLinkHub>` and open the app. Any
|
|
36515
|
+
* hub address the palette lists can be flagged instead; then viewer taps,
|
|
36516
|
+
* attachment links and action buttons all use it. Signed media and
|
|
36517
|
+
* buttons never use the app link — with it flagged (or AUTO) they keep
|
|
36518
|
+
* the ranked hub ladder (a configured origin, a connected tunnel, then
|
|
36519
|
+
* the LAN), never loopback.
|
|
36390
36520
|
*
|
|
36391
36521
|
* Why an explicit marker: the automatic ranking cannot know which of
|
|
36392
36522
|
* several reachable addresses the RECIPIENT can actually open. A link is
|
|
@@ -36800,7 +36930,7 @@ var MeshPeerSchema = z.object({
|
|
|
36800
36930
|
tags: z.array(z.string()).readonly(),
|
|
36801
36931
|
/** True when the peer advertises itself as an exit-node candidate. */
|
|
36802
36932
|
exitNodeOption: z.boolean(),
|
|
36803
|
-
/** Subnet routes the peer advertises (e.g. `["192.168.
|
|
36933
|
+
/** Subnet routes the peer advertises (e.g. `["192.168.10.0/24"]`). */
|
|
36804
36934
|
advertisedRoutes: z.array(z.string()).readonly(),
|
|
36805
36935
|
/** Owner account login (e.g. `foo@example.com`). Null for tagged peers. */
|
|
36806
36936
|
userLogin: z.string().nullable(),
|
|
@@ -45213,7 +45343,8 @@ function expressionOutcome(source, read, now, stateful) {
|
|
|
45213
45343
|
value: null,
|
|
45214
45344
|
reason: `the expression failed: ${result.error}`,
|
|
45215
45345
|
fatal: false,
|
|
45216
|
-
confirmed: true
|
|
45346
|
+
confirmed: true,
|
|
45347
|
+
expressionFailed: true
|
|
45217
45348
|
};
|
|
45218
45349
|
return {
|
|
45219
45350
|
state: staleReasons.length > 0 ? "stale" : "fresh",
|
|
@@ -58617,12 +58748,14 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
58617
58748
|
{
|
|
58618
58749
|
id: "addons",
|
|
58619
58750
|
family: "system",
|
|
58620
|
-
label: "Addons",
|
|
58621
|
-
kinds: [
|
|
58622
|
-
|
|
58623
|
-
|
|
58624
|
-
|
|
58625
|
-
|
|
58751
|
+
label: "Addons stopped",
|
|
58752
|
+
kinds: ["addon-crash-loop"]
|
|
58753
|
+
},
|
|
58754
|
+
{
|
|
58755
|
+
id: "addon-updates",
|
|
58756
|
+
family: "system",
|
|
58757
|
+
label: "Addon updates",
|
|
58758
|
+
kinds: ["addon-update-available", "addon-updated"]
|
|
58626
58759
|
},
|
|
58627
58760
|
{
|
|
58628
58761
|
id: "updates",
|
|
@@ -58782,13 +58915,15 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
58782
58915
|
},
|
|
58783
58916
|
{
|
|
58784
58917
|
name: "summaryAddons",
|
|
58785
|
-
label: "Summary: addons",
|
|
58786
|
-
example: "
|
|
58787
|
-
kinds: [
|
|
58788
|
-
|
|
58789
|
-
|
|
58790
|
-
|
|
58791
|
-
|
|
58918
|
+
label: "Summary: addons stopped",
|
|
58919
|
+
example: "hub — recorder stopped after repeated crashes",
|
|
58920
|
+
kinds: ["addon-crash-loop"]
|
|
58921
|
+
},
|
|
58922
|
+
{
|
|
58923
|
+
name: "summaryAddonUpdates",
|
|
58924
|
+
label: "Summary: addon updates",
|
|
58925
|
+
example: "hub:\n• @camstack/addon-recorder 1.2.3 → 1.2.4",
|
|
58926
|
+
kinds: ["addon-update-available", "addon-updated"]
|
|
58792
58927
|
},
|
|
58793
58928
|
{
|
|
58794
58929
|
name: "summaryUpdates",
|
|
@@ -58872,6 +59007,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
58872
59007
|
[...RULE_BODY_ONLY],
|
|
58873
59008
|
[...RULE_TEXT],
|
|
58874
59009
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
59010
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
58875
59011
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
58876
59012
|
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
58877
59013
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
@@ -59597,4 +59733,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
59597
59733
|
return out;
|
|
59598
59734
|
}
|
|
59599
59735
|
//#endregion
|
|
59600
|
-
export {
|
|
59736
|
+
export { calendarsCapability as $, DATAPLANE_SECRET_HEADER as $n, motionCapability as $t, MOTION_CLOSE_AFTER_MS as A, userManagementCapability as An, filesystemBrowseCapability as At, StorageLocationTypeSchema as B, composedDeviceStableId as Bn, legacyAutoLinkIds as Bt, FieldClaimModeSchema as C, snapshotCapability as Cn, EventCategory as Cr, enumerateItemArrayFields as Ct, LocationIconIdSchema as D, storageProviderCapability as Dn, expandContainer as Dt, LegacyStorageLocationDefaultSchema as E, storageOccupancyCapability as En, evictionPolicyOfLocation as Et, STORAGE_ACCESS_FALLBACK as F, withLocationMode as Fn, isCollectionArrayMethod as Ft, addonWidgetsCapability as G, createStatefulExpressionMemory as Gn, logDestinationCapability as Gt, UserRecordSchema as H, compositionItemFieldPath as Hn, lifecycleJobSchema as Ht, STREAM_PROFILE_META as I, COMPOSER_ADDON_ID as In, isLocationEnabled as It, backupCapability as J, DeviceFeature as Jn, mayReadLocation as Jt, alertsCapability as K, disarmRoseMemory as Kn, logLevelAtMost as Kt, ScopedTokenSchema as L, buildFfmpegArgs as Ln, isObjectInput as Lt, REDACTED_SECRET as M, vectorDimFromBase64 as Mn, formatMinutes as Mt, RUNTIME_DEFAULTS as N, vectorIndexDimConflictError as Nn, gbToBytes as Nt, METHOD_ACCESS_MAP as O, streamCatalogCapability as On, expressionContainsBuiltinCall as Ot, RecordingStatusSchema as P, vectorStoreCapability as Pn, isArrayOutputSchema as Pt, buildStreamParamsConfigSchema as Q, BaseAddon as Qn, modeMayWrite as Qt, StorageCleanupJobSchema as R, cloneStatefulExpressionMemory as Rn, isVoidInput as Rt, FIRST_LEVEL_MACRO_CLASSES as S, siteZoneKey as Sn, toNodeId as Sr, enumerateInferenceDevices as St, LOG_LEVEL_RANK as T, storageMigrationCapability as Tn, evaluateCompositionField as Tt, addonPagesCapability as U, compositionSliceKey as Un, localNetworkCapability as Ut, StorageMigrationJobSchema as V, compositionFeatureEnabled as Vn, legacyModeOf as Vt, addonSettingsCapability as W, compositionSourceKey as Wn, locationIconKey as Wt, batteryCapability as X, DeviceType as Xn, memoizePinnedFfmpeg as Xt, bareAddonId as Y, DeviceRole as Yn, mayWriteToLocation as Yt, buildCapabilityLookup as Z, errMsg as Zn, metricsProviderCapability as Zt, DATABASE_SNAPSHOT_TIMEOUT_MS as _, runtimeStatePolicyFor as _n, parseJsonUnknown as _r, describeComposableCaps as _t, BatteryStatusSchema as a, pickAppLinkHub as an, asJsonObject as ar, coreBlockAddonId as at, DeclaredDevices as b, scoreRuntimes as bn, scopeKey as br, deviceStateCapability as bt, CAP_NAMES_WITH_STATUS as c, procedureAuthKey as cn, createEvent as cr, coreBlockSourceKind as ct, CORE_BLOCKS_ADDON_ID as d, replacedFieldKeys as dn, expandCapMethods as dr, dataStoreProviderCapability as dt, normalizeCoreBlockWrite as en, DEVICE_SETTINGS_CONTRIBUTION_METHODS as er, cameraGridLayoutCapability as et, CORE_BLOCK_ADDON_PREFIX as f, resolveBucketMs as fn, hydrateSchema as fr, databaseSnapshotCapability as ft, DATABASE_SNAPSHOT_SUFFIX as g, resolveMethodAuth as gn, parseJsonObject as gr, deriveBatteryPresence as gt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as h, resolveLocationMode as hn, nodePin as hr, defineExtensionSlotProvider as ht, BaseDevice as i, parseStreamParamsFormPatch as in, WELL_KNOWN_TAB_MAP as ir, compositionSourceRefs as it, RECORDING_SOURCE_CAMSTACK_ADDON as j, validateComposition as jn, foldSnapshotByFunction as jt, MINUTES_PER_DAY as k, streamQualityLabel as kn, extractNestedAddonId as kt, COMPOSED_ITEM_FIXED_FIELDS as l, ptzAutotrackCapability as ln, emitDownForOwnedCaps as lr, coreBlocksCapability as lt, CoreBlockSchema as m, resolveCoreBlockFiles as mn, isEvent as mr, decodeVectorBase64 as mt, AlertSchema as n, objectInputDeclaresAddonId as nn, ReadinessRegistry as nr, composerCapability as nt, CAMERA_SWITCH_ORDER as o, planComposition as on, asNumber as or, coreBlockComposition as ot, CalendarPreferencesSchema as p, resolveCoreBlockEntry as pn, isDeviceConfigCap as pr, declarationOwnerNodeId as pt, authProviderCapability as q, toExpressionValue as qn, looseSchema as qt, ApiKeyRecordSchema as r, objectInputDeclaresRequiredDeviceId as rn, ReadinessTimeoutError as rr, compositionFieldKey as rt, CAMSTACK_APP_LINK_ORIGIN as s, platformProbeCapability as sn, asString$1 as sr, coreBlockIdFromAddonId as st, ALL_CAPABILITY_DEFINITIONS as t, normalizeUnit as tn, DEVICE_STATUS_METHOD as tr, collectSecretConfigKeys as tt, COMPOSER_RUNNER_ID as u, reducePoints as un, emitReadiness as ur, createDeviceExtensionProvider as ut, DAY_NAMES as v, scopesAllowAddon as vn, readinessKey as vr, deviceExtensionCapability as vt, FieldClaimSchema as w, storageCapability as wn, enumerateSchemaFields as wt, DeviceStatusSchema as x, settingsStoreCapability as xn, sleep as xr, deviceStatusCapability as xt, DERIVED_CAMERA_SILENCED_CAP_NAMES as y, scopesAllowDeviceCap as yn, resolveCapMount as yr, deviceManagerCapability as yt, StorageLocationModeSchema as z, composedDeviceRef as zn, kebabToCamel as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
1
|
+
import { IncomingMessage, ServerResponse, OutgoingHttpHeaders } from 'node:http';
|
|
2
2
|
export interface ReverseProxyOptions {
|
|
3
3
|
/** Addon listener base, e.g. `http://127.0.0.1:54123`. */
|
|
4
4
|
readonly baseUrl: string;
|
|
@@ -14,6 +14,16 @@ export interface ReverseProxyOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
readonly replayBody?: Buffer;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* The upstream's response headers, minus the CORS policy, which belongs to the
|
|
19
|
+
* EDGE (D707). The hub stamps its allowlist verdict on `clientRes` with
|
|
20
|
+
* `setHeader` before hijacking, and Node merges those into `writeHead` — so an
|
|
21
|
+
* upstream `access-control-*` header would OVERRIDE the hub's answer: the
|
|
22
|
+
* authenticated file-server's `*` reached a refused origin this way. `Vary` is
|
|
23
|
+
* merged rather than replaced, so the edge's `Origin` survives an upstream
|
|
24
|
+
* `Accept-Encoding`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function edgeOwnedResponseHeaders(upRes: IncomingMessage, clientRes: ServerResponse): OutgoingHttpHeaders;
|
|
17
27
|
/** Reverse-proxy one request to an addon data-plane listener. Fire-and-forget:
|
|
18
28
|
* the caller must `reply.hijack()` (or otherwise stop the framework from also
|
|
19
29
|
* responding) before calling this, since we drive `clientRes` directly. */
|
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export { createFileDataPlaneHandler } from './http/file-data-plane.js';
|
|
|
55
55
|
export { allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, closeLanHttp, DEFAULT_LAN_HTTP_PORT, readLanHttpState, registerLanHttpHandler, } from './http/lan-http-bind.js';
|
|
56
56
|
export type { ReverseProxyOptions } from './http/reverse-proxy.js';
|
|
57
57
|
export { proxyToUpstream } from './http/reverse-proxy.js';
|
|
58
|
-
export type { ChildFanoutDelta, ChildFanoutRegistry, ChildFanoutSample, CrossNodeEventStats,
|
|
58
|
+
export type { ChildFanoutDelta, ChildFanoutRegistry, ChildFanoutSample, CrossNodeEventStats, EventPlaneCounters, EventPlaneReader, EventPlaneSources, EventPlaneWindow, } from './kernel/event-plane-report.js';
|
|
59
59
|
export { createEventPlaneMeter, createEventPlaneReader, diffEventPlane, EVENT_PLANE_TOP_N, formatEventPlane, } from './kernel/event-plane-report.js';
|
|
60
60
|
export type { SocketPeerDelta, SocketPeerSample, SocketPlaneBaseline, SocketPlaneCounters, SocketPlaneMeter, SocketPlaneReader, SocketPlaneRegistry, SocketPlaneRegistryChild, SocketPlaneSources, SocketPlaneWindow, } from './kernel/socket-plane-report.js';
|
|
61
61
|
export { createSocketPlaneMeter, createSocketPlaneReader, diffSocketPlane, EMPTY_SOCKET_PLANE_BASELINE, formatSocketPlane, readSocketQueues, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, } from './kernel/socket-plane-report.js';
|