Open
Conversation
Update spec parser to handle Matter 1.5 HTML structure changes including new table formats, namespace translations, device type parsing, and large message quality. Fix JSDoc comment escaping for */ sequences. Build cluster index from all device children for element requirement resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add *Server.ts and top-level behaviors/index.ts to prevent prettier from reformatting generated behavior files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip emitting requirements reference when the requirements namespace is empty, preventing TypeScript errors for composite device types like FloodlightCamera and VideoDoorbell that have no direct requirements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update WindowCovering test to remove AbsolutePosition feature and use currentPositionLiftPercent100ths. Fix server list ClusterId ordering in InteractionProtocolTest to match 1.5 cluster definitions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated cluster definitions, behaviors, device types, endpoints, globals, tags, and forward declarations from the Matter 1.5 parsed specification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Server behavior files are hand-customized and should remain formatted. The generated output is already prettier-compliant. Also remove plan document that should not be committed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matter 1.5 renamed "Derived Cluster Type" to "Derived Cluster Namespace" in mode-derived clusters. Add the new section name so ModeTag and ModeChangeStatus datatypes are correctly parsed for RVC Run/Clean Mode, Dishwasher Mode, Laundry Washer Mode, and other derivative clusters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use JSON.stringify instead of string interpolation for default values in INVALID_VALUE error messages so object values render meaningfully. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the Matter.js model/codegen pipeline to align with Matter specification 1.5, including regenerated standard elements and new clusters/device types, plus a few supporting runtime/tooling fixes.
Changes:
- Bumped spec revision constants to 1.5.0 and regenerated model “standard elements” (clusters, datatypes, device types, namespaces, forwards).
- Added support for multi-instance device-type requirements via a new
instancefield. - Improved parsing/validation behavior (more conformance patterns; clearer invalid default-value messages) and updated tooling ignores.
Reviewed changes
Copilot reviewed 163 out of 724 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/model/src/common/Specification.ts | Bumps default spec revision/version constants to Matter 1.5.0. |
| packages/model/src/elements/RequirementElement.ts | Adds instance?: number to requirement elements for multi-instance requirements. |
| packages/model/src/models/RequirementModel.ts | Persists instance through model construction and toElement(). |
| packages/model/src/logic/definition-validation/ValueValidator.ts | Improves invalid-default error rendering via JSON.stringify. |
| packages/model/src/logic/cluster-variance/InferredComponents.ts | Adds new conformance/variance matcher patterns for spec 1.5 expressions. |
| packages/model/src/standard/elements/definitions.ts | Updates exports for regenerated/added standard elements (clusters/devices/namespaces). |
| packages/model/src/standard/elements/models.ts | Updates generated model bindings to include new/renamed definitions. |
| packages/model/src/standard/elements/root-node.element.ts | Regenerated RootNode device type requirements/conditions for new spec features (TLS/time sync/etc.). |
| packages/model/src/standard/elements/base.element.ts | Replaces legacy “conditions enum field” with explicit Condition elements. |
| packages/model/src/standard/elements/content-app.element.ts | Migrates conditions representation to Condition element. |
| packages/model/src/standard/elements/casting-video-player.element.ts | Adds Messages; migrates conditions representation to Condition element. |
| packages/model/src/standard/elements/basic-video-player.element.ts | Adds Messages; migrates conditions representation to Condition element. |
| packages/model/src/standard/elements/bridged-node.element.ts | Migrates conditions representation to Condition element; reorders requirements. |
| packages/model/src/standard/elements/aggregator.element.ts | Migrates conditions representation to Condition element. |
| packages/model/src/standard/elements/device-energy-management-device.element.ts | Adds ElectricalGridConditions client requirement; migrates to Condition element. |
| packages/model/src/standard/elements/temperature-controlled-cabinet.element.ts | Replaces synthetic conditions field with explicit Condition elements. |
| packages/model/src/standard/elements/namespace.element.ts | Adds/renames namespace enum entries (Common* prefixes + new Closure* namespaces). |
| packages/model/src/standard/elements/common-closure.element.ts | Renames to CommonClosure namespace model. |
| packages/model/src/standard/elements/common-compass-direction.element.ts | Renames to CommonCompassDirection namespace model. |
| packages/model/src/standard/elements/common-compass-location.element.ts | Renames to CommonCompassLocation namespace model. |
| packages/model/src/standard/elements/common-direction.element.ts | Renames to CommonDirection namespace model. |
| packages/model/src/standard/elements/common-level.element.ts | Renames to CommonLevel namespace model. |
| packages/model/src/standard/elements/common-location.element.ts | Renames to CommonLocation namespace model. |
| packages/model/src/standard/elements/common-number.element.ts | Renames to CommonNumber namespace model. |
| packages/model/src/standard/elements/common-position.element.ts | Renames to CommonPosition namespace model. |
| packages/model/src/standard/elements/common-relative-position.element.ts | Renames to CommonRelativePosition namespace model. |
| packages/model/src/standard/elements/common-landmark-namespace.element.ts | Renames to CommonLandmarkNamespace namespace model. |
| packages/model/src/standard/elements/common-area-namespace.element.ts | Renames to CommonAreaNamespace; updates reserved tag names. |
| packages/model/src/standard/elements/closure-namespace.element.ts | Adds new Closure semantic namespace. |
| packages/model/src/standard/elements/closure-panel-namespace.element.ts | Adds ClosurePanel semantic namespace. |
| packages/model/src/standard/elements/closure-covering.element.ts | Adds ClosureCovering semantic namespace. |
| packages/model/src/standard/elements/closure-window.element.ts | Adds ClosureWindow semantic namespace. |
| packages/model/src/standard/elements/closure-cabinet.element.ts | Adds ClosureCabinet semantic namespace. |
| packages/model/src/standard/elements/closure-control.element.ts | Adds new ClosureControl cluster definition. |
| packages/model/src/standard/elements/closure-dimension.element.ts | Adds new ClosureDimension cluster definition. |
| packages/model/src/standard/elements/closure-device.element.ts | Adds new Closure device type definition. |
| packages/model/src/standard/elements/closure-panel-device.element.ts | Adds new ClosurePanel device type definition. |
| packages/model/src/standard/elements/closure-controller.element.ts | Adds new ClosureController device type definition. |
| packages/model/src/standard/elements/thread-border-router.element.ts | Adds new ThreadBorderRouter device type definition. |
| packages/model/src/standard/elements/secondary-network-interface.element.ts | Adjusts required diagnostics clusters ordering/content. |
| packages/model/src/standard/elements/network-infrastructure-manager.element.ts | Adds RootNode ManagedAclAllowed condition requirement and ThreadNetworkDiagnostics. |
| packages/model/src/standard/elements/tls-certificate-management.element.ts | Adds new TLS Certificate Management cluster definition. |
| packages/model/src/standard/elements/push-av-stream-transport.element.ts | Adds new Push AV Stream Transport cluster definition. |
| packages/model/src/standard/elements/stream-usage-enum.element.ts | Adds StreamUsage enum datatype. |
| packages/model/src/standard/elements/snapshot-camera.element.ts | Adds SnapshotCamera device type definition. |
| packages/model/src/standard/elements/camera.element.ts | Adds Camera device type definition (with TLS/time-sync conditions). |
| packages/model/src/standard/elements/camera-controller.element.ts | Adds CameraController device type definition. |
| packages/model/src/standard/elements/floodlight-camera.element.ts | Adds FloodlightCamera device type definition. |
| packages/model/src/standard/elements/intercom.element.ts | Adds Intercom device type definition (with TLS/time-sync conditions). |
| packages/model/src/standard/elements/doorbell.element.ts | Adds Doorbell device type definition. |
| packages/model/src/standard/elements/audio-doorbell.element.ts | Adds AudioDoorbell device type definition. |
| packages/model/src/standard/elements/chime-cluster.element.ts | Adds Chime cluster definition. |
| packages/model/src/standard/elements/chime-device.element.ts | Adds Chime device type definition. |
| packages/model/src/standard/elements/soil-measurement.element.ts | Adds SoilMeasurement cluster definition. |
| packages/model/src/standard/elements/soil-sensor.element.ts | Adds SoilSensor device type definition. |
| packages/model/src/standard/elements/irrigation-system.element.ts | Adds IrrigationSystem device type definition. |
| packages/model/src/standard/elements/meter-reference-point.element.ts | Adds MeterReferencePoint device type definition. |
| packages/model/src/standard/elements/electrical-energy-tariff.element.ts | Adds ElectricalEnergyTariff device type definition. |
| packages/model/src/standard/elements/electrical-meter.element.ts | Adds ElectricalMeter device type definition. |
| packages/model/src/standard/elements/electrical-utility-meter.element.ts | Adds ElectricalUtilityMeter device type definition. |
| packages/model/src/standard/elements/meter-identification.element.ts | Adds MeterIdentification cluster definition. |
| packages/model/src/standard/elements/commodity-price.element.ts | Adds CommodityPrice cluster definition. |
| packages/model/src/standard/elements/commodity-metering.element.ts | Adds CommodityMetering cluster definition. |
| packages/model/src/standard/elements/electrical-grid-conditions.element.ts | Adds ElectricalGridConditions cluster definition. |
| packages/model/src/standard/elements/tariff-unit-enum.element.ts | Adds TariffUnit enum datatype. |
| packages/model/src/standard/elements/tariff-price-type-enum.element.ts | Adds TariffPriceType enum datatype. |
| packages/model/src/standard/elements/power-threshold-source-enum.element.ts | Adds PowerThresholdSource enum datatype. |
| packages/model/src/standard/elements/power-threshold-struct.element.ts | Adds PowerThreshold struct datatype. |
| packages/model/src/standard/elements/power-topology.element.ts | Adds CircuitNodeStruct datatype to PowerTopology cluster. |
| packages/model/src/standard/elements/electrical-energy-measurement.element.ts | Updates ElectricalEnergyMeasurement revision/feature map and adds apparent/reactive energy fields. |
| packages/model/src/standard/elements/general-commissioning.element.ts | Adds NetworkRecovery feature and related attributes/datatype. |
| packages/model/src/standard/elements/color-control.element.ts | Updates cluster revision and changes several attributes from RW to R access per spec 1.5. |
| packages/model/src/standard/elements/thermostat-cluster.element.ts | Updates feature/attribute defaults/constraints and removes deprecated elements per spec. |
| packages/model/src/standard/elements/thermostat-device.element.ts | Updates Thermostat device type requirements (removal/reordering per spec). |
| packages/model/src/standard/elements/rvc-run-mode.element.ts | Bumps revision and adds DIRECTMODECH feature bit. |
| packages/model/src/standard/elements/rvc-clean-mode.element.ts | Bumps revision and adds DIRECTMODECH feature bit. |
| packages/model/src/standard/elements/ota-software-update-provider.element.ts | Updates default/conformance for DelayedActionTime. |
| packages/model/src/standard/elements/joint-fabric-datastore.element.ts | Fixes GroupPermission field metadata (constraint→quality). |
| packages/model/src/standard/elements/group-key-management.element.ts | Updates access flags and adds FabricIndex field. |
| packages/model/src/standard/elements/label.element.ts | Updates LabelList attribute definition (removes derived/default details). |
| packages/model/src/standard/elements/application-basic.element.ts | Tightens ApplicationName constraint to max 256. |
| packages/model/src/standard/elements/temperature-sensor.element.ts | Updates revision and adds optional Thermostat UI config requirement. |
| packages/model/src/standard/elements/room-air-conditioner-device.element.ts | Updates revision and adds optional filter-monitoring clusters. |
| packages/model/src/standard/elements/fan.element.ts | Updates revision and simplifies FanControl requirement definition. |
| packages/model/src/standard/elements/heat-pump.element.ts | Restructures device type requirements to match updated energy model requirements. |
| packages/model/src/standard/elements/battery-storage.element.ts | Reworks requirements to support multiple ElectricalSensor/PowerSource instances. |
| packages/model/src/standard/elements/solar-power.element.ts | Adjusts requirements/feature names and conformance per updated energy spec. |
| packages/model/src/standard/elements/energy-evse-device.element.ts | Expands energy management requirements/features and electrical sensor cluster requirements. |
| packages/model/src/standard/elements/energy-evse-cluster.element.ts | Bumps EnergyEvse cluster revision to 4. |
| packages/model/src/standard/elements/pump.element.ts | Reorders Pump device type requirements and keeps server/client measurement clusters. |
| packages/model/src/standard/elements/pump-controller.element.ts | Reorders PumpController requirements. |
| packages/model/src/standard/elements/pressure-sensor.element.ts | Reorders requirements. |
| packages/model/src/standard/elements/flow-sensor.element.ts | Reorders requirements. |
| packages/model/src/standard/elements/on-off-sensor.element.ts | Reorders requirements. |
| packages/model/src/standard/elements/control-bridge.element.ts | Reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/dimmer-switch.element.ts | Sets base type and reorders optional ScenesManagement requirement. |
| packages/model/src/standard/elements/color-dimmer-switch.element.ts | Sets base type and reorders optional ScenesManagement requirement. |
| packages/model/src/standard/elements/dimmable-light.element.ts | Sets base type and reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/dimmable-plug-in-unit.element.ts | Reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/on-off-light.element.ts | Reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/on-off-plug-in-unit.element.ts | Reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/color-temperature-light.element.ts | Sets base type and reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/extended-color-light.element.ts | Sets base type and reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/mounted-on-off-control.element.ts | Sets base type and reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/mounted-dimmable-load-control.element.ts | Sets base type and reorders ScenesManagement requirement. |
| packages/model/src/standard/elements/cook-surface.element.ts | Reorders OnOff requirement placement. |
| packages/model/src/standard/elements/ota-requestor.element.ts | Reorders requestor/provider requirements. |
| packages/model/src/standard/elements/ota-provider.element.ts | Reorders provider/requestor requirements. |
| packages/model/src/standard/elements/electrical-sensor.element.ts | Reorders requirements (PowerTopology last). |
| packages/model/src/standard/elements/laundry-washer.element.ts | Reorders LaundryWasherMode/OnOff requirements. |
| packages/model/src/standard/elements/laundry-dryer.element.ts | Reorders StartUpMode/ONOFF sub-requirements. |
| packages/model/src/standard/elements/refrigerator-device.element.ts | Adds Cooler condition requirement and reorders mode sub-requirements. |
| packages/model/src/standard/elements/oven.element.ts | Adds Heater condition requirement. |
| packages/model/src/standard/elements/air-quality-sensor.element.ts | Reorders PM2.5 and Radon requirements. |
| packages/model/src/standard/elements/air-purifier.element.ts | Adds optional AirQualitySensor device type requirement and reorders entries. |
| packages/main/src/forwards/devices/*.ts | Adds new generated forwards for new/updated device types (camera, meters, closure, etc.). |
| packages/main/src/forwards/behaviors/*.ts | Adds new generated forwards for new behaviors (tls, camera, tariff, closure, etc.). |
| examples/device-robotic-vacuum-cleaner/src/RoboticVacuumCleanerDevice.ts | Updates semantic tag import usage to Common* namespace tags. |
| CHANGELOG.md | Notes Matter 1.5 upgrade and breaking namespace/Zigbee-only removals. |
| .prettierignore | Ignores generated behaviors index entrypoint. |
packages/model/src/logic/definition-validation/ValueValidator.ts
Outdated
Show resolved
Hide resolved
Closed
Instead of duplicating types from common spec sections (e.g. WebRTC Transport §11.4) into each consuming cluster via overrides, emit them as abstract clusters (no ID) so shared datatypes have a single home. Remove WebRtcTransportProvider/Requestor override files that previously duplicated ICECandidateStruct, WebRTCSessionStruct, ICEServerStruct, WebRTCEndReasonEnum, and WebRTCSessionID into each cluster. Sections that have a cluster ID table but fail to parse IDs (e.g. OccupancySensing) are still skipped — they need full overrides. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reset 36 files that were inadvertently overwritten with older versions from the spec15gen branch merge. These files belong to PR #3471 (Conformance validation upgrades) and other main-only changes that should not have been part of this branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 1.5 spec uses "clusterid"/"clustername" column headers in the cluster ID table instead of "id"/"name". Add these as column aliases in translateIds() so OccupancySensing (and any future clusters using this format) parse correctly. Remove the OccupancySensingOverrides file that was only needed because the parser couldn't handle the table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5.1 tightened constraints on SubjectsPerAccessControlEntry, TargetsPerAccessControlEntry and AccessControlEntriesPerFabric from "min N" to "N to 65534". Set defaults in initialize() to prevent constraint validation failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5.1 made MinLevel and MaxLevel mandatory at cluster revision 7 with Fixed quality. Set defaults in initialize() when not configured: minLevel defaults to 1 (lighting) or 0 (non-lighting), maxLevel to 254. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5.1 removed legacy non-USR commands (SetPINCode, GetPINCode, ClearPINCode, ClearAllPINCodes, SetRFIDCode, GetRFIDCode, ClearRFIDCode, ClearAllRFIDCodes, SetUserStatus, GetUserStatus, SetUserType, GetUserType) and all associated helper methods. Also removes supervision wiring for the removed clearPinCode/clearRfidCode methods. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5 requires returning RESOURCE_EXHAUSTED when LabelList exceeds the supported length. Default max is 255, configurable via State.maxLabels. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5.1 removed this status code from the Secure Channel General Status Codes table. It was defined but never used in the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add missing pairing hint bits: - Bit 20: Press and release setup button N times (1.5.0) - Bit 21: Press button for N seconds with indication (1.5.1) - Bit 22: Power cycle until indication (1.5.1) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5 recommends (SHOULD) invoking RevokeCommissioning before and after RemoveFabric for security. Checks window status before calling to avoid WindowNotOpenError. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5.1 restructured RevokeCommissioning Effect on Receipt: Step 1 (PASE session termination, fail-safe expiry) now runs regardless of window state. Window check moved to Step 2 after cleanup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec 1.5: "WildcardPathFlags SHALL ONLY be used for either Read or Subscribe interactions." Rejects with InvalidAction when present in write requests. CommandPath doesn't carry this field so invoke is unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When DirectModeChange feature is enabled, skip the Idle-first requirement and allow direct transitions between non-idle run modes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ColorControl ColorCapabilities bitmap: until 1.4.2 (spec 1.5 adds ColorCapabilitiesBitmap type) - DoorLock GetYearDayScheduleResponse field IDs: until 1.4.2 (spec 1.5 has correct IDs) - Regen picks up BasicInformation productAppearance move to optional (Rev >= v2 conformance in 1.5.1) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add MatterSpecification namespaces for v1.5 and v1.5.1 in Specifications.d.ts. Update codegen to emit v151 spec references. Full regeneration of all cluster, endpoint and forward files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment out RevokeCommissioning ordering change (Step 1 before window check) and RevokeCommissioning around RemoveFabric — as of 1.5.1 release, certification tests are not yet adjusted for these behaviors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment out RevokeCommissioning around RemoveFabric — as of 1.5.1 release, certification tests are not yet adjusted for this. Keep the RevokeCommissioning ordering fix (Step 1 cleanup before window check) but use graceful initiateClose() instead of initiateForceClose(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove server-side RevokeCommissioning around RemoveFabric — this is a controller-side concern per spec 1.5 (administrator calling RevokeCommissioning before/after removing another fabric over CASE). Keep RevokeCommissioning ordering fix (Step 1 cleanup before window check) using graceful initiateClose(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
lauckhart
approved these changes
Apr 3, 2026
| * data is encrypted at rest with AES-128-CCM by default. Override {@link cipher} for custom encryption (e.g. HSM) or | ||
| * {@link auth} to replace the entire storage backend. | ||
| */ | ||
| export class NonUserDoorLockServer extends NonUserBase { |
Collaborator
There was a problem hiding this comment.
Does it still make sense to have user/non-user versions of the behavior? The reason we had them was because there were a bunch of methods that were disabled if !USR. If they've been removed then this should just becomena single server implementation like other servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Spec 1.5.0 parser and model
[object Object]rendering in validation error messages.prettierignoreSpec 1.5.1 upgrade
Rev >= vNrevision conformance support (parser, AST, compiler, variance)L(Large Message) quality supportRuntime 1.5.1 compliance
Override cleanup
until: "1.4.2"(spec 1.5 adds ColorCapabilitiesBitmap)until: "1.4.2"(spec 1.5 has correct IDs)Replaces #3445 — rebased on current main.
Breaking changes
supportedFabricsdefault changed from 254 to 5 (spec minimum). Set explicitly in ServerNode config if you need more.🤖 Generated with Claude Code