pi-revit 0.5.0 → 0.5.1

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 (3) hide show
  1. package/CHANGELOG.md +474 -465
  2. package/README.md +76 -41
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,465 +1,474 @@
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`.
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.1] - 2026-09-29
11
+
12
+ ### Changed
13
+
14
+ - README describes the 0.5.0 tools: a "Works in" column (project, family or both) in the tool table, family documents, `model_changes`, `inherited_state`, `name_collision`, scope notes, multi-member `search_api_docs` lookups, and what 0.5.0 was actually tested on. No tool behavior changed; redeploy the add-in so its version matches the package.
15
+
16
+ ## [0.5.0] - 2026-09-29
17
+
18
+ ### Added
19
+
20
+ - Family documents: every tool declares which document kinds it works in. Ten tools are project-only (sheets, sheet placements, schedules, tags, spatial query, links, coordinates) and refuse a family document before running, with the route to use instead. `get_model_overview` reports `documentKind` and, for a family, its category, current type, type names and parameters. In a family, `model_changes` also lists types and parameters added, removed or changed.
21
+ - Scope notes match the names a request mentions in any writing system; there are no per-language rules.
22
+
23
+ - 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".
24
+ - 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.
25
+ - 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.
26
+ - `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.
27
+ - `find_revit_tools` also returns matching workflows, shared guides and skills, including subject skills added to the package later.
28
+ - `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.
29
+ - 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.
30
+ - Duplicating a view, copying elements, changing types and tagging 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.
31
+ - Objects that existed before a request are protected from silent reuse. A name that another view, schedule, level, grid, type, material, filter or family type 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.
32
+ - `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.
33
+ - 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`).
34
+ - 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.
35
+ - Offline manual lookup through `find_revit_tools` with `scope: "documentation"`, plus local manual paths, registration/activation state and version evidence in discovery results.
36
+ - Contributor `AGENTS.md`, architecture/ownership documentation, and offline checks that compare manual examples with the actual public input schemas.
37
+
38
+ ### Changed
39
+
40
+ - 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.
41
+ - 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.
42
+ - 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.
43
+ - 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.
44
+ - 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.
45
+ - 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.
46
+ - The entry skill routes to relevant references instead of carrying every tool's detailed contract. Installation history remains in the README/change log.
47
+ - `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.
48
+
49
+ ### Fixed
50
+
51
+ - Advanced tool registration preserves its prompt snippet and guidelines so Pi can use them after activation. Tool guidance also links the matching local manual.
52
+ - Tool search retains packaged summary terms after connecting to Revit, so searches such as `warnings` continue to find the relevant manual and available tool.
53
+
54
+ ## [0.4.0] - 2026-09-22
55
+
56
+ ### Added
57
+
58
+ - Linked-model discovery and filtered linked-element queries with exact linked document identities and host-coordinate bounds.
59
+ - Schedule inspection with independent row and column pagination, and element relationship inspection.
60
+ - `find_revit_tools` searches and activates specialist tools within the current Pi session while preserving other extensions' active tools.
61
+ - `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.
62
+ - `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.
63
+ - `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.
64
+ - `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.
65
+ - `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.
66
+ - `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.
67
+ - `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.
68
+ - `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.
69
+ - `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.
70
+ - `manage_sheets` creates, renames, or renumbers sheets, with an optional loaded titleblock at creation and preview rollback.
71
+ - `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.
72
+ - `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.
73
+ - `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.
74
+ - `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.
75
+ - `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.
76
+ - Pi skill references provide room-documentation and model-audit/export workflows using native tools, previews, exact identities, and recorded output paths.
77
+ - `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.
78
+ - `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.
79
+
80
+ ### Changed
81
+
82
+ - `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.
83
+ - 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.
84
+ - `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.
85
+ - `execute_csharp` accepts structured JSON `inputs` as a separate `JsonElement` global, keeping input values separate from source code.
86
+
87
+ ### Fixed
88
+
89
+ - `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.
90
+
91
+ ## [0.3.1] - 2026-09-16
92
+
93
+ ### Fixed
94
+
95
+ - 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.
96
+
97
+ ## [0.3.0] - 2026-09-09
98
+
99
+ ### Added
100
+
101
+ - `read_revit_result` retrieves complete large tool results in bounded fragments.
102
+ Result IDs belong to the current Pi extension session; saved files remain
103
+ readable by path while available.
104
+
105
+ ### Changed
106
+
107
+ - **Breaking:** writes and UI mutations require `expected_document_id` from
108
+ `get_model_overview`'s `project.documentId`. Refresh it after close/reopen or
109
+ bridge restart. A legacy title alone is insufficient; supplied IDs on reads
110
+ are also checked.
111
+ - Default export folders include a model-identity hash, separating same-title
112
+ models. Existing folders remain untouched; explicit output directories work
113
+ as before.
114
+
115
+ ### Fixed
116
+
117
+ - Requested values and all returned rows reach Pi instead of only UI/debug
118
+ details. Large-result retrieval preserves each tool's pagination and limits.
119
+ - Scoped display-name filters resolve each element's parameter, including
120
+ matches beyond the first 50 elements; explicit built-in/GUID filters stay optimized.
121
+ - Type-only parameter requests work independently of instance-parameter inclusion.
122
+ - Transaction results distinguish confirmed commit/rollback from incomplete
123
+ cleanup. Failure handling follows the transaction lifecycle; UI and export
124
+ errors disclose effects or files already produced.
125
+
126
+ Update both the Pi package and Revit add-in with Revit closed, then restart Revit
127
+ and start a fresh Pi session. Live verification covered bounded workflows on
128
+ Revit 2025.4.3; Revit 2026/2027 were not tested for this release.
129
+
130
+ ## [0.2.18] - 2026-08-21
131
+
132
+ ### Fixed
133
+ - When pi starts before Revit and the background rediscovery timer (rather than a `ping`
134
+ call) registers the bridge tools, the session is now told — the same announcement the
135
+ ping path has always given. Previously the tools appeared silently in the next system
136
+ prompt while nothing contradicted the session's earlier "Revit is not running", so the
137
+ agent could stay needlessly pessimistic. The note is queued for the next user prompt
138
+ and never interrupts. Extension-only change; the Revit add-in is unchanged (the
139
+ standard installer keeps both versions aligned).
140
+
141
+ ## [0.2.17] - 2026-08-21
142
+
143
+ ### Fixed
144
+ - The bridge's no-document check no longer counts linked documents. With only links
145
+ loaded, Revit does not pump the bridge's work queue, so a call could wait out its full
146
+ timeout instead of failing immediately with the clean "no active document" answer.
147
+
148
+ ### Changed
149
+ - Docs and tool descriptions describe localized parameter names generically instead of
150
+ quoting specific languages.
151
+ - The full search_api_docs benchmark (641 live queries against RevitAPI.xml ground truth)
152
+ was re-run on Revit 2025 at 0.2.16: 100% recall, 98.75% top-1 on exact names, 100%
153
+ spacing-variant agreement, 0 false positives across 99 adversarial mutations, 50/50
154
+ parameter docs, p50 10 ms -- no regression across the 0.2.13-0.2.16 search changes.
155
+
156
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
157
+ restart Revit).
158
+
159
+ ## [0.2.16] - 2026-08-21
160
+
161
+ ### Fixed
162
+ - `search_api_docs`: an accessor-spelling query combined with `kind: "method"` — e.g.
163
+ `Element.get_Parameter(BuiltInParameter)` filtered to methods — returned "no matches",
164
+ because the accessor rewrite found the documented member but the kind filter rejected it:
165
+ a C# `get_X`/`set_X` accessor is a method to the caller, while the XML documents the
166
+ underlying member as a property or indexer. For accessor-rewritten candidates the
167
+ `method` filter now also admits properties, and the result note says so. Found by an
168
+ agent under a stress test that filtered its doc query to methods. Two benchmark probes
169
+ added (the widening plus a real-method control).
170
+
171
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
172
+ restart Revit).
173
+
174
+ ## [0.2.15] - 2026-08-21
175
+
176
+ ### Fixed
177
+ - `set_parameters`: the "parameter not found" error now mentions that display names are
178
+ localized and points to the language-independent BuiltInParameter enum name — the same
179
+ guidance `get_element_details` and `get_elements` already give. Previously it only
180
+ suggested the type-parameter cause, which sent the caller down the wrong path in
181
+ non-English UIs.
182
+ - `get_elements`: the "filter parameter not found on any probed element" warning now
183
+ appears only when the query returned zero matches — that is where it distinguishes
184
+ "unknown parameter name" from "no matching elements". Next to real matches it was noise
185
+ (an unscoped query's probe window can simply miss the elements that carry the parameter).
186
+
187
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
188
+ restart Revit).
189
+
190
+ ## [0.2.14] - 2026-08-21
191
+
192
+ ### Fixed
193
+ - `get_elements`: text filter rules now compare case-insensitively on the post-scan path,
194
+ matching Revit's own collector rules (which ignore case -- verified empirically). The
195
+ same string rule previously matched case-insensitively when it ran inside the collector
196
+ but case-sensitively when it fell back to the per-element scan, so merely scoping a
197
+ query could change its results.
198
+ - `search_api_docs`: queries in C# accessor spelling -- `Element.get_Parameter(BuiltInParameter)`,
199
+ `get_BoundingBox(View` -- now resolve to the documented property or indexer
200
+ (`Element.Parameter`, `Element.BoundingBox`), with a note explaining the rewrite. Members
201
+ documented with a literal `get_`/`set_` prefix still match directly; the rewrite is only
202
+ a fallback. Three benchmark probes added.
203
+
204
+ Also investigated and cleared, no change needed: `Element.BoundingBox` and
205
+ `LocationCurve.Curve` document null returns -- not exceptions -- for elements without
206
+ geometry, so the suspected one-bad-element batch failure in `get_element_details` does
207
+ not exist per the API contract.
208
+
209
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
210
+ restart Revit).
211
+
212
+ ## [0.2.13] - 2026-08-21
213
+
214
+ ### Fixed
215
+ - `get_elements`: a display-name filter rule that matches no parameter on any probed
216
+ in-scope element now carries an explicit WARNING in the result (content text and a
217
+ `warnings` payload field) instead of silently reporting 0 matches. The typical trap:
218
+ querying an English display name against a non-English UI, where the same parameter
219
+ carries a translated name -- the query looked valid and the honest answer was "unknown
220
+ parameter", not "0 matches". The warning points to the language-independent
221
+ BuiltInParameter enum name as the fix.
222
+ - `get_elements`: a filter value that does not fit the parameter's storage type now fails
223
+ the same way regardless of scoping. Previously the identical query reported a clear error
224
+ when `category`/`of_class` was set (the rule ran inside Revit's collector) but silently
225
+ returned zero matches when it was not (the rule fell back to the per-element scan).
226
+ - `execute_csharp`: a script that ran successfully but returned a value the result
227
+ serializer could not walk — a lazy sequence over a deleted element, a property that
228
+ throws — was rolled back and reported as "C# script threw". The script's changes now
229
+ commit, `returnValue` explains what happened, and `returnValueError` carries the detail.
230
+ - `capture_view`: every snapshot stayed on disk forever (measured on one machine: 138
231
+ files, 28 MB, going back 15 months). Captures now go to `%LOCALAPPDATA%\pi-revit\captures`
232
+ and each capture sweeps the ones older than 24 hours. The folder had to become a fixed
233
+ one: `Path.GetTempPath()` can return a fresh per-session directory, so files left by
234
+ earlier sessions were unreachable from the current one. The file just produced is
235
+ untouched, so the read tool still finds it.
236
+ - `export_documents`: the produced-file list compared pre-existing files against a wall
237
+ clock window, so an untouched file that merely happened to be recent was reported as
238
+ exported. Each file is now compared against its own pre-export timestamp.
239
+ - The bridge reclaims `bridge.json` when its owner goes away. With two Revits open the
240
+ newer one still owns the file, but closing it no longer leaves the older, still-running
241
+ bridge undiscoverable — and a stale entry left by a crashed Revit is replaced within 30s
242
+ instead of failing every call with "could not reach the Revit bridge".
243
+
244
+ ### Changed
245
+ - `scripts/deploy.ps1` replaces the add-in folder instead of copying over it, so files from
246
+ a previous release cannot linger next to the new ones. It reports clearly if Revit is
247
+ still running and holding the folder.
248
+ - Docs: `open_view` was missing from the README tool table; the 0.2.10-0.2.12 changelog
249
+ entries were dated a day after their actual release.
250
+
251
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
252
+ restart Revit).
253
+
254
+ ## [0.2.12] - 2026-07-21
255
+
256
+ ### Added
257
+ - New tool `open_view`: activates a view or sheet in the Revit UI — the equivalent of
258
+ double-clicking it in the Project Browser. Identify the target by `view_id` or by
259
+ `name` (view name, sheet number like "A-101", or "number - name"). Uses Revit's
260
+ queued `RequestViewChange`, which is explicitly legal from the bridge's ExternalEvent
261
+ context; the activation completes the instant the call returns. Ends the
262
+ "please double-click the sheet yourself" gap after sheet/view creation.
263
+
264
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
265
+ restart Revit).
266
+
267
+ ## [0.2.11] - 2026-07-21
268
+
269
+ ### Fixed
270
+ - `search_api_docs`: signature queries now accept .NET type names and qualified names —
271
+ `Wall.Create(Document, Curve, ElementId, Boolean` and `...(System.String` match the
272
+ rendered `bool` / `string`, and `(Autodesk.Revit.DB.Document` matches `Document`.
273
+ Parameter types in the query are reduced exactly the way the index renders them
274
+ (namespace stripped, CLR name → C# keyword, case-insensitive).
275
+ - `search_api_docs`: Creation-factory calls resolve — `Document.Create.NewRoom(Level, UV`
276
+ finds `Document.NewRoom`, and `Document.Create.NewFamilyInstance` finds the
277
+ `ItemFactoryBase` overloads (factory members documented on a base class). A note in the
278
+ result explains the rewrite. Applies only to the literal `Document.Create.` /
279
+ `Application.Create.` prefixes; ordinary members like `Wall.Create` are untouched, and
280
+ nonsense like `Document.Create.Banana` still honestly returns nothing.
281
+
282
+ Both were observed live: pi stumbled on these five times across two modeling sessions.
283
+ The benchmark gained six regression probes for them.
284
+
285
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
286
+ restart Revit).
287
+
288
+ ## [0.2.10] - 2026-07-21
289
+
290
+ ### Fixed
291
+ - `search_api_docs`: constructor overloads can now be targeted with the natural C#
292
+ spelling — `FilteredElementCollector(Document` matches even though constructors are
293
+ rendered as `new FilteredElementCollector(Document)`. Previously only the `new `-prefixed
294
+ form matched (the same typography-cliff family as the 0.2.8 comma-spacing fix).
295
+
296
+ ### Added
297
+ - `scripts/benchmark-search-docs.py`: a reproducible ~630-query benchmark of
298
+ `search_api_docs` scored against Autodesk's own RevitAPI.xml — exact-name recall,
299
+ signature/spacing variants, hard syntax, namespace ambiguity, adversarial honesty
300
+ controls, documentation fidelity, and latency percentiles. Run it against any Revit
301
+ version with the bridge loaded. Measured on Revit 2025 at 0.2.9: 100% recall / 98.8%
302
+ top-1 on exact names, 100% spacing-variant agreement, 0 false positives across 99
303
+ adversarial mutations, 50/50 correct parameter docs, p50 8 ms.
304
+
305
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
306
+ restart Revit).
307
+
308
+ ## [0.2.9] - 2026-07-21
309
+
310
+ ### Added
311
+ - Self-healing tool discovery: when pi starts before Revit, the extension now keeps
312
+ retrying tool discovery in the background (every 15s) and also re-discovers on a
313
+ successful `ping` — no more sessions stuck with only `ping` registered until a fresh
314
+ pi start. When tools arrive mid-session, `ping`'s result says so.
315
+ - `set_parameters` and `execute_csharp` accept an optional `expected_document` (the model
316
+ title): if the active document differs — e.g. the user switched models mid-session —
317
+ the write fails cleanly instead of landing in the wrong model.
318
+ - `get_element_details.parameter_names` now also matches language-independent
319
+ BuiltInParameter enum names (e.g. `ALL_MODEL_MARK`), so filtering works in non-English
320
+ Revit UIs where display names are localized.
321
+
322
+ ### Fixed
323
+ - `get_element_details` no longer reports a misleading "0 params" when a
324
+ `parameter_names` filter simply matched nothing — it now reports "N of M params
325
+ matched parameter_names" so localization misses are visible. (This explains the
326
+ earlier "0 params vs 38 params" reports: different filter arguments, not flaky reads.)
327
+ - `get_elements`: a display-name filter rule in an **unscoped** query (no category /
328
+ of_class) is no longer promoted to a pinned collector filter based on a 50-element
329
+ probe — it stays on the per-element post-scan path, so categories beyond the probe
330
+ window can't be silently dropped when the same parameter name maps to different ids.
331
+
332
+ ### Changed
333
+ - SKILL.md: guidance on localized parameter names (prefer BuiltInParameter enum names)
334
+ and on using `expected_document` for long sessions / multiple open models.
335
+ - README: new "Safety model" section stating explicitly what the add-in enforces and
336
+ that write-confirmation UX is a client-side decision.
337
+
338
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
339
+ restart Revit).
340
+
341
+ ## [0.2.8] - 2026-07-21
342
+
343
+ ### Fixed
344
+ - `search_api_docs`: overload-targeted queries no longer fail on comma spacing.
345
+ `Wall.Create(Document,Curve` (no space) and `Wall.Create( Document, Curve` now match the
346
+ same overloads as `Wall.Create(Document, Curve` — the query's spacing around commas and
347
+ parentheses is normalized to the rendered signature style before matching.
348
+
349
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then restart
350
+ Revit).
351
+
352
+ ## [0.2.7] - 2026-07-21
353
+
354
+ ### Added
355
+ - Update announcements: after a pi-revit update, the next pi session shows a one-time
356
+ "What's new in pi-revit" note listing the changelog entries for every version since the
357
+ last one announced — the same mechanism pi uses for its own updates. The last-announced
358
+ version is remembered in `%APPDATA%\pi-revit\state.json` (kept outside the package
359
+ folder so npm updates can't erase it). Fresh installs stay silent.
360
+
361
+ Extension-only change: no Revit add-in redeploy or Revit restart needed.
362
+
363
+ ## [0.2.6] - 2026-07-20
364
+
365
+ ### Fixed
366
+ - Write transactions (`set_parameters`, `execute_csharp`, and the temporary-isolate
367
+ branch of `manage_selection`) now register a failures preprocessor. Previously Revit
368
+ handled commit failures interactively: warnings popped the transient toast and spammed
369
+ the journal, and an error-severity failure showed the modal resolution dialog, blocking
370
+ the bridge until a human clicked. Now warnings are auto-dismissed and reported back
371
+ (`commitWarnings` in the result, e.g. duplicate Mark values), and errors roll the
372
+ transaction back with the actual Revit failure text in the error message.
373
+
374
+ ### Changed
375
+ - `set_parameters` tool description tells the model to relay `commitWarnings` to the user.
376
+
377
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` + Revit restart).
378
+
379
+ ## [0.2.5] - 2026-07-20
380
+
381
+ ### Fixed
382
+ - `execute_csharp` dialog guard no longer answers every Revit popup with OK. On some
383
+ dialogs OK is the destructive choice (e.g. "Delete Element(s)"), so a script could
384
+ silently delete dimensions or constraints and still report success. Unrecognized
385
+ dialogs are now answered dismissively (Cancel, then Close, then No; OK only as the
386
+ last resort so Revit can never hang behind a popup), a small allowlist keeps OK for
387
+ dialogs that are safe to confirm, and `suppressedDialogs` now reports which answer
388
+ was given (e.g. `TaskDialog_… (answered Cancel)`).
389
+
390
+ ### Changed
391
+ - The `execute_csharp` tool description tells the model that confirmation prompts may be
392
+ cancelled and to check `suppressedDialogs` when a result looks incomplete.
393
+
394
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` + Revit restart) — `ping`
395
+ warns on a version mismatch until then.
396
+
397
+ ## [0.2.4] - 2026-07-20
398
+
399
+ ### Added
400
+ - This changelog. It ships inside the npm package and gets a `## [x.y.z]` entry with
401
+ **Added / Changed / Fixed** sections for every release, so updates report what actually
402
+ changed instead of just a version number.
403
+
404
+ ## [0.2.3] - 2026-07-20
405
+
406
+ ### Changed
407
+ - `search_api_docs`: results with the same short name in different namespaces are now
408
+ disambiguated with their full namespace, so `Category` vs internal schedule types
409
+ can't be confused.
410
+
411
+ ### Fixed
412
+ - Removed a hardcoded example from the overload note that could mislead the model into
413
+ copying a signature that didn't apply.
414
+
415
+ ## [0.2.2] - 2026-07-20
416
+
417
+ ### Added
418
+ - `search_api_docs`: exception documentation ("Throws:") is now shown for matched members.
419
+ - Overload-targeted queries: a query containing `(` matches against rendered signatures.
420
+
421
+ ### Changed
422
+ - Overloads now rank simplest-first (fewest parameters), so the common form appears on top.
423
+
424
+ ## [0.2.1] - 2026-07-16
425
+
426
+ ### Added
427
+ - Extension/add-in version handshake: `ping` reports both versions and warns when the
428
+ npm extension and the installed Revit add-in are out of sync (partial-update detection).
429
+
430
+ ## [0.2.0] - 2026-07-15
431
+
432
+ ### Changed
433
+ - SKILL.md: documents the top-match inline docs behaviour and the automatic
434
+ `Models\<title>\exports` output location so the agent uses them without prompting.
435
+
436
+ ## [0.1.9] - 2026-07-15
437
+
438
+ ### Added
439
+ - `search_api_docs` indexes every Revit API enum and surfaces `<remarks>` documentation.
440
+
441
+ ### Changed
442
+ - The top match's full documentation is placed directly in the tool's text output
443
+ (where model attention is strongest) instead of only in the structured payload.
444
+
445
+ ## [0.1.8] - 2026-07-13
446
+
447
+ ### Added
448
+ - Automatic per-model output sorting: exports, captures, and scripts land under
449
+ `Models\<model title>\` in the workspace, keyed to the source document.
450
+
451
+ ## [0.1.7] - 2026-07-13
452
+
453
+ ### Fixed
454
+ - npm-install uninstall flow no longer blocks itself on its own installation folder.
455
+
456
+ ## [0.1.6] - 2026-07-13
457
+
458
+ ### Changed
459
+ - The global launcher installs next to the user's permanent pi under npx.
460
+
461
+ ## [0.1.5] - 2026-07-13
462
+
463
+ ### Fixed
464
+ - Uninstall of the npm-installed Pi package.
465
+ - Workspace paths containing non-ASCII characters.
466
+
467
+ First version published to npm.
468
+
469
+ ## [0.1.0] - 2026-06-17
470
+
471
+ Initial public release: Revit bridge add-in (Revit 2025/2026/2027) plus Pi extension with
472
+ `ping`, `get_model_overview`, `get_elements`, `get_element_details`, `set_parameters`,
473
+ `manage_selection`, `capture_view`, `export_documents`, `execute_csharp`, and
474
+ `search_api_docs`.
package/README.md CHANGED
@@ -246,6 +246,9 @@ documentation, then use custom code) instead of an empty list. Missing a dedicat
246
246
  tool is therefore never a reason to call an operation impossible. Search with
247
247
  English task words; you can talk to Pi in any language, and it translates its searches.
248
248
 
249
+ `search_api_docs` can check up to 10 API members in one call, separated by `;`. Each API limit
250
+ shown by `find_revit_tools` and in the manuals carries a ready lookup.
251
+
249
252
  A short PI-Revit protocol is always in Pi's context, whatever the task and whether
250
253
  or not the skill is read. It covers:
251
254
 
@@ -271,44 +274,56 @@ measurements still needed before claiming a speed or reliability improvement.
271
274
 
272
275
  ## Tools
273
276
 
274
- | Tool | What it does |
275
- |---|---|
276
- | `find_revit_tools` | Find native/bridge tools and their manuals; activate specialist tools or look up documentation offline. |
277
- | `ping` | Is the bridge reachable? Revit version |
278
- | `manage_revit_instances` | List reachable local Revit sessions or select the target for this Pi session |
279
- | `get_model_overview` | Project info, units, levels, grids, category counts — call first |
280
- | `get_model_coordinates` | Read base points and site/project locations; map internal points through the active shared coordinates |
281
- | `get_elements` | Query/count elements: parameter filters, optional parameter values, pagination |
282
- | `summarize_elements` | Count all matching elements by category, type, level, or raw parameter value |
283
- | `manage_element_sets` | Create, list, read, or forget temporary snapshots of matching host elements |
284
- | `get_element_details` | Parameter values, location, bounding box, materials per element |
285
- | `get_element_types` | Element types / family symbols, optional placed-instance counts |
286
- | `get_linked_models` | Direct Revit link instances, load status, document identities, placement transforms |
287
- | `get_linked_elements` | Query/count one loaded link, with optional bounding boxes in host coordinates |
288
- | `query_spatial_elements` | Find host elements by approximate bounding-box intersection or containment in a region |
289
- | `measure_geometry` | Measure exact point distance or approximate host-element bounding-box separation |
290
- | `get_schedules` | List schedules or read fields, widths, specifications, sort/filter rules, and displayed cells |
291
- | `get_schedule_fields` | Discover eligible field parameter/type pairs for an existing schedule |
292
- | `manage_schedules` | Create or configure regular schedules, including fields, widths, sorting, and filters |
293
- | `create_tags` | Create host element, room, space, or area tags, with partial/atomic batches and preview |
294
- | `get_element_relationships` | Host, type, level, members, joined geometry, and logical dependents of one element |
295
- | `manage_selection` | Get/set/clear the selection, zoom, temporary isolate |
296
- | `open_view` | Activate a view or sheet in the Revit UI (like double-clicking it in the browser) |
297
- | `set_parameters` | Bulk parameter writes and renames, with previews and optional atomic batches |
298
- | `transform_elements` | Move, copy, or rotate a whole selection, with explicit units and preview |
299
- | `delete_elements` | Preview or delete selected elements and report Revit's full deletion set |
300
- | `change_element_types` | Change types per target, with preview and optional atomic rollback |
301
- | `manage_views` | Create plans, isometric 3D views, or sections; duplicate or update views |
302
- | `manage_sheets` | Create, rename, or renumber sheets, with an optional titleblock at creation |
303
- | `manage_sheet_placements` | List, place, or move viewports and schedule instances in sheet paper space |
304
- | `search_api_docs` | Search the offline Revit API docs (works with no document open) |
305
- | `execute_csharp` | Run a C# script with separate JSON inputs in one auto-managed transaction |
306
- | `manage_revit_scripts` | Save immutable local script versions, inspect source, run an exact version, and read history |
307
- | `capture_view` | PNG snapshot of a view to a temp file (read the returned path to see it) |
308
- | `export_documents` | PDF/DWG/PNG/IFC export of sheets and views — sorted into `Models\<title>--<identity hash>\exports` |
309
- | `get_model_health` | Warnings grouped + worksets, phases, design options audit |
310
- | `read_revit_result` | Read bounded fragments of a saved large tool result; extension-only, no Revit call |
311
- | `get_revit_operation` | Inspect a bridge operation receipt and its retained result without waiting for the model thread |
277
+ | Tool | What it does | Works in |
278
+ |---|---|---|
279
+ | `find_revit_tools` | Find native/bridge tools and their manuals; activate specialist tools or look up documentation offline. | Pi-side |
280
+ | `ping` | Is the bridge reachable? Revit version | Pi-side |
281
+ | `manage_revit_instances` | List reachable local Revit sessions or select the target for this Pi session | Pi-side |
282
+ | `get_model_overview` | Project info, units, levels, grids, category counts — call first | Project, family |
283
+ | `get_model_coordinates` | Read base points and site/project locations; map internal points through the active shared coordinates | Project |
284
+ | `get_elements` | Query/count elements: parameter filters, optional parameter values, pagination | Project, family |
285
+ | `summarize_elements` | Count all matching elements by category, type, level, or raw parameter value | Project, family |
286
+ | `manage_element_sets` | Create, list, read, or forget temporary snapshots of matching host elements | Project, family |
287
+ | `get_element_details` | Parameter values, location, bounding box, materials per element | Project, family |
288
+ | `get_element_types` | Element types / family symbols, optional placed-instance counts | Project, family |
289
+ | `get_linked_models` | Direct Revit link instances, load status, document identities, placement transforms | Project |
290
+ | `get_linked_elements` | Query/count one loaded link, with optional bounding boxes in host coordinates | Project |
291
+ | `query_spatial_elements` | Find host elements by approximate bounding-box intersection or containment in a region | Project |
292
+ | `measure_geometry` | Measure exact point distance or approximate host-element bounding-box separation | Project, family |
293
+ | `get_schedules` | List schedules or read fields, widths, specifications, sort/filter rules, and displayed cells | Project |
294
+ | `get_schedule_fields` | Discover eligible field parameter/type pairs for an existing schedule | Project |
295
+ | `manage_schedules` | Create or configure regular schedules, including fields, widths, sorting, and filters | Project |
296
+ | `create_tags` | Create host element, room, space, or area tags, with partial/atomic batches and preview | Project |
297
+ | `get_element_relationships` | Host, type, level, members, joined geometry, and logical dependents of one element | Project, family |
298
+ | `manage_selection` | Get/set/clear the selection, zoom, temporary isolate | Project, family |
299
+ | `open_view` | Activate a view or sheet in the Revit UI (like double-clicking it in the browser) | Project, family |
300
+ | `set_parameters` | Bulk parameter writes and renames, with previews and optional atomic batches | Project, family |
301
+ | `transform_elements` | Move, copy, or rotate a whole selection, with explicit units and preview | Project, family |
302
+ | `delete_elements` | Preview or delete selected elements and report Revit's full deletion set | Project, family |
303
+ | `change_element_types` | Change types per target, with preview and optional atomic rollback | Project, family |
304
+ | `manage_views` | Create plans, isometric 3D views, or sections; duplicate or update views | Project, family |
305
+ | `manage_sheets` | Create, rename, or renumber sheets, with an optional titleblock at creation | Project |
306
+ | `manage_sheet_placements` | List, place, or move viewports and schedule instances in sheet paper space | Project |
307
+ | `search_api_docs` | Search the offline Revit API docs (works with no document open) | Any, no document needed |
308
+ | `execute_csharp` | Run a C# script with separate JSON inputs in one auto-managed transaction | Project, family |
309
+ | `manage_revit_scripts` | Save immutable local script versions, inspect source, run an exact version, and read history | Pi-side |
310
+ | `capture_view` | PNG snapshot of a view to a temp file (read the returned path to see it) | Project, family |
311
+ | `export_documents` | PDF/DWG/PNG/IFC export of sheets and views — sorted into `Models\<title>--<identity hash>\exports` | Project, family |
312
+ | `get_model_health` | Warnings grouped + worksets, phases, design options audit | Project, family |
313
+ | `read_revit_result` | Read bounded fragments of a saved large tool result; extension-only, no Revit call | Pi-side |
314
+ | `get_revit_operation` | Inspect a bridge operation receipt and its retained result without waiting for the model thread | Pi-side |
315
+
316
+ **Works in:** "Project, family" tools run in project and family documents. "Project" tools (sheets,
317
+ sheet placements, schedules, tags, spatial queries, links, coordinates) refuse a family document before
318
+ running and name the route to use instead. "Pi-side" utilities run in the extension and do not depend on
319
+ the open document; `search_api_docs` needs a running Revit but no open document. Each manual states this under "Works in".
320
+
321
+ ### Work in family documents
322
+
323
+ `get_model_overview` reports `project.documentKind` (`project` or `family`). For a family it also returns
324
+ a family block: category, current type, type names, and parameters (name, instance or type, formula).
325
+ Family types, parameters and formulas are edited through `FamilyManager` with `execute_csharp`; there is
326
+ no dedicated family-editing tool.
312
327
 
313
328
  ### Choose a Revit instance
314
329
 
@@ -638,6 +653,25 @@ record dispatch/response progress, not a model transaction outcome. After a
638
653
  timeout or interruption, inspect `get_revit_operation`; an identical retry uses
639
654
  the original `_operation_id`, script version, inputs, and document identity.
640
655
 
656
+ ### See what a call changed
657
+
658
+ Every call that can change the model reports `model_changes`: the objects it added, modified and
659
+ deleted, and whether the call was rolled back. `observed: false` means no document change was seen.
660
+ This covers custom C# scripts too. New views list their hidden categories and elements. In a family,
661
+ the report also lists types and parameters added, removed or changed. State what a call changed from
662
+ this report, not from a screenshot.
663
+
664
+ Objects made from an existing one carry its state. Duplicating views, copying elements, changing types
665
+ and creating tags report `inherited_state`: hidden categories and elements, filters, overrides, the view
666
+ template, and carried values such as Mark and Comments. Compare it with the request and say what the
667
+ result derives from.
668
+
669
+ Objects that existed before the request are protected from silent reuse. A name already used by a view,
670
+ schedule, level, grid, type, material, filter or family type, or a sheet number already taken, is
671
+ rejected with `name_collision` and the existing object's ID. When a call writes to an object the request
672
+ names but did not create, the extension adds a scope note, and the agent must ask you or report it.
673
+ Names are compared in any writing system; there are no per-language rules.
674
+
641
675
  ### Check an operation after a timeout
642
676
 
643
677
  With a bridge that supports operation tracking, Pi automatically assigns an
@@ -727,9 +761,10 @@ allows a type-only result.
727
761
  UI effects are separate from model rollback.
728
762
  - The add-in multi-targets .NET 8 (Revit 2025/2026) and .NET 10 (Revit 2027); `deploy.ps1`
729
763
  auto-detects the Revit versions you have installed and builds only the matching framework(s),
730
- so you only need the SDK for the Revit you run. The 0.4.0 tools were tested in bounded live
731
- workflows on Revit 2025. Revit 2026/2027 and large-model
732
- performance were not tested for this release. Export API/file checks do not
764
+ so you only need the SDK for the Revit you run. Release 0.5.0 was tested live on
765
+ Revit 2025 only: a building project, a sample site model, a sample family, and requests
766
+ written in Chinese, Arabic, Japanese and Russian. Revit 2026/2027 and large-model
767
+ performance are not tested. Export API/file checks do not
733
768
  establish full DWG drawing or IFC schema/geometry validation.
734
769
  - Pi targets one bridge session at a time. Use `manage_revit_instances` to select
735
770
  among reachable instances. Closing or restarting the selected bridge requires
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-revit",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Native Pi connector for Autodesk Revit. Run npx.cmd -y pi-revit for the full Windows install.",
5
5
  "author": "Ahmad Altahlawi",
6
6
  "license": "MIT",