@matter-server/dashboard 1.3.2-alpha.0-20260727-ec21ba7 → 1.3.3

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.
Files changed (62) hide show
  1. package/dist/esm/client/models/descriptions.d.ts +12 -0
  2. package/dist/esm/client/models/descriptions.d.ts.map +1 -1
  3. package/dist/esm/client/models/descriptions.js +1480 -1
  4. package/dist/esm/client/models/descriptions.js.map +1 -1
  5. package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.d.ts +1 -1
  6. package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.d.ts.map +1 -1
  7. package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.js +3 -3
  8. package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.js.map +1 -1
  9. package/dist/esm/pages/matter-cluster-view.d.ts +3 -1
  10. package/dist/esm/pages/matter-cluster-view.d.ts.map +1 -1
  11. package/dist/esm/pages/matter-cluster-view.js +72 -25
  12. package/dist/esm/pages/matter-cluster-view.js.map +1 -1
  13. package/dist/esm/pages/network/network-types.d.ts +2 -0
  14. package/dist/esm/pages/network/network-types.d.ts.map +1 -1
  15. package/dist/esm/pages/network/network-utils.d.ts +6 -0
  16. package/dist/esm/pages/network/network-utils.d.ts.map +1 -1
  17. package/dist/esm/pages/network/network-utils.js +19 -0
  18. package/dist/esm/pages/network/network-utils.js.map +1 -1
  19. package/dist/esm/pages/network/thread-graph.d.ts.map +1 -1
  20. package/dist/esm/pages/network/thread-graph.js +29 -0
  21. package/dist/esm/pages/network/thread-graph.js.map +1 -1
  22. package/dist/esm/pages/network/update-connections-dialog.d.ts +14 -1
  23. package/dist/esm/pages/network/update-connections-dialog.d.ts.map +1 -1
  24. package/dist/esm/pages/network/update-connections-dialog.js +107 -15
  25. package/dist/esm/pages/network/update-connections-dialog.js.map +1 -1
  26. package/dist/esm/pages/network/wifi-graph.d.ts.map +1 -1
  27. package/dist/esm/pages/network/wifi-graph.js +8 -3
  28. package/dist/esm/pages/network/wifi-graph.js.map +1 -1
  29. package/dist/esm/util/icd.d.ts +2 -6
  30. package/dist/esm/util/icd.d.ts.map +1 -1
  31. package/dist/esm/util/icd.js +3 -9
  32. package/dist/esm/util/icd.js.map +1 -1
  33. package/dist/esm/util/semantic-tags.d.ts +31 -0
  34. package/dist/esm/util/semantic-tags.d.ts.map +1 -0
  35. package/dist/esm/util/semantic-tags.js +65 -0
  36. package/dist/esm/util/semantic-tags.js.map +6 -0
  37. package/dist/web/js/{attribute-write-dialog-DQ9quSZw.js → attribute-write-dialog-Dfm95ZtQ.js} +1 -1
  38. package/dist/web/js/{command-invoke-dialog-CztMjUn9.js → command-invoke-dialog-DrORSE5f.js} +1 -1
  39. package/dist/web/js/{commission-node-dialog-B4r-97Ng.js → commission-node-dialog-Wjb4chGv.js} +5 -5
  40. package/dist/web/js/{commission-node-existing-BhR5cegs.js → commission-node-existing-Ykm-eejQ.js} +1 -1
  41. package/dist/web/js/{commission-node-thread-dtQAPgAE.js → commission-node-thread-DacHGwnB.js} +1 -1
  42. package/dist/web/js/{commission-node-wifi-Dyxa8cfO.js → commission-node-wifi-CEKp93HM.js} +1 -1
  43. package/dist/web/js/{dialog-box-DkZh3xw5.js → dialog-box-DEKE_ZlH.js} +1 -1
  44. package/dist/web/js/{fabric-label-dialog-B38vLRHA.js → fabric-label-dialog-CcMZOA7F.js} +1 -1
  45. package/dist/web/js/main.js +1 -1
  46. package/dist/web/js/{matter-dashboard-app-D_fK75eF.js → matter-dashboard-app-CEG7MSLx.js} +2142 -373
  47. package/dist/web/js/{node-acl-add-dialog-CC_Cbnx3.js → node-acl-add-dialog-BDM3Rcou.js} +1 -1
  48. package/dist/web/js/{node-binding-dialog-COAoH_PY.js → node-binding-dialog-CYsbUPsh.js} +1 -1
  49. package/dist/web/js/{node-label-dialog-Cts_ibpe.js → node-label-dialog-DFIMPMuJ.js} +1 -1
  50. package/dist/web/js/{settings-dialog-CGgXCmWv.js → settings-dialog-CGXliJcr.js} +1 -1
  51. package/package.json +4 -4
  52. package/src/client/models/descriptions.ts +1490 -0
  53. package/src/pages/cluster-commands/AGENTS.md +6 -0
  54. package/src/pages/cluster-commands/clusters/icd-management-commands.ts +3 -6
  55. package/src/pages/matter-cluster-view.ts +83 -29
  56. package/src/pages/network/network-types.ts +2 -0
  57. package/src/pages/network/network-utils.ts +26 -0
  58. package/src/pages/network/thread-graph.ts +42 -0
  59. package/src/pages/network/update-connections-dialog.ts +142 -22
  60. package/src/pages/network/wifi-graph.ts +7 -2
  61. package/src/util/icd.ts +5 -13
  62. package/src/util/semantic-tags.ts +89 -0
