camstack 1.2.178 → 1.2.180

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.
@@ -17735,6 +17735,57 @@ var CLIP_SEARCH_STRICTNESS = [
17735
17735
  "strict"
17736
17736
  ];
17737
17737
  var ClipSearchStrictnessSchema = external_exports.enum(CLIP_SEARCH_STRICTNESS);
17738
+ var MACRO_LABELS = [
17739
+ {
17740
+ id: "person",
17741
+ name: "Person"
17742
+ },
17743
+ {
17744
+ id: "vehicle",
17745
+ name: "Vehicle"
17746
+ },
17747
+ {
17748
+ id: "animal",
17749
+ name: "Animal"
17750
+ },
17751
+ {
17752
+ id: "package",
17753
+ name: "Package"
17754
+ }
17755
+ ];
17756
+ var DETECTION_MACRO_CLASSES = new Set(MACRO_LABELS.map((l) => l.id));
17757
+ var COCO_TO_MACRO = {
17758
+ mapping: {
17759
+ person: "person",
17760
+ bicycle: "vehicle",
17761
+ car: "vehicle",
17762
+ motorcycle: "vehicle",
17763
+ airplane: "vehicle",
17764
+ bus: "vehicle",
17765
+ train: "vehicle",
17766
+ truck: "vehicle",
17767
+ boat: "vehicle",
17768
+ bird: "animal",
17769
+ cat: "animal",
17770
+ dog: "animal",
17771
+ horse: "animal",
17772
+ sheep: "animal",
17773
+ cow: "animal",
17774
+ elephant: "animal",
17775
+ bear: "animal",
17776
+ zebra: "animal",
17777
+ giraffe: "animal",
17778
+ suitcase: "package",
17779
+ backpack: "package",
17780
+ handbag: "package"
17781
+ },
17782
+ preserveOriginal: false
17783
+ };
17784
+ var FILLABLE_STEP_IDS = [
17785
+ "animal-classifier",
17786
+ "vehicle-classifier",
17787
+ "package-detection"
17788
+ ];
17738
17789
  var MODEL_FORMATS = [
17739
17790
  "onnx",
17740
17791
  "coreml",
@@ -17828,6 +17879,11 @@ var ModelLicenseRecordSchema = external_exports.object({
17828
17879
  nonCommercial: external_exports.boolean().optional()
17829
17880
  });
17830
17881
  var ModelLicenseSchema = external_exports.preprocess((value) => typeof value === "string" ? { weights: value } : value, ModelLicenseRecordSchema);
17882
+ var FillsClassifierEffectSchema = external_exports.object({
17883
+ stepId: external_exports.enum(FILLABLE_STEP_IDS),
17884
+ labelToEffect: external_exports.record(external_exports.string(), external_exports.string()),
17885
+ uncovered: external_exports.array(external_exports.string()).readonly()
17886
+ });
17831
17887
  var ModelCatalogEntrySchema = external_exports.object({
17832
17888
  id: external_exports.string(),
17833
17889
  name: external_exports.string(),
@@ -17954,6 +18010,16 @@ var ModelCatalogEntrySchema = external_exports.object({
17954
18010
  */
17955
18011
  classMap: DetectionCatalogClassMapSchema.optional(),
17956
18012
  /**
18013
+ * The pipeline steps this ROOT detector already does the work of (D715):
18014
+ * its labels name the effect the step exists to produce (`deer` for
18015
+ * `animal-classifier`, `package` for `package-detection`). Derived from the
18016
+ * labelmap by `deriveClassifierFills`, never hand-written; a COCO model
18017
+ * declares none. Whether a declaration is honoured is the step's own
18018
+ * `labelLink` policy (`resolveLabelLink`). `labelToEffect` values are in
18019
+ * `FILLABLE_STEP_VOCABULARIES` (guard `check-label-link-vocabulary`).
18020
+ */
18021
+ fillsClassifierEffects: external_exports.array(FillsClassifierEffectSchema).readonly().optional(),
18022
+ /**
17957
18023
  * The model's CLIP feature-space contract (text encoder, dimension, vector
17958
18024
  * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
17959
18025
  * CLIP image encoder; its absence is what "not a CLIP model" means to the
@@ -25831,52 +25897,6 @@ var notificationOutputCapability = {
25831
25897
  })
25832
25898
  }
25833
25899
  };
25834
- var MACRO_LABELS = [
25835
- {
25836
- id: "person",
25837
- name: "Person"
25838
- },
25839
- {
25840
- id: "vehicle",
25841
- name: "Vehicle"
25842
- },
25843
- {
25844
- id: "animal",
25845
- name: "Animal"
25846
- },
25847
- {
25848
- id: "package",
25849
- name: "Package"
25850
- }
25851
- ];
25852
- var DETECTION_MACRO_CLASSES = new Set(MACRO_LABELS.map((l) => l.id));
25853
- var COCO_TO_MACRO = {
25854
- mapping: {
25855
- person: "person",
25856
- bicycle: "vehicle",
25857
- car: "vehicle",
25858
- motorcycle: "vehicle",
25859
- airplane: "vehicle",
25860
- bus: "vehicle",
25861
- train: "vehicle",
25862
- truck: "vehicle",
25863
- boat: "vehicle",
25864
- bird: "animal",
25865
- cat: "animal",
25866
- dog: "animal",
25867
- horse: "animal",
25868
- sheep: "animal",
25869
- cow: "animal",
25870
- elephant: "animal",
25871
- bear: "animal",
25872
- zebra: "animal",
25873
- giraffe: "animal",
25874
- suitcase: "package",
25875
- backpack: "package",
25876
- handbag: "package"
25877
- },
25878
- preserveOriginal: false
25879
- };
25880
25900
  var AUDIO_MACRO_LABELS = [
25881
25901
  {
25882
25902
  id: "speech",
@@ -27316,6 +27336,7 @@ var NcStateSummarySectionIdSchema = external_exports.enum([
27316
27336
  "detection-blind",
27317
27337
  "nodes",
27318
27338
  "addons",
27339
+ "addon-updates",
27319
27340
  "updates"
27320
27341
  ]);
27321
27342
  var NcStateSummaryPreviewSectionSchema = external_exports.object({
@@ -27702,7 +27723,19 @@ var NcAlarmModeDelaysSchema = external_exports.object({
27702
27723
  * When this mode may be armed. Absent / null = always allowed (same as a
27703
27724
  * rule with no `schedule`). Evaluated with {@link isScheduleActive}.
27704
27725
  */
27705
- schedule: NcScheduleSchema.optional()
27726
+ schedule: NcScheduleSchema.optional(),
27727
+ /**
27728
+ * D706: while this mode's ENTRY DELAY runs, do the alarm rules' own pushes go out (as an
27729
+ * intrusion naming the locations)? Absent = false — the entry-delay notification is the
27730
+ * only one, and the matches ride the triggered notification's mosaic (D705).
27731
+ */
27732
+ notifyDuringEntryDelay: external_exports.boolean().optional(),
27733
+ /**
27734
+ * D706: notify "watched again" when a sensor this arm bypassed closes and opens again.
27735
+ * Absent = false (logged, not sent). Even when true it is not sent when that same sensor
27736
+ * is the one that starts the entry delay — the entry-delay notification already names it.
27737
+ */
27738
+ notifySensorRewatched: external_exports.boolean().optional()
27706
27739
  });
27707
27740
  var NcAlarmModeDelaysListSchema = external_exports.array(NcAlarmModeDelaysSchema).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
27708
27741
  var NcAlarmModeDelaysEditSchema = external_exports.object({
@@ -27712,7 +27745,11 @@ var NcAlarmModeDelaysEditSchema = external_exports.object({
27712
27745
  triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional(),
27713
27746
  postTriggeredAction: NcAlarmPostTriggeredActionSchema.nullable().optional(),
27714
27747
  /** Set a schedule, or `null` to clear (mode always allowed again). */
27715
- schedule: NcScheduleSchema.nullable().optional()
27748
+ schedule: NcScheduleSchema.nullable().optional(),
27749
+ /** D706: set the switch, or `null` to clear it (back to the default, false). */
27750
+ notifyDuringEntryDelay: external_exports.boolean().nullable().optional(),
27751
+ /** D706: set the switch, or `null` to clear it (back to the default, false). */
27752
+ notifySensorRewatched: external_exports.boolean().nullable().optional()
27716
27753
  });
27717
27754
  var NcAlarmModeDelaysEditListSchema = external_exports.array(NcAlarmModeDelaysEditSchema).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
27718
27755
  var NcAlarmNonBlockingEditSchema = external_exports.object({
@@ -30836,7 +30873,8 @@ var PipelineModelOptionSchema = external_exports.object({
30836
30873
  group: ModelVariantGroupSchema.optional(),
30837
30874
  legacy: external_exports.boolean().optional(),
30838
30875
  provider: ModelProviderIdSchema.optional(),
30839
- defaultConfidence: external_exports.number().optional()
30876
+ defaultConfidence: external_exports.number().optional(),
30877
+ fillsClassifierEffects: external_exports.array(FillsClassifierEffectSchema).readonly().optional()
30840
30878
  });
30841
30879
  var ConfigFieldBridge = external_exports.custom();
30842
30880
  var PipelineAddonSchemaSchema = external_exports.object({
@@ -31684,6 +31722,11 @@ var MotionSourceEnum = external_exports.enum([
31684
31722
  "analyzer",
31685
31723
  "device-activity"
31686
31724
  ]);
31725
+ var SessionTriggerSchema = external_exports.object({
31726
+ source: MotionSourceEnum,
31727
+ triggeredBy: MotionTriggeredBySchema,
31728
+ sensorName: external_exports.string().optional()
31729
+ });
31687
31730
  var MotionSourcesSchema = external_exports.array(MotionSourceEnum);
31688
31731
  var MOTION_SOURCE_LABELS = {
31689
31732
  analyzer: "Frame-diff Analyzer (motion addon)",
@@ -31831,6 +31874,14 @@ var RunnerCameraConfigSchema = external_exports.object({
31831
31874
  */
31832
31875
  motionSources: MotionSourcesSchema.default(["analyzer"]),
31833
31876
  /**
31877
+ * What opened this attach, on a SESSION attach only (see
31878
+ * {@link SessionTriggerSchema}). OPTIONAL with no default: absent on a
31879
+ * standing attach, an occupancy burst, a re-dispatch with no motion event
31880
+ * behind it, and every attach from an orchestrator older than the field — the
31881
+ * runner then names no source on the phase event.
31882
+ */
31883
+ sessionTrigger: SessionTriggerSchema.optional(),
31884
+ /**
31834
31885
  * WHICH root detector runs for this camera. The detection counterpart of
31835
31886
  * {@link motionSources}, same shape and same discipline: a per-camera list
31836
31887
  * of sources the system understands, vendor-agnostic, owned here.
@@ -39588,7 +39639,7 @@ var LocalInterfaceSchema = external_exports.object({
39588
39639
  name: external_exports.string(),
39589
39640
  family: external_exports.enum(["IPv4", "IPv6"]),
39590
39641
  address: external_exports.string(),
39591
- /** CIDR shorthand (e.g. `192.168.x.x/24`). Empty when OS doesn't expose. */
39642
+ /** CIDR shorthand (e.g. `192.168.10.10/24`). Empty when OS doesn't expose. */
39592
39643
  cidr: external_exports.string(),
39593
39644
  /** OS netmask. Stable across calls so the SDK can hash on it. */
39594
39645
  netmask: external_exports.string(),
@@ -39637,7 +39688,8 @@ var ConnectionEndpointSchema = external_exports.object({
39637
39688
  "lan-ipv4",
39638
39689
  "lan-ipv6",
39639
39690
  "public",
39640
- "loopback"
39691
+ "loopback",
39692
+ "app-link"
39641
39693
  ]),
39642
39694
  /**
39643
39695
  * Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
@@ -39702,8 +39754,20 @@ var GetConnectionEndpointsResultSchema = external_exports.object({
39702
39754
  var NotificationEndpointSchema = external_exports.object({
39703
39755
  /** The operator's explicit choice, or null for AUTO. */
39704
39756
  baseUrl: external_exports.string().nullable(),
39705
- /** What the ranking currently resolves to (null when nothing is reachable). */
39706
- resolved: external_exports.string().nullable()
39757
+ /**
39758
+ * The effective flagged address: the explicit choice, else (AUTO) the
39759
+ * CamStack app link `https://camstack.zentik.app` (D709). A pre-D709 hub
39760
+ * answered the public tunnel / mesh here, or null.
39761
+ */
39762
+ resolved: external_exports.string().nullable(),
39763
+ /**
39764
+ * The hub origin an app link carries as `hub=` (D709): the hub's best
39765
+ * public HTTPS address — the tunnel, then the mesh (Tailscale MagicDNS) —
39766
+ * picked from this cap's own palette by `pickAppLinkHub`. `null` when the
39767
+ * hub advertises neither; the app link is then minted without `hub=`.
39768
+ * Absent on a pre-D709 hub.
39769
+ */
39770
+ appLinkHub: external_exports.string().nullable()
39707
39771
  });
39708
39772
  var ViewerEndpointsSchema = external_exports.object({
39709
39773
  /** The operator's explicit race set, or empty for AUTO. */
@@ -39767,7 +39831,7 @@ var localNetworkCapability = {
39767
39831
  * every client a second authority on a socket only the hub binds. A viewer
39768
39832
  * configured with a port-less public URL (`https://camstack.example.top`)
39769
39833
  * infers 443 from the scheme, asks with 443, and was handed
39770
- * `https://192.168.x.x:443` for a hub listening on 4443. That candidate
39834
+ * `https://192.168.10.9:443` for a hub listening on 4443. That candidate
39771
39835
  * cannot ever answer, and losing its race reads in the log exactly like
39772
39836
  * "the LAN was tried and it was slower" — so an operator sitting on his own
39773
39837
  * WiFi stayed on the public tunnel for weeks, with the LAN candidate born
@@ -39800,13 +39864,21 @@ var localNetworkCapability = {
39800
39864
  * Pass `'https'` when the caller is itself loaded over HTTPS
39801
39865
  * to avoid mixed-content blocks in the browser. The public
39802
39866
  * tunnel always emits `https://` regardless. */
39803
- scheme: external_exports.enum(["http", "https"]).optional()
39867
+ scheme: external_exports.enum(["http", "https"]).optional(),
39868
+ /** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
39869
+ * an address notification links can be flagged with, not a hub
39870
+ * route. Default `false`: racers and rankers never see it. */
39871
+ includeAppLink: external_exports.boolean().optional()
39804
39872
  }), GetConnectionEndpointsResultSchema),
39805
39873
  /**
39806
- * The endpoint OUTBOUND artifacts must be addressed by — notification
39807
- * attachment links and deep links. `baseUrl: null` means AUTO: the first
39808
- * public candidate (a configured origin, then a connected tunnel, then the
39809
- * LAN), never loopback.
39874
+ * The address notification links are flagged with. `baseUrl: null` means
39875
+ * AUTO, which is the CamStack app link (D709): viewer taps go through
39876
+ * `https://camstack.zentik.app/…?hub=<appLinkHub>` and open the app. Any
39877
+ * hub address the palette lists can be flagged instead; then viewer taps,
39878
+ * attachment links and action buttons all use it. Signed media and
39879
+ * buttons never use the app link — with it flagged (or AUTO) they keep
39880
+ * the ranked hub ladder (a configured origin, a connected tunnel, then
39881
+ * the LAN), never loopback.
39810
39882
  *
39811
39883
  * Why an explicit marker: the automatic ranking cannot know which of
39812
39884
  * several reachable addresses the RECIPIENT can actually open. A link is
@@ -40165,7 +40237,7 @@ var MeshPeerSchema = external_exports.object({
40165
40237
  tags: external_exports.array(external_exports.string()).readonly(),
40166
40238
  /** True when the peer advertises itself as an exit-node candidate. */
40167
40239
  exitNodeOption: external_exports.boolean(),
40168
- /** Subnet routes the peer advertises (e.g. `["192.168.x.x/24"]`). */
40240
+ /** Subnet routes the peer advertises (e.g. `["192.168.10.0/24"]`). */
40169
40241
  advertisedRoutes: external_exports.array(external_exports.string()).readonly(),
40170
40242
  /** Owner account login (e.g. `foo@example.com`). Null for tagged peers. */
40171
40243
  userLogin: external_exports.string().nullable(),
@@ -57791,12 +57863,14 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
57791
57863
  {
57792
57864
  id: "addons",
57793
57865
  family: "system",
57794
- label: "Addons",
57795
- kinds: [
57796
- "addon-crash-loop",
57797
- "addon-update-available",
57798
- "addon-updated"
57799
- ]
57866
+ label: "Addons stopped",
57867
+ kinds: ["addon-crash-loop"]
57868
+ },
57869
+ {
57870
+ id: "addon-updates",
57871
+ family: "system",
57872
+ label: "Addon updates",
57873
+ kinds: ["addon-update-available", "addon-updated"]
57800
57874
  },
57801
57875
  {
57802
57876
  id: "updates",
@@ -57930,13 +58004,15 @@ var STATE_SUMMARY_SECTION_VARS = [
57930
58004
  },
57931
58005
  {
57932
58006
  name: "summaryAddons",
57933
- label: "Summary: addons",
57934
- example: "@camstack/addon-recorder 1.2.3 \u2192 1.2.4",
57935
- kinds: [
57936
- "addon-crash-loop",
57937
- "addon-update-available",
57938
- "addon-updated"
57939
- ]
58007
+ label: "Summary: addons stopped",
58008
+ example: "hub \u2014 recorder stopped after repeated crashes",
58009
+ kinds: ["addon-crash-loop"]
58010
+ },
58011
+ {
58012
+ name: "summaryAddonUpdates",
58013
+ label: "Summary: addon updates",
58014
+ example: "hub:\n\u2022 @camstack/addon-recorder 1.2.3 \u2192 1.2.4",
58015
+ kinds: ["addon-update-available", "addon-updated"]
57940
58016
  },
57941
58017
  {
57942
58018
  name: "summaryUpdates",
@@ -58277,6 +58353,16 @@ var NC_TEMPLATE_VARS = [
58277
58353
  kinds: ["system"],
58278
58354
  systemEventKinds: [...DEVICE_EVENTS]
58279
58355
  },
58356
+ {
58357
+ name: "locations",
58358
+ label: "Intrusion locations",
58359
+ example: "Ingresso, Corridoio, Salone",
58360
+ group: "system",
58361
+ families: ["rule"],
58362
+ fields: [...RULE_TEXT],
58363
+ kinds: ["system"],
58364
+ systemEventKinds: [...COMBINED_ALARM]
58365
+ },
58280
58366
  {
58281
58367
  name: "deviceId",
58282
58368
  label: "Device id",
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  FFMPEG_PATH_ENV,
4
4
  runDiscover
5
- } from "./chunk-3AV5PMK2.js";
5
+ } from "./chunk-5IZ6XS4J.js";
6
6
  import "./chunk-LMMQX4CK.js";
7
7
 
8
8
  // src/cli.ts
@@ -39,7 +39,7 @@ async function runServe(args) {
39
39
  ...typeof values.data === "string" ? { data: values.data } : {}
40
40
  };
41
41
  Object.assign(process.env, buildServeEnv(opts));
42
- await import("./launcher-2BHKBGSC.js");
42
+ await import("./launcher-QBPVDG54.js");
43
43
  }
44
44
 
45
45
  // src/commands/agent.ts
@@ -72,7 +72,7 @@ async function runAgent(args) {
72
72
  allowPositionals: false
73
73
  });
74
74
  if (typeof values.hub !== "string" || values.hub.length === 0) {
75
- throw new Error("--hub is required (e.g. --hub 192.168.x.x)");
75
+ throw new Error("--hub is required (e.g. --hub 192.168.10.10)");
76
76
  }
77
77
  if (typeof values.token !== "string" || values.token.length === 0) {
78
78
  throw new Error("--token is required");
@@ -84,7 +84,7 @@ async function runAgent(args) {
84
84
  ...typeof values.port === "string" ? { port: values.port } : {}
85
85
  };
86
86
  Object.assign(process.env, buildAgentEnv(opts));
87
- await import("./launcher-2BHKBGSC.js");
87
+ await import("./launcher-QBPVDG54.js");
88
88
  }
89
89
 
90
90
  // src/commands/setup.ts
@@ -100,8 +100,6 @@ function describeFfmpegProvisioning(env) {
100
100
  return "ffmpeg: the pinned build is downloaded by each node on first start \u2014 nothing to install";
101
101
  }
102
102
  function getDefaultDataPath() {
103
- const root = process.env.CAMSTACK_ROOT;
104
- if (root) return path.join(root, "data");
105
103
  return path.join(process.cwd(), "camstack-data");
106
104
  }
107
105
  function runSetup(args) {
@@ -1134,7 +1132,7 @@ function isUnknown(_value) {
1134
1132
  return true;
1135
1133
  }
1136
1134
  async function resolveServerInteractive(presetNamespace) {
1137
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-XEXOBUMG.js");
1135
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-2RRBNIQP.js");
1138
1136
  if (presetNamespace) {
1139
1137
  const spinner4 = clack.spinner();
1140
1138
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -5,7 +5,7 @@ import {
5
5
  filterHubNodes,
6
6
  resolveHubFromDiscovered,
7
7
  runDiscover
8
- } from "./chunk-3AV5PMK2.js";
8
+ } from "./chunk-5IZ6XS4J.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,