Commit 893d6ba
feat(node): add Endpoint.get()/getStateOf(), nodeType discriminant, Read.AttributePaths (#3681)
* feat(node): add Endpoint.get()/getStateOf(), nodeType discriminant, Read.AttributePaths
- Endpoint.get()/getStateOf() issue batched reads on client nodes and
return local state snapshots on server nodes
- nodeType: "server" | "client" | "group" replaces isGroup/isLocalNode
boolean properties on Node
- ClientGroup.get()/getStateOf() throw InvalidGroupOperationError
- Read.AttributePaths replaces Read.Plan as dedup accumulator for batched reads
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(node): address PR review — stream merge, circular dep, includeKnownVersions
- Move InvalidGroupOperationError to endpoint/errors.ts to break CJS
circular init (Endpoint → ClientGroupInteraction → ClientNodeInteraction
→ EndpointInitializer)
- Group guard in Endpoint#performRead now throws InvalidGroupOperationError
- Client reads collect attr-value stream reports and merge over state-view
base (handles version-filter empty responses correctly)
- GetOptions gains includeKnownVersions to skip version filter injection
- ClientNodeInteraction.read skips version filter injection when request
fabric-filter doesn't match subscription fabric-filter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(node): address second Copilot review — ClusterModel guard, chai import, visibility
- Guard schema access with instanceof ClusterModel before iterating
schema.attributes (non-cluster behaviors have no attributes array)
- Make ClientStructure.subscribedFabricFiltered public so
ClientNodeInteraction can compare fabric-filter settings
- Remove explicit chai import from ReadAttributePathsTest (use global expect)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(node): address third Copilot review — isFabricFiltered, allowedNames, attrNameToId
- Normalize isFabricFiltered ?? true before comparing to subscribedFabricFiltered
so callers that omit the field still get version filter injection
- Fix allowedNames guard: check !== undefined instead of ?.size so an empty
Set correctly rejects all attribute names
- Precompute attrNameToId map alongside attrs in clusterLookup to replace
O(n) schema.attributes.find() with O(1) map lookup
- Format fix on includeKnownVersions ternary
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* upgrade js-tools
* fix(node): use public elementsOf API and update read JSDoc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* upgrade js-tools
* fix(node): filter failed paths from partial and tighten return types
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* formatting
* chore(node): add TODO for StateSelector type tightening
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 9577473 commit 893d6ba
26 files changed
Lines changed: 1110 additions & 427 deletions
File tree
- packages
- cli-tool
- create
- node
- src
- behavior/system
- network
- software-update
- endpoint
- properties
- node
- client
- test
- endpoint
- node
- protocol
- src/action/request
- test/action/request
- testing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
0 commit comments