pi-revit 0.4.0 → 0.5.0

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 (119) hide show
  1. package/AGENTS.md +167 -0
  2. package/CHANGELOG.md +465 -430
  3. package/README.md +604 -548
  4. package/bin/pi-revit.js +9 -9
  5. package/docs/architecture.md +271 -0
  6. package/docs/evaluation.md +434 -0
  7. package/docs/invariants.json +147 -0
  8. package/extensions/pi-revit/completion-monitor.ts +55 -0
  9. package/extensions/pi-revit/contracts.ts +146 -0
  10. package/extensions/pi-revit/discovery.ts +93 -0
  11. package/extensions/pi-revit/index.ts +342 -255
  12. package/extensions/pi-revit/instance-router.ts +86 -86
  13. package/extensions/pi-revit/platform-prompt.ts +40 -0
  14. package/extensions/pi-revit/scope-monitor.ts +114 -0
  15. package/extensions/pi-revit/script-library.ts +144 -144
  16. package/extensions/pi-revit/tool-catalog.ts +113 -14
  17. package/extensions/pi-revit/tool-documentation.ts +72 -0
  18. package/extensions/pi-revit/tool-schema.ts +8 -0
  19. package/package.json +8 -2
  20. package/scripts/build.ps1 +9 -9
  21. package/scripts/check-sdk.ps1 +66 -66
  22. package/scripts/check-tool-documentation.mjs +287 -0
  23. package/scripts/deploy.ps1 +16 -16
  24. package/scripts/generate-contracts.mjs +80 -0
  25. package/scripts/lib/platform.mjs +226 -0
  26. package/scripts/test-extension.mjs +15 -0
  27. package/skills/pi-revit/SKILL.md +30 -218
  28. package/skills/pi-revit/contracts.generated.json +3524 -0
  29. package/skills/pi-revit/references/execution-rules.md +41 -0
  30. package/skills/pi-revit/references/model-audit-export.md +38 -27
  31. package/skills/pi-revit/references/operation-recovery.md +33 -0
  32. package/skills/pi-revit/references/room-documentation.md +37 -26
  33. package/skills/pi-revit/references/tool-index.md +89 -0
  34. package/skills/pi-revit/references/tools/capture_view.md +62 -0
  35. package/skills/pi-revit/references/tools/change_element_types.md +65 -0
  36. package/skills/pi-revit/references/tools/create_tags.md +85 -0
  37. package/skills/pi-revit/references/tools/delete_elements.md +66 -0
  38. package/skills/pi-revit/references/tools/execute_csharp.md +81 -0
  39. package/skills/pi-revit/references/tools/export_documents.md +75 -0
  40. package/skills/pi-revit/references/tools/find_revit_tools.md +96 -0
  41. package/skills/pi-revit/references/tools/get_element_details.md +66 -0
  42. package/skills/pi-revit/references/tools/get_element_relationships.md +61 -0
  43. package/skills/pi-revit/references/tools/get_element_types.md +67 -0
  44. package/skills/pi-revit/references/tools/get_elements.md +87 -0
  45. package/skills/pi-revit/references/tools/get_linked_elements.md +79 -0
  46. package/skills/pi-revit/references/tools/get_linked_models.md +57 -0
  47. package/skills/pi-revit/references/tools/get_model_coordinates.md +64 -0
  48. package/skills/pi-revit/references/tools/get_model_health.md +53 -0
  49. package/skills/pi-revit/references/tools/get_model_overview.md +57 -0
  50. package/skills/pi-revit/references/tools/get_revit_operation.md +54 -0
  51. package/skills/pi-revit/references/tools/get_schedule_fields.md +62 -0
  52. package/skills/pi-revit/references/tools/get_schedules.md +71 -0
  53. package/skills/pi-revit/references/tools/manage_element_sets.md +92 -0
  54. package/skills/pi-revit/references/tools/manage_revit_instances.md +63 -0
  55. package/skills/pi-revit/references/tools/manage_revit_scripts.md +109 -0
  56. package/skills/pi-revit/references/tools/manage_schedules.md +90 -0
  57. package/skills/pi-revit/references/tools/manage_selection.md +66 -0
  58. package/skills/pi-revit/references/tools/manage_sheet_placements.md +82 -0
  59. package/skills/pi-revit/references/tools/manage_sheets.md +71 -0
  60. package/skills/pi-revit/references/tools/manage_views.md +95 -0
  61. package/skills/pi-revit/references/tools/measure_geometry.md +71 -0
  62. package/skills/pi-revit/references/tools/open_view.md +59 -0
  63. package/skills/pi-revit/references/tools/ping.md +41 -0
  64. package/skills/pi-revit/references/tools/query_spatial_elements.md +74 -0
  65. package/skills/pi-revit/references/tools/read_revit_result.md +53 -0
  66. package/skills/pi-revit/references/tools/search_api_docs.md +65 -0
  67. package/skills/pi-revit/references/tools/set_parameters.md +75 -0
  68. package/skills/pi-revit/references/tools/summarize_elements.md +64 -0
  69. package/skills/pi-revit/references/tools/transform_elements.md +79 -0
  70. package/skills/pi-revit/references/visual-verification.md +36 -0
  71. package/skills/pi-revit/tool-manifest.json +338 -0
  72. package/src/Revit/BridgeServer.cs +93 -87
  73. package/src/Revit/OperationStore.cs +178 -178
  74. package/src/Revit/ToolRegistry.cs +88 -57
  75. package/src/Revit/Tools/CaptureView.cs +10 -2
  76. package/src/Revit/Tools/ChangeElementTypes.cs +74 -60
  77. package/src/Revit/Tools/ChangeSet.cs +39 -0
  78. package/src/Revit/Tools/CreateTags.cs +107 -95
  79. package/src/Revit/Tools/DeleteElements.cs +53 -44
  80. package/src/Revit/Tools/DocumentGuard.cs +74 -64
  81. package/src/Revit/Tools/ElementNames.cs +103 -0
  82. package/src/Revit/Tools/ElementQueryScope.cs +27 -27
  83. package/src/Revit/Tools/ElementTraits.cs +53 -0
  84. package/src/Revit/Tools/ExecuteCsharp.cs +54 -45
  85. package/src/Revit/Tools/ExportDocuments.cs +129 -121
  86. package/src/Revit/Tools/GetElementDetails.cs +37 -41
  87. package/src/Revit/Tools/GetElementRelationships.cs +82 -76
  88. package/src/Revit/Tools/GetElementTypes.cs +8 -0
  89. package/src/Revit/Tools/GetElements.cs +75 -86
  90. package/src/Revit/Tools/GetLinkedElements.cs +89 -82
  91. package/src/Revit/Tools/GetLinkedModels.cs +73 -66
  92. package/src/Revit/Tools/GetModelCoordinates.cs +56 -49
  93. package/src/Revit/Tools/GetModelHealth.cs +7 -0
  94. package/src/Revit/Tools/GetModelOverview.cs +185 -158
  95. package/src/Revit/Tools/GetScheduleFields.cs +44 -37
  96. package/src/Revit/Tools/GetSchedules.cs +96 -89
  97. package/src/Revit/Tools/InheritedState.Summary.cs +57 -0
  98. package/src/Revit/Tools/InheritedState.cs +144 -0
  99. package/src/Revit/Tools/ManageElementSets.cs +114 -106
  100. package/src/Revit/Tools/ManageSchedules.cs +174 -164
  101. package/src/Revit/Tools/ManageSelection.cs +45 -37
  102. package/src/Revit/Tools/ManageSheetPlacements.cs +113 -97
  103. package/src/Revit/Tools/ManageSheets.cs +72 -63
  104. package/src/Revit/Tools/ManageViews.cs +115 -100
  105. package/src/Revit/Tools/MeasureGeometry.cs +60 -54
  106. package/src/Revit/Tools/ModelChanges.cs +154 -0
  107. package/src/Revit/Tools/ModelEditBatch.cs +105 -102
  108. package/src/Revit/Tools/ModelEditInputs.cs +49 -49
  109. package/src/Revit/Tools/OpenView.cs +9 -2
  110. package/src/Revit/Tools/ParameterResolver.cs +94 -0
  111. package/src/Revit/Tools/QuerySpatialElements.cs +70 -63
  112. package/src/Revit/Tools/SearchApiDocs.cs +72 -4
  113. package/src/Revit/Tools/SetParameters.cs +60 -79
  114. package/src/Revit/Tools/SpatialBounds.cs +30 -30
  115. package/src/Revit/Tools/SummarizeElements.cs +94 -87
  116. package/src/Revit/Tools/ToolContract.cs +48 -0
  117. package/src/Revit/Tools/ToolSupport.cs +5 -1
  118. package/src/Revit/Tools/TransformElements.cs +72 -57
  119. package/workspace/AGENTS.md +26 -20