package/src/util/icd.ts CHANGED
@@ -4,19 +4,12 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { isLongIdleTimeCapable, isLongIdleTimeDevice } from "@matter-server/ws-client";
7
8
  import { attributeArray } from "./access-control.js";
8
9
  import { formatDuration } from "./duration.js";
9
10
 
10
11
  export const ICD_CLUSTER_ID = 70;
11
12
 
12
- /** BasicInformation SpecificationVersion is encoded 0xMMmmpprr; matter.js only treats LIT as usable at >= 1.4.0. */
13
- export const MIN_LIT_SPECIFICATION_VERSION = 0x01040000;
14
-
15
- export function litSpecVersionOk(attributes: Record<string, unknown>): boolean {
16
- const value = attributes["0/40/21"];
17
- return typeof value === "number" && value >= MIN_LIT_SPECIFICATION_VERSION;
18
- }
19
-
20
13
  export interface IcdFeatures {
21
14
  checkInProtocolSupport: boolean;
22
15
  userActiveModeTrigger: boolean;
@@ -147,13 +140,12 @@ export interface IcdBadge {
147
140
  }
148
141
 
149
142
  /**
150
- * Tri-state "ICD" badge for LIT-capable nodes (cluster present, LongIdleTimeSupport feature, spec >= 1.4 —
151
- * below that the controller does not track check-ins, so offline is not "normal sleeping").
152
- * Returns undefined for nodes that aren't LIT-capable, since neither SIT-only nor unsupported nodes get a badge.
143
+ * Tri-state "ICD" badge for LIT-capable nodes. Returns undefined for nodes that aren't LIT-capable,
144
+ * since neither SIT-only nor unsupported nodes get a badge.
153
145
  */
154
146
  export function icdBadge(attributes: Record<string, unknown>, available: boolean): IcdBadge | undefined {
147
+ if (!isLongIdleTimeCapable(attributes)) return undefined;
155
148
  const info = icdInfo(attributes);
156
- if (!info.supported || !info.features.longIdleTimeSupport || !litSpecVersionOk(attributes)) return undefined;
157
149
 
158
150
  if (info.operatingMode === "SIT") {
159
151
  return {
@@ -162,7 +154,7 @@ export function icdBadge(attributes: Record<string, unknown>, available: boolean
162
154
  };
163
155
  }
164
156
 
165
- if (info.operatingMode === "LIT") {
157
+ if (isLongIdleTimeDevice(attributes)) {
166
158
  if (!available) {
167
159
  const offlineInterval =
168
160
  info.idleModeDuration !== undefined ? formatDuration(info.idleModeDuration) : "its check-in interval";
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025-2026 Open Home Foundation
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ import { toBigIntAwareJson } from "@matter-server/ws-client";
8
+ import { semantic_tag_namespaces } from "../client/models/descriptions.js";
9
+ import { attributeArray } from "./access-control.js";
10
+ import { formatHex } from "./format_hex.js";
11
+
12
+ // Descriptor cluster and its TagList attribute (semantic tags for the endpoint)
13
+ export const DESCRIPTOR_CLUSTER_ID = 29;
14
+ export const TAG_LIST_ATTR = 4;
15
+
16
+ export interface SemanticTag {
17
+ mfgCode: number | null;
18
+ namespaceId: number;
19
+ tag: number;
20
+ label: string | null;
21
+ }
22
+
23
+ function isRecord(value: unknown): value is Record<string, unknown> {
24
+ return typeof value === "object" && value !== null;
25
+ }
26
+
27
+ /** SemanticTagStruct wire entries are field-tag keyed: "0" MfgCode, "1" NamespaceID, "2" Tag, "3" Label. */
28
+ function decodeSemanticTag(entry: unknown): SemanticTag | undefined {
29
+ if (!isRecord(entry)) return undefined;
30
+ const namespaceId = entry["1"];
31
+ const tag = entry["2"];
32
+ if (typeof namespaceId !== "number" || typeof tag !== "number") return undefined;
33
+ const mfgCode = entry["0"];
34
+ const label = entry["3"];
35
+ return {
36
+ mfgCode: typeof mfgCode === "number" ? mfgCode : null,
37
+ namespaceId,
38
+ tag,
39
+ label: typeof label === "string" ? label : null,
40
+ };
41
+ }
42
+
43
+ export type SemanticTagListEntry = { kind: "tag"; semtag: SemanticTag } | { kind: "raw"; raw: unknown };
44
+
45
+ // undefined means the TagList attribute hasn't been read yet — an empty array means the device
46
+ // reported no semantic tags.
47
+ export function decodeSemanticTagList(value: unknown): SemanticTagListEntry[] | undefined {
48
+ if (value === undefined) return undefined;
49
+ if (!Array.isArray(value) && !isRecord(value)) return [{ kind: "raw", raw: value }];
50
+
51
+ return attributeArray(value).map((entry): SemanticTagListEntry => {
52
+ const semtag = decodeSemanticTag(entry);
53
+ return semtag === undefined ? { kind: "raw", raw: entry } : { kind: "tag", semtag };
54
+ });
55
+ }
56
+
57
+ const RAW_ENTRY_TEXT_MAX = 60;
58
+
59
+ export function describeSemanticTagListEntry(entry: SemanticTagListEntry): {
60
+ text: string;
61
+ title: string;
62
+ erroneous: boolean;
63
+ } {
64
+ if (entry.kind === "tag") return { ...describeSemanticTag(entry.semtag), erroneous: false };
65
+
66
+ const raw = entry.raw === undefined ? "undefined" : toBigIntAwareJson(entry.raw);
67
+ const text = raw.length > RAW_ENTRY_TEXT_MAX ? `${raw.slice(0, RAW_ENTRY_TEXT_MAX - 1)}…` : raw;
68
+ return { text, title: `Not a SemanticTagStruct: ${raw}`, erroneous: true };
69
+ }
70
+
71
+ // Renders a single semantic tag as "Namespace → Tag", falling back to raw ids when the
72
+ // namespace is manufacturer-specific or unrecognized (standard namespaces only cover Matter's
73
+ // own registry, not vendor-defined ones referenced via mfgCode).
74
+ export function describeSemanticTag(semtag: SemanticTag): { text: string; title: string } {
75
+ const { mfgCode, namespaceId, tag, label } = semtag;
76
+ const idSuffix = ` (ns ${namespaceId}, tag ${tag})`;
77
+
78
+ if (mfgCode != null) {
79
+ const text = label ? `Mfg ${formatHex(mfgCode)}: ${label}` : `Mfg ${formatHex(mfgCode)} tag ${tag}`;
80
+ return { text, title: `Manufacturer-specific${idSuffix}, mfgCode ${formatHex(mfgCode)}` };
81
+ }
82
+
83
+ const namespace = semantic_tag_namespaces[namespaceId];
84
+ const tagInfo = namespace?.tags[tag];
85
+ const namespaceLabel = namespace?.label ?? `Namespace ${namespaceId}`;
86
+ const tagLabel = tagInfo?.label ?? `Tag ${tag}`;
87
+ const text = label ? `${namespaceLabel} → ${tagLabel} ("${label}")` : `${namespaceLabel} → ${tagLabel}`;
88
+ return { text, title: `${namespaceLabel} → ${tagLabel}${idSuffix}` };
89
+ }