package/CHANGELOG.md CHANGED
@@ -1,430 +1,465 @@
1
- # Changelog
2
-
3
- All notable changes to pi-revit are documented here.
4
- Format follows [Keep a Changelog](https://keepachangelog.com/); version headers use
5
- `## [x.y.z] - YYYY-MM-DD` so tooling (and Pi's changelog parser format) can read them.
6
-
7
- Every published version gets an entry with **Added** / **Changed** / **Fixed** sections
8
- describing what the user will notice — not internal refactors.
9
-
10
- ## [0.4.0] - 2026-09-22
11
-
12
- ### Added
13
-
14
- - Linked-model discovery and filtered linked-element queries with exact linked document identities and host-coordinate bounds.
15
- - Schedule inspection with independent row and column pagination, and element relationship inspection.
16
- - `find_revit_tools` searches and activates specialist tools within the current Pi session while preserving other extensions' active tools.
17
- - `get_elements` can include up to 20 requested parameter identities per element, with optional type parameters and explicit missing or ambiguous matches. Raw values and formatted display values are returned separately.
18
- - `summarize_elements` counts the whole query scope by category, type, level, or exact raw parameter value, with independently paginated groups and a 10,000-element limit.
19
- - `manage_element_sets` retains query membership for repeat reads of current values and reports missing members. Sets are limited to 10,000 members and 32 retained sets, expire after 30 minutes, and belong to the exact open document and bridge session.
20
- - `get_revit_operation` reads operation receipts without waiting for Revit's model thread. Supporting bridges automatically track native tool calls; retrying with the same `_operation_id` and identical arguments does not repeat the action. Full results are bounded to 128 completed receipts / 32 MiB, while up to 10,000 receipt records keep IDs reserved for that bridge session. Restarting the bridge clears receipts; an unknown outcome must be checked against the original model.
21
- - `transform_elements` moves, copies, or rotates up to 200 selected elements together, with explicit input units, document-internal coordinates, and preview rollback. IDs created during previews are temporary.
22
- - `delete_elements` previews or performs a whole-selection deletion and returns Revit's deletion set, including dependents. An optional `expected_deleted_ids` check rejects changed deletion membership; cascades above 10,000 IDs roll back.
23
- - `change_element_types` validates up to 200 target/type pairs with per-target outcomes, optional atomic rollback, and previews. Results identify replacement elements; replacement IDs from rolled-back operations must not be reused.
24
- - `manage_revit_instances` lists reachable local bridge sessions and selects a target for the current Pi session. Each current bridge has its own discovery file; legacy discovery and opaque selectors remain supported. The first sole instance binds automatically, while multiple instances require explicit selection. Selection refreshes the tool catalogue; read a fresh model overview afterward.
25
- - `manage_views` creates plans, isometric 3D views, and sections, or duplicates and updates views, with compatible templates, scale checks, and previews. Sections use explicit units and document-internal coordinates.
26
- - `manage_sheets` creates, renames, or renumbers sheets, with an optional loaded titleblock at creation and preview rollback.
27
- - `manage_sheet_placements` lists, places, and moves viewports or schedule instances using paper-space coordinates. Viewport positions exclude labels; schedule positions are insertion points. Edits support previews with temporary created IDs, and every action, including listing, requires an exact document identity.
28
- - `get_schedule_fields` discovers eligible parameter/type pairs for regular schedules. `manage_schedules` creates or configures schedules with field headings, visibility, widths, itemization, sorting, and typed filters, including explicit units for measured numeric filters and preview rollback.
29
- - `create_tags` creates host element, room, space, or area tags with explicit tag-head positions, loaded tag types, partial or atomic batches, and preview rollback. Proposed tag IDs are temporary.
30
- - `query_spatial_elements` finds host elements by axis-aligned bounding-box intersection or containment in an explicitly sized region, with whole-scope candidate limits, paging, and missing-box counts.
31
- - `measure_geometry` measures exact distance between supplied points or approximate separation between host-element bounding boxes, with explicit units and an optional box-proximity threshold. Box overlap and threshold hits are not confirmed clashes or clearance failures.
32
- - Pi skill references provide room-documentation and model-audit/export workflows using native tools, previews, exact identities, and recorded output paths.
33
- - `manage_revit_scripts` saves immutable local script definitions without executing them, reads source, and runs an exact content-hash version with required named inputs. Local history records the version, document, input hash, and operation receipt without retaining raw inputs or results. Runs use the existing unrestricted script execution contract; no automatic runs or model saving are added.
34
- - `get_model_coordinates` reads project/survey base points, site/project locations, and the active shared-coordinate mapping for explicit internal points. Length units are required; no GIS reference system is inferred or coordinates changed.
35
-
36
- ### Changed
37
-
38
- - `set_parameters` supports `preview` and `atomic` batches, with a subtransaction for each update and observed per-step before/after values. Committed updates appear in `succeeded`; accepted steps that were rolled back appear in `proposed`. Preview attempts commit validation before rolling back its transaction group when the batch is eligible; `commit_validation_performed` reports whether those checks ran. Default batches still commit partial successes.
39
- - A bound Revit session is no longer replaced implicitly after closing or restarting: list and select its new identity before further model calls. Operation receipt reads and identical retries continue to target their original bridge even when another instance is selected; unavailable originals are never redirected.
40
- - `get_schedules` now includes field specifications, grid/sheet widths in feet, filtering capabilities, and current sort/filter rules. Numeric filter values are reported in Revit internal units.
41
- - `execute_csharp` accepts structured JSON `inputs` as a separate `JsonElement` global, keeping input values separate from source code.
42
-
43
- ### Fixed
44
-
45
- - `manage_schedules` accepts the Count parameter/type pair returned by `get_schedule_fields`, while preserving Count creation without a parameter ID. Discovery and editing descriptions now document both supported forms.
46
-
47
- ## [0.3.1] - 2026-09-16
48
-
49
- ### Fixed
50
-
51
- - The installer checks the selected .NET SDK before installing packages or building the add-in. Missing or older SDKs now produce a clear explanation, the matching Windows x64 SDK download link, and retry instructions. Interactive installs offer to open the download page. Manual builds and deployments also check the SDK before compiling.
52
-
53
- ## [0.3.0] - 2026-09-09
54
-
55
- ### Added
56
-
57
- - `read_revit_result` retrieves complete large tool results in bounded fragments.
58
- Result IDs belong to the current Pi extension session; saved files remain
59
- readable by path while available.
60
-
61
- ### Changed
62
-
63
- - **Breaking:** writes and UI mutations require `expected_document_id` from
64
- `get_model_overview`'s `project.documentId`. Refresh it after close/reopen or
65
- bridge restart. A legacy title alone is insufficient; supplied IDs on reads
66
- are also checked.
67
- - Default export folders include a model-identity hash, separating same-title
68
- models. Existing folders remain untouched; explicit output directories work
69
- as before.
70
-
71
- ### Fixed
72
-
73
- - Requested values and all returned rows reach Pi instead of only UI/debug
74
- details. Large-result retrieval preserves each tool's pagination and limits.
75
- - Scoped display-name filters resolve each element's parameter, including
76
- matches beyond the first 50 elements; explicit built-in/GUID filters stay optimized.
77
- - Type-only parameter requests work independently of instance-parameter inclusion.
78
- - Transaction results distinguish confirmed commit/rollback from incomplete
79
- cleanup. Failure handling follows the transaction lifecycle; UI and export
80
- errors disclose effects or files already produced.
81
-
82
- Update both the Pi package and Revit add-in with Revit closed, then restart Revit
83
- and start a fresh Pi session. Live verification covered bounded workflows on
84
- Revit 2025.4.3; Revit 2026/2027 were not tested for this release.
85
-
86
- ## [0.2.18] - 2026-08-21
87
-
88
- ### Fixed
89
- - When pi starts before Revit and the background rediscovery timer (rather than a `ping`
90
- call) registers the bridge tools, the session is now told — the same announcement the
91
- ping path has always given. Previously the tools appeared silently in the next system
92
- prompt while nothing contradicted the session's earlier "Revit is not running", so the
93
- agent could stay needlessly pessimistic. The note is queued for the next user prompt
94
- and never interrupts. Extension-only change; the Revit add-in is unchanged (the
95
- standard installer keeps both versions aligned).
96
-
97
- ## [0.2.17] - 2026-08-21
98
-
99
- ### Fixed
100
- - The bridge's no-document check no longer counts linked documents. With only links
101
- loaded, Revit does not pump the bridge's work queue, so a call could wait out its full
102
- timeout instead of failing immediately with the clean "no active document" answer.
103
-
104
- ### Changed
105
- - Docs and tool descriptions describe localized parameter names generically instead of
106
- quoting specific languages.
107
- - The full search_api_docs benchmark (641 live queries against RevitAPI.xml ground truth)
108
- was re-run on Revit 2025 at 0.2.16: 100% recall, 98.75% top-1 on exact names, 100%
109
- spacing-variant agreement, 0 false positives across 99 adversarial mutations, 50/50
110
- parameter docs, p50 10 ms -- no regression across the 0.2.13-0.2.16 search changes.
111
-
112
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
113
- restart Revit).
114
-
115
- ## [0.2.16] - 2026-08-21
116
-
117
- ### Fixed
118
- - `search_api_docs`: an accessor-spelling query combined with `kind: "method"` — e.g.
119
- `Element.get_Parameter(BuiltInParameter)` filtered to methods — returned "no matches",
120
- because the accessor rewrite found the documented member but the kind filter rejected it:
121
- a C# `get_X`/`set_X` accessor is a method to the caller, while the XML documents the
122
- underlying member as a property or indexer. For accessor-rewritten candidates the
123
- `method` filter now also admits properties, and the result note says so. Found by an
124
- agent under a stress test that filtered its doc query to methods. Two benchmark probes
125
- added (the widening plus a real-method control).
126
-
127
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
128
- restart Revit).
129
-
130
- ## [0.2.15] - 2026-08-21
131
-
132
- ### Fixed
133
- - `set_parameters`: the "parameter not found" error now mentions that display names are
134
- localized and points to the language-independent BuiltInParameter enum name — the same
135
- guidance `get_element_details` and `get_elements` already give. Previously it only
136
- suggested the type-parameter cause, which sent the caller down the wrong path in
137
- non-English UIs.
138
- - `get_elements`: the "filter parameter not found on any probed element" warning now
139
- appears only when the query returned zero matches — that is where it distinguishes
140
- "unknown parameter name" from "no matching elements". Next to real matches it was noise
141
- (an unscoped query's probe window can simply miss the elements that carry the parameter).
142
-
143
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
144
- restart Revit).
145
-
146
- ## [0.2.14] - 2026-08-21
147
-
148
- ### Fixed
149
- - `get_elements`: text filter rules now compare case-insensitively on the post-scan path,
150
- matching Revit's own collector rules (which ignore case -- verified empirically). The
151
- same string rule previously matched case-insensitively when it ran inside the collector
152
- but case-sensitively when it fell back to the per-element scan, so merely scoping a
153
- query could change its results.
154
- - `search_api_docs`: queries in C# accessor spelling -- `Element.get_Parameter(BuiltInParameter)`,
155
- `get_BoundingBox(View` -- now resolve to the documented property or indexer
156
- (`Element.Parameter`, `Element.BoundingBox`), with a note explaining the rewrite. Members
157
- documented with a literal `get_`/`set_` prefix still match directly; the rewrite is only
158
- a fallback. Three benchmark probes added.
159
-
160
- Also investigated and cleared, no change needed: `Element.BoundingBox` and
161
- `LocationCurve.Curve` document null returns -- not exceptions -- for elements without
162
- geometry, so the suspected one-bad-element batch failure in `get_element_details` does
163
- not exist per the API contract.
164
-
165
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
166
- restart Revit).
167
-
168
- ## [0.2.13] - 2026-08-21
169
-
170
- ### Fixed
171
- - `get_elements`: a display-name filter rule that matches no parameter on any probed
172
- in-scope element now carries an explicit WARNING in the result (content text and a
173
- `warnings` payload field) instead of silently reporting 0 matches. The typical trap:
174
- querying an English display name against a non-English UI, where the same parameter
175
- carries a translated name -- the query looked valid and the honest answer was "unknown
176
- parameter", not "0 matches". The warning points to the language-independent
177
- BuiltInParameter enum name as the fix.
178
- - `get_elements`: a filter value that does not fit the parameter's storage type now fails
179
- the same way regardless of scoping. Previously the identical query reported a clear error
180
- when `category`/`of_class` was set (the rule ran inside Revit's collector) but silently
181
- returned zero matches when it was not (the rule fell back to the per-element scan).
182
- - `execute_csharp`: a script that ran successfully but returned a value the result
183
- serializer could not walk — a lazy sequence over a deleted element, a property that
184
- throws — was rolled back and reported as "C# script threw". The script's changes now
185
- commit, `returnValue` explains what happened, and `returnValueError` carries the detail.
186
- - `capture_view`: every snapshot stayed on disk forever (measured on one machine: 138
187
- files, 28 MB, going back 15 months). Captures now go to `%LOCALAPPDATA%\pi-revit\captures`
188
- and each capture sweeps the ones older than 24 hours. The folder had to become a fixed
189
- one: `Path.GetTempPath()` can return a fresh per-session directory, so files left by
190
- earlier sessions were unreachable from the current one. The file just produced is
191
- untouched, so the read tool still finds it.
192
- - `export_documents`: the produced-file list compared pre-existing files against a wall
193
- clock window, so an untouched file that merely happened to be recent was reported as
194
- exported. Each file is now compared against its own pre-export timestamp.
195
- - The bridge reclaims `bridge.json` when its owner goes away. With two Revits open the
196
- newer one still owns the file, but closing it no longer leaves the older, still-running
197
- bridge undiscoverable — and a stale entry left by a crashed Revit is replaced within 30s
198
- instead of failing every call with "could not reach the Revit bridge".
199
-
200
- ### Changed
201
- - `scripts/deploy.ps1` replaces the add-in folder instead of copying over it, so files from
202
- a previous release cannot linger next to the new ones. It reports clearly if Revit is
203
- still running and holding the folder.
204
- - Docs: `open_view` was missing from the README tool table; the 0.2.10-0.2.12 changelog
205
- entries were dated a day after their actual release.
206
-
207
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
208
- restart Revit).
209
-
210
- ## [0.2.12] - 2026-07-21
211
-
212
- ### Added
213
- - New tool `open_view`: activates a view or sheet in the Revit UI — the equivalent of
214
- double-clicking it in the Project Browser. Identify the target by `view_id` or by
215
- `name` (view name, sheet number like "A-101", or "number - name"). Uses Revit's
216
- queued `RequestViewChange`, which is explicitly legal from the bridge's ExternalEvent
217
- context; the activation completes the instant the call returns. Ends the
218
- "please double-click the sheet yourself" gap after sheet/view creation.
219
-
220
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
221
- restart Revit).
222
-
223
- ## [0.2.11] - 2026-07-21
224
-
225
- ### Fixed
226
- - `search_api_docs`: signature queries now accept .NET type names and qualified names —
227
- `Wall.Create(Document, Curve, ElementId, Boolean` and `...(System.String` match the
228
- rendered `bool` / `string`, and `(Autodesk.Revit.DB.Document` matches `Document`.
229
- Parameter types in the query are reduced exactly the way the index renders them
230
- (namespace stripped, CLR name → C# keyword, case-insensitive).
231
- - `search_api_docs`: Creation-factory calls resolve — `Document.Create.NewRoom(Level, UV`
232
- finds `Document.NewRoom`, and `Document.Create.NewFamilyInstance` finds the
233
- `ItemFactoryBase` overloads (factory members documented on a base class). A note in the
234
- result explains the rewrite. Applies only to the literal `Document.Create.` /
235
- `Application.Create.` prefixes; ordinary members like `Wall.Create` are untouched, and
236
- nonsense like `Document.Create.Banana` still honestly returns nothing.
237
-
238
- Both were observed live: pi stumbled on these five times across two modeling sessions.
239
- The benchmark gained six regression probes for them.
240
-
241
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
242
- restart Revit).
243
-
244
- ## [0.2.10] - 2026-07-21
245
-
246
- ### Fixed
247
- - `search_api_docs`: constructor overloads can now be targeted with the natural C#
248
- spelling — `FilteredElementCollector(Document` matches even though constructors are
249
- rendered as `new FilteredElementCollector(Document)`. Previously only the `new `-prefixed
250
- form matched (the same typography-cliff family as the 0.2.8 comma-spacing fix).
251
-
252
- ### Added
253
- - `scripts/benchmark-search-docs.py`: a reproducible ~630-query benchmark of
254
- `search_api_docs` scored against Autodesk's own RevitAPI.xml — exact-name recall,
255
- signature/spacing variants, hard syntax, namespace ambiguity, adversarial honesty
256
- controls, documentation fidelity, and latency percentiles. Run it against any Revit
257
- version with the bridge loaded. Measured on Revit 2025 at 0.2.9: 100% recall / 98.8%
258
- top-1 on exact names, 100% spacing-variant agreement, 0 false positives across 99
259
- adversarial mutations, 50/50 correct parameter docs, p50 8 ms.
260
-
261
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
262
- restart Revit).
263
-
264
- ## [0.2.9] - 2026-07-21
265
-
266
- ### Added
267
- - Self-healing tool discovery: when pi starts before Revit, the extension now keeps
268
- retrying tool discovery in the background (every 15s) and also re-discovers on a
269
- successful `ping` — no more sessions stuck with only `ping` registered until a fresh
270
- pi start. When tools arrive mid-session, `ping`'s result says so.
271
- - `set_parameters` and `execute_csharp` accept an optional `expected_document` (the model
272
- title): if the active document differs — e.g. the user switched models mid-session —
273
- the write fails cleanly instead of landing in the wrong model.
274
- - `get_element_details.parameter_names` now also matches language-independent
275
- BuiltInParameter enum names (e.g. `ALL_MODEL_MARK`), so filtering works in non-English
276
- Revit UIs where display names are localized.
277
-
278
- ### Fixed
279
- - `get_element_details` no longer reports a misleading "0 params" when a
280
- `parameter_names` filter simply matched nothing — it now reports "N of M params
281
- matched parameter_names" so localization misses are visible. (This explains the
282
- earlier "0 params vs 38 params" reports: different filter arguments, not flaky reads.)
283
- - `get_elements`: a display-name filter rule in an **unscoped** query (no category /
284
- of_class) is no longer promoted to a pinned collector filter based on a 50-element
285
- probe — it stays on the per-element post-scan path, so categories beyond the probe
286
- window can't be silently dropped when the same parameter name maps to different ids.
287
-
288
- ### Changed
289
- - SKILL.md: guidance on localized parameter names (prefer BuiltInParameter enum names)
290
- and on using `expected_document` for long sessions / multiple open models.
291
- - README: new "Safety model" section stating explicitly what the add-in enforces and
292
- that write-confirmation UX is a client-side decision.
293
-
294
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
295
- restart Revit).
296
-
297
- ## [0.2.8] - 2026-07-21
298
-
299
- ### Fixed
300
- - `search_api_docs`: overload-targeted queries no longer fail on comma spacing.
301
- `Wall.Create(Document,Curve` (no space) and `Wall.Create( Document, Curve` now match the
302
- same overloads as `Wall.Create(Document, Curve` — the query's spacing around commas and
303
- parentheses is normalized to the rendered signature style before matching.
304
-
305
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then restart
306
- Revit).
307
-
308
- ## [0.2.7] - 2026-07-21
309
-
310
- ### Added
311
- - Update announcements: after a pi-revit update, the next pi session shows a one-time
312
- "What's new in pi-revit" note listing the changelog entries for every version since the
313
- last one announced — the same mechanism pi uses for its own updates. The last-announced
314
- version is remembered in `%APPDATA%\pi-revit\state.json` (kept outside the package
315
- folder so npm updates can't erase it). Fresh installs stay silent.
316
-
317
- Extension-only change: no Revit add-in redeploy or Revit restart needed.
318
-
319
- ## [0.2.6] - 2026-07-20
320
-
321
- ### Fixed
322
- - Write transactions (`set_parameters`, `execute_csharp`, and the temporary-isolate
323
- branch of `manage_selection`) now register a failures preprocessor. Previously Revit
324
- handled commit failures interactively: warnings popped the transient toast and spammed
325
- the journal, and an error-severity failure showed the modal resolution dialog, blocking
326
- the bridge until a human clicked. Now warnings are auto-dismissed and reported back
327
- (`commitWarnings` in the result, e.g. duplicate Mark values), and errors roll the
328
- transaction back with the actual Revit failure text in the error message.
329
-
330
- ### Changed
331
- - `set_parameters` tool description tells the model to relay `commitWarnings` to the user.
332
-
333
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` + Revit restart).
334
-
335
- ## [0.2.5] - 2026-07-20
336
-
337
- ### Fixed
338
- - `execute_csharp` dialog guard no longer answers every Revit popup with OK. On some
339
- dialogs OK is the destructive choice (e.g. "Delete Element(s)"), so a script could
340
- silently delete dimensions or constraints and still report success. Unrecognized
341
- dialogs are now answered dismissively (Cancel, then Close, then No; OK only as the
342
- last resort so Revit can never hang behind a popup), a small allowlist keeps OK for
343
- dialogs that are safe to confirm, and `suppressedDialogs` now reports which answer
344
- was given (e.g. `TaskDialog_… (answered Cancel)`).
345
-
346
- ### Changed
347
- - The `execute_csharp` tool description tells the model that confirmation prompts may be
348
- cancelled and to check `suppressedDialogs` when a result looks incomplete.
349
-
350
- Requires redeploying the Revit add-in (`scripts\deploy.ps1` + Revit restart) — `ping`
351
- warns on a version mismatch until then.
352
-
353
- ## [0.2.4] - 2026-07-20
354
-
355
- ### Added
356
- - This changelog. It ships inside the npm package and gets a `## [x.y.z]` entry with
357
- **Added / Changed / Fixed** sections for every release, so updates report what actually
358
- changed instead of just a version number.
359
-
360
- ## [0.2.3] - 2026-07-20
361
-
362
- ### Changed
363
- - `search_api_docs`: results with the same short name in different namespaces are now
364
- disambiguated with their full namespace, so `Category` vs internal schedule types
365
- can't be confused.
366
-
367
- ### Fixed
368
- - Removed a hardcoded example from the overload note that could mislead the model into
369
- copying a signature that didn't apply.
370
-
371
- ## [0.2.2] - 2026-07-20
372
-
373
- ### Added
374
- - `search_api_docs`: exception documentation ("Throws:") is now shown for matched members.
375
- - Overload-targeted queries: a query containing `(` matches against rendered signatures.
376
-
377
- ### Changed
378
- - Overloads now rank simplest-first (fewest parameters), so the common form appears on top.
379
-
380
- ## [0.2.1] - 2026-07-16
381
-
382
- ### Added
383
- - Extension/add-in version handshake: `ping` reports both versions and warns when the
384
- npm extension and the installed Revit add-in are out of sync (partial-update detection).
385
-
386
- ## [0.2.0] - 2026-07-15
387
-
388
- ### Changed
389
- - SKILL.md: documents the top-match inline docs behaviour and the automatic
390
- `Models\<title>\exports` output location so the agent uses them without prompting.
391
-
392
- ## [0.1.9] - 2026-07-15
393
-
394
- ### Added
395
- - `search_api_docs` indexes every Revit API enum and surfaces `<remarks>` documentation.
396
-
397
- ### Changed
398
- - The top match's full documentation is placed directly in the tool's text output
399
- (where model attention is strongest) instead of only in the structured payload.
400
-
401
- ## [0.1.8] - 2026-07-13
402
-
403
- ### Added
404
- - Automatic per-model output sorting: exports, captures, and scripts land under
405
- `Models\<model title>\` in the workspace, keyed to the source document.
406
-
407
- ## [0.1.7] - 2026-07-13
408
-
409
- ### Fixed
410
- - npm-install uninstall flow no longer blocks itself on its own installation folder.
411
-
412
- ## [0.1.6] - 2026-07-13
413
-
414
- ### Changed
415
- - The global launcher installs next to the user's permanent pi under npx.
416
-
417
- ## [0.1.5] - 2026-07-13
418
-
419
- ### Fixed
420
- - Uninstall of the npm-installed Pi package.
421
- - Workspace paths containing non-ASCII characters.
422
-
423
- First version published to npm.
424
-
425
- ## [0.1.0] - 2026-06-17
426
-
427
- Initial public release: Revit bridge add-in (Revit 2025/2026/2027) plus Pi extension with
428
- `ping`, `get_model_overview`, `get_elements`, `get_element_details`, `set_parameters`,
429
- `manage_selection`, `capture_view`, `export_documents`, `execute_csharp`, and
430
- `search_api_docs`.
1
+ # Changelog
2
+
3
+ All notable changes to pi-revit are documented here.
4
+ Format follows [Keep a Changelog](https://keepachangelog.com/); version headers use
5
+ `## [x.y.z] - YYYY-MM-DD` so tooling (and Pi's changelog parser format) can read them.
6
+
7
+ Every published version gets an entry with **Added** / **Changed** / **Fixed** sections
8
+ describing what the user will notice — not internal refactors.
9
+
10
+ ## [0.5.0] - 2026-09-29
11
+
12
+ ### Added
13
+
14
+ - Every tool now declares what it does not cover and what to use instead (another tool, specific Revit API members, a user action, or "the Revit API does not offer it" with evidence). `find_revit_tools` shows these limits. When nothing matches, it states the remaining route (API search, then custom code) instead of returning an empty list, so PI-Revit no longer treats "no dedicated tool" as "impossible".
15
+ - One always-present PI-Revit protocol for every tool. It covers checking capability before saying no, doing only what was asked, verifying with the tool's declared method and then stopping and reporting, naming evidence, document identity, and replying in the user's language while searching in English.
16
+ - A completion check. When the same verification is repeated after further edits, PI-Revit asks the agent to compare against the request, stop and report, and offer extras as suggestions.
17
+ - `ping` reports what is actually loaded: extension package, guidance revision, source revision, and whether each tool's manual matches the connected bridge's exact contract.
18
+ - `find_revit_tools` also returns matching workflows, shared guides and skills, including subject skills added to the package later.
19
+ - `manage_sheet_placements` list reports per-kind counts. The titleblock's own revision schedule has its own kind and cannot be moved, so "which sheets have nothing placed?" is answered correctly. Special objects (revision schedules, templates, placeholder sheets, dependent views, group and design-option members, pinned elements) carry `traits` in element listings.
20
+ - Every model-changing call reports `model_changes`: the objects it added, modified and deleted, and for new views their hidden categories and elements. This includes custom C# scripts, so a view duplicated in a script shows what it inherited.
21
+ - Duplicating a view, copying elements and changing types report `inherited_state`: hidden categories and elements, filters, overrides, template and carried values such as Mark or Comments. The agent checks it against the request instead of trusting an image.
22
+ - Objects that existed before a request are protected from silent reuse. A name that another view, schedule, level, grid, type, material or filter already uses (or a sheet number already taken) is rejected with the existing object's ID. When a call changes a pre-existing object the request names, PI-Revit adds a note, and the protocol requires asking the user or reporting it.
23
+ - `search_api_docs` verifies several API members in one call (names separated by `;`). Each API limit shown by `find_revit_tools` and in the manuals carries a ready one-call lookup.
24
+ - Contributor platform: contracts generated from code into manuals and the tool index, a register of every "never/must" rule with its enforcing test, a discovery quality corpus, a prompt-size budget, architecture gates, and a repeatable agent-evaluation suite (`tests/agent-eval`).
25
+ - One focused manual for each public PI-Revit tool, shared execution/recovery/visual guidance, and explicit explanation, inspection and modification paths in the skill and workflows.
26
+ - Offline manual lookup through `find_revit_tools` with `scope: "documentation"`, plus local manual paths, registration/activation state and version evidence in discovery results.
27
+ - Contributor `AGENTS.md`, architecture/ownership documentation, and offline checks that compare manual examples with the actual public input schemas.
28
+
29
+ ### Changed
30
+
31
+ - A display-name parameter that matches several parameters on one element is no longer resolved to an arbitrary one. Writes and filters fail with the exact candidate identities, and projections flag the ambiguity.
32
+ - An `is_empty` filter on a parameter that was not found keeps its warning even when elements match, because missing parameters also count as empty.
33
+ - Manual compatibility is an exact per-tool contract comparison (`contract_match`, `contract_changed`, `undocumented`, `unknown`) instead of a version-number match; rewording documentation never flags a bridge.
34
+ - The completion check counts only calls that actually changed the model (from `model_changes`), so a read-only script no longer counts as an edit.
35
+ - Tool search uses English task vocabulary with word-form matching, input names and declared limits. Requests in other languages are translated by the model rather than by language tables.
36
+ - Prompt guidance per tool is shorter: identity, manual location and protocol rules appear once instead of once per tool. `expected_document_id` descriptions now agree with whether the schema requires it.
37
+ - The entry skill routes to relevant references instead of carrying every tool's detailed contract. Installation history remains in the README/change log.
38
+ - `find_revit_tools` includes the six Pi-side utilities alongside the selected bridge catalogue. Native utilities remain discoverable when the bridge is unavailable; bridge availability is identified as a discovery snapshot.
39
+
40
+ ### Fixed
41
+
42
+ - Advanced tool registration preserves its prompt snippet and guidelines so Pi can use them after activation. Tool guidance also links the matching local manual.
43
+ - Tool search retains packaged summary terms after connecting to Revit, so searches such as `warnings` continue to find the relevant manual and available tool.
44
+
45
+ ## [0.4.0] - 2026-09-22
46
+
47
+ ### Added
48
+
49
+ - Linked-model discovery and filtered linked-element queries with exact linked document identities and host-coordinate bounds.
50
+ - Schedule inspection with independent row and column pagination, and element relationship inspection.
51
+ - `find_revit_tools` searches and activates specialist tools within the current Pi session while preserving other extensions' active tools.
52
+ - `get_elements` can include up to 20 requested parameter identities per element, with optional type parameters and explicit missing or ambiguous matches. Raw values and formatted display values are returned separately.
53
+ - `summarize_elements` counts the whole query scope by category, type, level, or exact raw parameter value, with independently paginated groups and a 10,000-element limit.
54
+ - `manage_element_sets` retains query membership for repeat reads of current values and reports missing members. Sets are limited to 10,000 members and 32 retained sets, expire after 30 minutes, and belong to the exact open document and bridge session.
55
+ - `get_revit_operation` reads operation receipts without waiting for Revit's model thread. Supporting bridges automatically track native tool calls; retrying with the same `_operation_id` and identical arguments does not repeat the action. Full results are bounded to 128 completed receipts / 32 MiB, while up to 10,000 receipt records keep IDs reserved for that bridge session. Restarting the bridge clears receipts; an unknown outcome must be checked against the original model.
56
+ - `transform_elements` moves, copies, or rotates up to 200 selected elements together, with explicit input units, document-internal coordinates, and preview rollback. IDs created during previews are temporary.
57
+ - `delete_elements` previews or performs a whole-selection deletion and returns Revit's deletion set, including dependents. An optional `expected_deleted_ids` check rejects changed deletion membership; cascades above 10,000 IDs roll back.
58
+ - `change_element_types` validates up to 200 target/type pairs with per-target outcomes, optional atomic rollback, and previews. Results identify replacement elements; replacement IDs from rolled-back operations must not be reused.
59
+ - `manage_revit_instances` lists reachable local bridge sessions and selects a target for the current Pi session. Each current bridge has its own discovery file; legacy discovery and opaque selectors remain supported. The first sole instance binds automatically, while multiple instances require explicit selection. Selection refreshes the tool catalogue; read a fresh model overview afterward.
60
+ - `manage_views` creates plans, isometric 3D views, and sections, or duplicates and updates views, with compatible templates, scale checks, and previews. Sections use explicit units and document-internal coordinates.
61
+ - `manage_sheets` creates, renames, or renumbers sheets, with an optional loaded titleblock at creation and preview rollback.
62
+ - `manage_sheet_placements` lists, places, and moves viewports or schedule instances using paper-space coordinates. Viewport positions exclude labels; schedule positions are insertion points. Edits support previews with temporary created IDs, and every action, including listing, requires an exact document identity.
63
+ - `get_schedule_fields` discovers eligible parameter/type pairs for regular schedules. `manage_schedules` creates or configures schedules with field headings, visibility, widths, itemization, sorting, and typed filters, including explicit units for measured numeric filters and preview rollback.
64
+ - `create_tags` creates host element, room, space, or area tags with explicit tag-head positions, loaded tag types, partial or atomic batches, and preview rollback. Proposed tag IDs are temporary.
65
+ - `query_spatial_elements` finds host elements by axis-aligned bounding-box intersection or containment in an explicitly sized region, with whole-scope candidate limits, paging, and missing-box counts.
66
+ - `measure_geometry` measures exact distance between supplied points or approximate separation between host-element bounding boxes, with explicit units and an optional box-proximity threshold. Box overlap and threshold hits are not confirmed clashes or clearance failures.
67
+ - Pi skill references provide room-documentation and model-audit/export workflows using native tools, previews, exact identities, and recorded output paths.
68
+ - `manage_revit_scripts` saves immutable local script definitions without executing them, reads source, and runs an exact content-hash version with required named inputs. Local history records the version, document, input hash, and operation receipt without retaining raw inputs or results. Runs use the existing unrestricted script execution contract; no automatic runs or model saving are added.
69
+ - `get_model_coordinates` reads project/survey base points, site/project locations, and the active shared-coordinate mapping for explicit internal points. Length units are required; no GIS reference system is inferred or coordinates changed.
70
+
71
+ ### Changed
72
+
73
+ - `set_parameters` supports `preview` and `atomic` batches, with a subtransaction for each update and observed per-step before/after values. Committed updates appear in `succeeded`; accepted steps that were rolled back appear in `proposed`. Preview attempts commit validation before rolling back its transaction group when the batch is eligible; `commit_validation_performed` reports whether those checks ran. Default batches still commit partial successes.
74
+ - A bound Revit session is no longer replaced implicitly after closing or restarting: list and select its new identity before further model calls. Operation receipt reads and identical retries continue to target their original bridge even when another instance is selected; unavailable originals are never redirected.
75
+ - `get_schedules` now includes field specifications, grid/sheet widths in feet, filtering capabilities, and current sort/filter rules. Numeric filter values are reported in Revit internal units.
76
+ - `execute_csharp` accepts structured JSON `inputs` as a separate `JsonElement` global, keeping input values separate from source code.
77
+
78
+ ### Fixed
79
+
80
+ - `manage_schedules` accepts the Count parameter/type pair returned by `get_schedule_fields`, while preserving Count creation without a parameter ID. Discovery and editing descriptions now document both supported forms.
81
+
82
+ ## [0.3.1] - 2026-09-16
83
+
84
+ ### Fixed
85
+
86
+ - The installer checks the selected .NET SDK before installing packages or building the add-in. Missing or older SDKs now produce a clear explanation, the matching Windows x64 SDK download link, and retry instructions. Interactive installs offer to open the download page. Manual builds and deployments also check the SDK before compiling.
87
+
88
+ ## [0.3.0] - 2026-09-09
89
+
90
+ ### Added
91
+
92
+ - `read_revit_result` retrieves complete large tool results in bounded fragments.
93
+ Result IDs belong to the current Pi extension session; saved files remain
94
+ readable by path while available.
95
+
96
+ ### Changed
97
+
98
+ - **Breaking:** writes and UI mutations require `expected_document_id` from
99
+ `get_model_overview`'s `project.documentId`. Refresh it after close/reopen or
100
+ bridge restart. A legacy title alone is insufficient; supplied IDs on reads
101
+ are also checked.
102
+ - Default export folders include a model-identity hash, separating same-title
103
+ models. Existing folders remain untouched; explicit output directories work
104
+ as before.
105
+
106
+ ### Fixed
107
+
108
+ - Requested values and all returned rows reach Pi instead of only UI/debug
109
+ details. Large-result retrieval preserves each tool's pagination and limits.
110
+ - Scoped display-name filters resolve each element's parameter, including
111
+ matches beyond the first 50 elements; explicit built-in/GUID filters stay optimized.
112
+ - Type-only parameter requests work independently of instance-parameter inclusion.
113
+ - Transaction results distinguish confirmed commit/rollback from incomplete
114
+ cleanup. Failure handling follows the transaction lifecycle; UI and export
115
+ errors disclose effects or files already produced.
116
+
117
+ Update both the Pi package and Revit add-in with Revit closed, then restart Revit
118
+ and start a fresh Pi session. Live verification covered bounded workflows on
119
+ Revit 2025.4.3; Revit 2026/2027 were not tested for this release.
120
+
121
+ ## [0.2.18] - 2026-08-21
122
+
123
+ ### Fixed
124
+ - When pi starts before Revit and the background rediscovery timer (rather than a `ping`
125
+ call) registers the bridge tools, the session is now told — the same announcement the
126
+ ping path has always given. Previously the tools appeared silently in the next system
127
+ prompt while nothing contradicted the session's earlier "Revit is not running", so the
128
+ agent could stay needlessly pessimistic. The note is queued for the next user prompt
129
+ and never interrupts. Extension-only change; the Revit add-in is unchanged (the
130
+ standard installer keeps both versions aligned).
131
+
132
+ ## [0.2.17] - 2026-08-21
133
+
134
+ ### Fixed
135
+ - The bridge's no-document check no longer counts linked documents. With only links
136
+ loaded, Revit does not pump the bridge's work queue, so a call could wait out its full
137
+ timeout instead of failing immediately with the clean "no active document" answer.
138
+
139
+ ### Changed
140
+ - Docs and tool descriptions describe localized parameter names generically instead of
141
+ quoting specific languages.
142
+ - The full search_api_docs benchmark (641 live queries against RevitAPI.xml ground truth)
143
+ was re-run on Revit 2025 at 0.2.16: 100% recall, 98.75% top-1 on exact names, 100%
144
+ spacing-variant agreement, 0 false positives across 99 adversarial mutations, 50/50
145
+ parameter docs, p50 10 ms -- no regression across the 0.2.13-0.2.16 search changes.
146
+
147
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
148
+ restart Revit).
149
+
150
+ ## [0.2.16] - 2026-08-21
151
+
152
+ ### Fixed
153
+ - `search_api_docs`: an accessor-spelling query combined with `kind: "method"` — e.g.
154
+ `Element.get_Parameter(BuiltInParameter)` filtered to methods — returned "no matches",
155
+ because the accessor rewrite found the documented member but the kind filter rejected it:
156
+ a C# `get_X`/`set_X` accessor is a method to the caller, while the XML documents the
157
+ underlying member as a property or indexer. For accessor-rewritten candidates the
158
+ `method` filter now also admits properties, and the result note says so. Found by an
159
+ agent under a stress test that filtered its doc query to methods. Two benchmark probes
160
+ added (the widening plus a real-method control).
161
+
162
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
163
+ restart Revit).
164
+
165
+ ## [0.2.15] - 2026-08-21
166
+
167
+ ### Fixed
168
+ - `set_parameters`: the "parameter not found" error now mentions that display names are
169
+ localized and points to the language-independent BuiltInParameter enum name — the same
170
+ guidance `get_element_details` and `get_elements` already give. Previously it only
171
+ suggested the type-parameter cause, which sent the caller down the wrong path in
172
+ non-English UIs.
173
+ - `get_elements`: the "filter parameter not found on any probed element" warning now
174
+ appears only when the query returned zero matches — that is where it distinguishes
175
+ "unknown parameter name" from "no matching elements". Next to real matches it was noise
176
+ (an unscoped query's probe window can simply miss the elements that carry the parameter).
177
+
178
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
179
+ restart Revit).
180
+
181
+ ## [0.2.14] - 2026-08-21
182
+
183
+ ### Fixed
184
+ - `get_elements`: text filter rules now compare case-insensitively on the post-scan path,
185
+ matching Revit's own collector rules (which ignore case -- verified empirically). The
186
+ same string rule previously matched case-insensitively when it ran inside the collector
187
+ but case-sensitively when it fell back to the per-element scan, so merely scoping a
188
+ query could change its results.
189
+ - `search_api_docs`: queries in C# accessor spelling -- `Element.get_Parameter(BuiltInParameter)`,
190
+ `get_BoundingBox(View` -- now resolve to the documented property or indexer
191
+ (`Element.Parameter`, `Element.BoundingBox`), with a note explaining the rewrite. Members
192
+ documented with a literal `get_`/`set_` prefix still match directly; the rewrite is only
193
+ a fallback. Three benchmark probes added.
194
+
195
+ Also investigated and cleared, no change needed: `Element.BoundingBox` and
196
+ `LocationCurve.Curve` document null returns -- not exceptions -- for elements without
197
+ geometry, so the suspected one-bad-element batch failure in `get_element_details` does
198
+ not exist per the API contract.
199
+
200
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
201
+ restart Revit).
202
+
203
+ ## [0.2.13] - 2026-08-21
204
+
205
+ ### Fixed
206
+ - `get_elements`: a display-name filter rule that matches no parameter on any probed
207
+ in-scope element now carries an explicit WARNING in the result (content text and a
208
+ `warnings` payload field) instead of silently reporting 0 matches. The typical trap:
209
+ querying an English display name against a non-English UI, where the same parameter
210
+ carries a translated name -- the query looked valid and the honest answer was "unknown
211
+ parameter", not "0 matches". The warning points to the language-independent
212
+ BuiltInParameter enum name as the fix.
213
+ - `get_elements`: a filter value that does not fit the parameter's storage type now fails
214
+ the same way regardless of scoping. Previously the identical query reported a clear error
215
+ when `category`/`of_class` was set (the rule ran inside Revit's collector) but silently
216
+ returned zero matches when it was not (the rule fell back to the per-element scan).
217
+ - `execute_csharp`: a script that ran successfully but returned a value the result
218
+ serializer could not walk — a lazy sequence over a deleted element, a property that
219
+ throws — was rolled back and reported as "C# script threw". The script's changes now
220
+ commit, `returnValue` explains what happened, and `returnValueError` carries the detail.
221
+ - `capture_view`: every snapshot stayed on disk forever (measured on one machine: 138
222
+ files, 28 MB, going back 15 months). Captures now go to `%LOCALAPPDATA%\pi-revit\captures`
223
+ and each capture sweeps the ones older than 24 hours. The folder had to become a fixed
224
+ one: `Path.GetTempPath()` can return a fresh per-session directory, so files left by
225
+ earlier sessions were unreachable from the current one. The file just produced is
226
+ untouched, so the read tool still finds it.
227
+ - `export_documents`: the produced-file list compared pre-existing files against a wall
228
+ clock window, so an untouched file that merely happened to be recent was reported as
229
+ exported. Each file is now compared against its own pre-export timestamp.
230
+ - The bridge reclaims `bridge.json` when its owner goes away. With two Revits open the
231
+ newer one still owns the file, but closing it no longer leaves the older, still-running
232
+ bridge undiscoverable — and a stale entry left by a crashed Revit is replaced within 30s
233
+ instead of failing every call with "could not reach the Revit bridge".
234
+
235
+ ### Changed
236
+ - `scripts/deploy.ps1` replaces the add-in folder instead of copying over it, so files from
237
+ a previous release cannot linger next to the new ones. It reports clearly if Revit is
238
+ still running and holding the folder.
239
+ - Docs: `open_view` was missing from the README tool table; the 0.2.10-0.2.12 changelog
240
+ entries were dated a day after their actual release.
241
+
242
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
243
+ restart Revit).
244
+
245
+ ## [0.2.12] - 2026-07-21
246
+
247
+ ### Added
248
+ - New tool `open_view`: activates a view or sheet in the Revit UI — the equivalent of
249
+ double-clicking it in the Project Browser. Identify the target by `view_id` or by
250
+ `name` (view name, sheet number like "A-101", or "number - name"). Uses Revit's
251
+ queued `RequestViewChange`, which is explicitly legal from the bridge's ExternalEvent
252
+ context; the activation completes the instant the call returns. Ends the
253
+ "please double-click the sheet yourself" gap after sheet/view creation.
254
+
255
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
256
+ restart Revit).
257
+
258
+ ## [0.2.11] - 2026-07-21
259
+
260
+ ### Fixed
261
+ - `search_api_docs`: signature queries now accept .NET type names and qualified names —
262
+ `Wall.Create(Document, Curve, ElementId, Boolean` and `...(System.String` match the
263
+ rendered `bool` / `string`, and `(Autodesk.Revit.DB.Document` matches `Document`.
264
+ Parameter types in the query are reduced exactly the way the index renders them
265
+ (namespace stripped, CLR name → C# keyword, case-insensitive).
266
+ - `search_api_docs`: Creation-factory calls resolve — `Document.Create.NewRoom(Level, UV`
267
+ finds `Document.NewRoom`, and `Document.Create.NewFamilyInstance` finds the
268
+ `ItemFactoryBase` overloads (factory members documented on a base class). A note in the
269
+ result explains the rewrite. Applies only to the literal `Document.Create.` /
270
+ `Application.Create.` prefixes; ordinary members like `Wall.Create` are untouched, and
271
+ nonsense like `Document.Create.Banana` still honestly returns nothing.
272
+
273
+ Both were observed live: pi stumbled on these five times across two modeling sessions.
274
+ The benchmark gained six regression probes for them.
275
+
276
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
277
+ restart Revit).
278
+
279
+ ## [0.2.10] - 2026-07-21
280
+
281
+ ### Fixed
282
+ - `search_api_docs`: constructor overloads can now be targeted with the natural C#
283
+ spelling — `FilteredElementCollector(Document` matches even though constructors are
284
+ rendered as `new FilteredElementCollector(Document)`. Previously only the `new `-prefixed
285
+ form matched (the same typography-cliff family as the 0.2.8 comma-spacing fix).
286
+
287
+ ### Added
288
+ - `scripts/benchmark-search-docs.py`: a reproducible ~630-query benchmark of
289
+ `search_api_docs` scored against Autodesk's own RevitAPI.xml — exact-name recall,
290
+ signature/spacing variants, hard syntax, namespace ambiguity, adversarial honesty
291
+ controls, documentation fidelity, and latency percentiles. Run it against any Revit
292
+ version with the bridge loaded. Measured on Revit 2025 at 0.2.9: 100% recall / 98.8%
293
+ top-1 on exact names, 100% spacing-variant agreement, 0 false positives across 99
294
+ adversarial mutations, 50/50 correct parameter docs, p50 8 ms.
295
+
296
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
297
+ restart Revit).
298
+
299
+ ## [0.2.9] - 2026-07-21
300
+
301
+ ### Added
302
+ - Self-healing tool discovery: when pi starts before Revit, the extension now keeps
303
+ retrying tool discovery in the background (every 15s) and also re-discovers on a
304
+ successful `ping` — no more sessions stuck with only `ping` registered until a fresh
305
+ pi start. When tools arrive mid-session, `ping`'s result says so.
306
+ - `set_parameters` and `execute_csharp` accept an optional `expected_document` (the model
307
+ title): if the active document differs — e.g. the user switched models mid-session —
308
+ the write fails cleanly instead of landing in the wrong model.
309
+ - `get_element_details.parameter_names` now also matches language-independent
310
+ BuiltInParameter enum names (e.g. `ALL_MODEL_MARK`), so filtering works in non-English
311
+ Revit UIs where display names are localized.
312
+
313
+ ### Fixed
314
+ - `get_element_details` no longer reports a misleading "0 params" when a
315
+ `parameter_names` filter simply matched nothing — it now reports "N of M params
316
+ matched parameter_names" so localization misses are visible. (This explains the
317
+ earlier "0 params vs 38 params" reports: different filter arguments, not flaky reads.)
318
+ - `get_elements`: a display-name filter rule in an **unscoped** query (no category /
319
+ of_class) is no longer promoted to a pinned collector filter based on a 50-element
320
+ probe — it stays on the per-element post-scan path, so categories beyond the probe
321
+ window can't be silently dropped when the same parameter name maps to different ids.
322
+
323
+ ### Changed
324
+ - SKILL.md: guidance on localized parameter names (prefer BuiltInParameter enum names)
325
+ and on using `expected_document` for long sessions / multiple open models.
326
+ - README: new "Safety model" section stating explicitly what the add-in enforces and
327
+ that write-confirmation UX is a client-side decision.
328
+
329
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
330
+ restart Revit).
331
+
332
+ ## [0.2.8] - 2026-07-21
333
+
334
+ ### Fixed
335
+ - `search_api_docs`: overload-targeted queries no longer fail on comma spacing.
336
+ `Wall.Create(Document,Curve` (no space) and `Wall.Create( Document, Curve` now match the
337
+ same overloads as `Wall.Create(Document, Curve` — the query's spacing around commas and
338
+ parentheses is normalized to the rendered signature style before matching.
339
+
340
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then restart
341
+ Revit).
342
+
343
+ ## [0.2.7] - 2026-07-21
344
+
345
+ ### Added
346
+ - Update announcements: after a pi-revit update, the next pi session shows a one-time
347
+ "What's new in pi-revit" note listing the changelog entries for every version since the
348
+ last one announced — the same mechanism pi uses for its own updates. The last-announced
349
+ version is remembered in `%APPDATA%\pi-revit\state.json` (kept outside the package
350
+ folder so npm updates can't erase it). Fresh installs stay silent.
351
+
352
+ Extension-only change: no Revit add-in redeploy or Revit restart needed.
353
+
354
+ ## [0.2.6] - 2026-07-20
355
+
356
+ ### Fixed
357
+ - Write transactions (`set_parameters`, `execute_csharp`, and the temporary-isolate
358
+ branch of `manage_selection`) now register a failures preprocessor. Previously Revit
359
+ handled commit failures interactively: warnings popped the transient toast and spammed
360
+ the journal, and an error-severity failure showed the modal resolution dialog, blocking
361
+ the bridge until a human clicked. Now warnings are auto-dismissed and reported back
362
+ (`commitWarnings` in the result, e.g. duplicate Mark values), and errors roll the
363
+ transaction back with the actual Revit failure text in the error message.
364
+
365
+ ### Changed
366
+ - `set_parameters` tool description tells the model to relay `commitWarnings` to the user.
367
+
368
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` + Revit restart).
369
+
370
+ ## [0.2.5] - 2026-07-20
371
+
372
+ ### Fixed
373
+ - `execute_csharp` dialog guard no longer answers every Revit popup with OK. On some
374
+ dialogs OK is the destructive choice (e.g. "Delete Element(s)"), so a script could
375
+ silently delete dimensions or constraints and still report success. Unrecognized
376
+ dialogs are now answered dismissively (Cancel, then Close, then No; OK only as the
377
+ last resort so Revit can never hang behind a popup), a small allowlist keeps OK for
378
+ dialogs that are safe to confirm, and `suppressedDialogs` now reports which answer
379
+ was given (e.g. `TaskDialog_… (answered Cancel)`).
380
+
381
+ ### Changed
382
+ - The `execute_csharp` tool description tells the model that confirmation prompts may be
383
+ cancelled and to check `suppressedDialogs` when a result looks incomplete.
384
+
385
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` + Revit restart) — `ping`
386
+ warns on a version mismatch until then.
387
+
388
+ ## [0.2.4] - 2026-07-20
389
+
390
+ ### Added
391
+ - This changelog. It ships inside the npm package and gets a `## [x.y.z]` entry with
392
+ **Added / Changed / Fixed** sections for every release, so updates report what actually
393
+ changed instead of just a version number.
394
+
395
+ ## [0.2.3] - 2026-07-20
396
+
397
+ ### Changed
398
+ - `search_api_docs`: results with the same short name in different namespaces are now
399
+ disambiguated with their full namespace, so `Category` vs internal schedule types
400
+ can't be confused.
401
+
402
+ ### Fixed
403
+ - Removed a hardcoded example from the overload note that could mislead the model into
404
+ copying a signature that didn't apply.
405
+
406
+ ## [0.2.2] - 2026-07-20
407
+
408
+ ### Added
409
+ - `search_api_docs`: exception documentation ("Throws:") is now shown for matched members.
410
+ - Overload-targeted queries: a query containing `(` matches against rendered signatures.
411
+
412
+ ### Changed
413
+ - Overloads now rank simplest-first (fewest parameters), so the common form appears on top.
414
+
415
+ ## [0.2.1] - 2026-07-16
416
+
417
+ ### Added
418
+ - Extension/add-in version handshake: `ping` reports both versions and warns when the
419
+ npm extension and the installed Revit add-in are out of sync (partial-update detection).
420
+
421
+ ## [0.2.0] - 2026-07-15
422
+
423
+ ### Changed
424
+ - SKILL.md: documents the top-match inline docs behaviour and the automatic
425
+ `Models\<title>\exports` output location so the agent uses them without prompting.
426
+
427
+ ## [0.1.9] - 2026-07-15
428
+
429
+ ### Added
430
+ - `search_api_docs` indexes every Revit API enum and surfaces `<remarks>` documentation.
431
+
432
+ ### Changed
433
+ - The top match's full documentation is placed directly in the tool's text output
434
+ (where model attention is strongest) instead of only in the structured payload.
435
+
436
+ ## [0.1.8] - 2026-07-13
437
+
438
+ ### Added
439
+ - Automatic per-model output sorting: exports, captures, and scripts land under
440
+ `Models\<model title>\` in the workspace, keyed to the source document.
441
+
442
+ ## [0.1.7] - 2026-07-13
443
+
444
+ ### Fixed
445
+ - npm-install uninstall flow no longer blocks itself on its own installation folder.
446
+
447
+ ## [0.1.6] - 2026-07-13
448
+
449
+ ### Changed
450
+ - The global launcher installs next to the user's permanent pi under npx.
451
+
452
+ ## [0.1.5] - 2026-07-13
453
+
454
+ ### Fixed
455
+ - Uninstall of the npm-installed Pi package.
456
+ - Workspace paths containing non-ASCII characters.
457
+
458
+ First version published to npm.
459
+
460
+ ## [0.1.0] - 2026-06-17
461
+
462
+ Initial public release: Revit bridge add-in (Revit 2025/2026/2027) plus Pi extension with
463
+ `ping`, `get_model_overview`, `get_elements`, `get_element_details`, `set_parameters`,
464
+ `manage_selection`, `capture_view`, `export_documents`, `execute_csharp`, and
465
+ `search_api_docs`.