pi-revit 0.3.1 → 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.
- package/AGENTS.md +167 -0
- package/CHANGELOG.md +114 -42
- package/README.md +598 -138
- package/bin/pi-revit.js +9 -9
- package/docs/architecture.md +271 -0
- package/docs/evaluation.md +434 -0
- package/docs/invariants.json +147 -0
- package/extensions/pi-revit/completion-monitor.ts +55 -0
- package/extensions/pi-revit/contracts.ts +146 -0
- package/extensions/pi-revit/discovery.ts +93 -0
- package/extensions/pi-revit/index.ts +231 -85
- package/extensions/pi-revit/instance-router.ts +86 -0
- package/extensions/pi-revit/platform-prompt.ts +40 -0
- package/extensions/pi-revit/scope-monitor.ts +114 -0
- package/extensions/pi-revit/script-library.ts +146 -0
- package/extensions/pi-revit/tool-catalog.ts +166 -0
- package/extensions/pi-revit/tool-documentation.ts +72 -0
- package/extensions/pi-revit/tool-schema.ts +8 -0
- package/package.json +65 -59
- package/scripts/build.ps1 +9 -9
- package/scripts/check-sdk.ps1 +66 -66
- package/scripts/check-tool-documentation.mjs +287 -0
- package/scripts/deploy.ps1 +16 -16
- package/scripts/generate-contracts.mjs +80 -0
- package/scripts/lib/platform.mjs +226 -0
- package/scripts/test-extension.mjs +15 -0
- package/skills/pi-revit/SKILL.md +39 -63
- package/skills/pi-revit/contracts.generated.json +3524 -0
- package/skills/pi-revit/references/execution-rules.md +41 -0
- package/skills/pi-revit/references/model-audit-export.md +40 -0
- package/skills/pi-revit/references/operation-recovery.md +33 -0
- package/skills/pi-revit/references/room-documentation.md +39 -0
- package/skills/pi-revit/references/tool-index.md +89 -0
- package/skills/pi-revit/references/tools/capture_view.md +62 -0
- package/skills/pi-revit/references/tools/change_element_types.md +65 -0
- package/skills/pi-revit/references/tools/create_tags.md +85 -0
- package/skills/pi-revit/references/tools/delete_elements.md +66 -0
- package/skills/pi-revit/references/tools/execute_csharp.md +81 -0
- package/skills/pi-revit/references/tools/export_documents.md +75 -0
- package/skills/pi-revit/references/tools/find_revit_tools.md +96 -0
- package/skills/pi-revit/references/tools/get_element_details.md +66 -0
- package/skills/pi-revit/references/tools/get_element_relationships.md +61 -0
- package/skills/pi-revit/references/tools/get_element_types.md +67 -0
- package/skills/pi-revit/references/tools/get_elements.md +87 -0
- package/skills/pi-revit/references/tools/get_linked_elements.md +79 -0
- package/skills/pi-revit/references/tools/get_linked_models.md +57 -0
- package/skills/pi-revit/references/tools/get_model_coordinates.md +64 -0
- package/skills/pi-revit/references/tools/get_model_health.md +53 -0
- package/skills/pi-revit/references/tools/get_model_overview.md +57 -0
- package/skills/pi-revit/references/tools/get_revit_operation.md +54 -0
- package/skills/pi-revit/references/tools/get_schedule_fields.md +62 -0
- package/skills/pi-revit/references/tools/get_schedules.md +71 -0
- package/skills/pi-revit/references/tools/manage_element_sets.md +92 -0
- package/skills/pi-revit/references/tools/manage_revit_instances.md +63 -0
- package/skills/pi-revit/references/tools/manage_revit_scripts.md +109 -0
- package/skills/pi-revit/references/tools/manage_schedules.md +90 -0
- package/skills/pi-revit/references/tools/manage_selection.md +66 -0
- package/skills/pi-revit/references/tools/manage_sheet_placements.md +82 -0
- package/skills/pi-revit/references/tools/manage_sheets.md +71 -0
- package/skills/pi-revit/references/tools/manage_views.md +95 -0
- package/skills/pi-revit/references/tools/measure_geometry.md +71 -0
- package/skills/pi-revit/references/tools/open_view.md +59 -0
- package/skills/pi-revit/references/tools/ping.md +41 -0
- package/skills/pi-revit/references/tools/query_spatial_elements.md +74 -0
- package/skills/pi-revit/references/tools/read_revit_result.md +53 -0
- package/skills/pi-revit/references/tools/search_api_docs.md +65 -0
- package/skills/pi-revit/references/tools/set_parameters.md +75 -0
- package/skills/pi-revit/references/tools/summarize_elements.md +64 -0
- package/skills/pi-revit/references/tools/transform_elements.md +79 -0
- package/skills/pi-revit/references/visual-verification.md +36 -0
- package/skills/pi-revit/tool-manifest.json +338 -0
- package/src/Revit/BridgeServer.cs +75 -19
- package/src/Revit/OperationStore.cs +178 -0
- package/src/Revit/ToolRegistry.cs +61 -8
- package/src/Revit/Tools/CaptureView.cs +9 -0
- package/src/Revit/Tools/ChangeElementTypes.cs +74 -0
- package/src/Revit/Tools/ChangeSet.cs +39 -0
- package/src/Revit/Tools/CreateTags.cs +107 -0
- package/src/Revit/Tools/DeleteElements.cs +53 -0
- package/src/Revit/Tools/DocumentGuard.cs +12 -2
- package/src/Revit/Tools/ElementNames.cs +103 -0
- package/src/Revit/Tools/ElementQueryScope.cs +27 -0
- package/src/Revit/Tools/ElementTraits.cs +53 -0
- package/src/Revit/Tools/ExecuteCsharp.cs +26 -7
- package/src/Revit/Tools/ExportDocuments.cs +9 -0
- package/src/Revit/Tools/FailureGuard.cs +26 -26
- package/src/Revit/Tools/GetElementDetails.cs +28 -2
- package/src/Revit/Tools/GetElementRelationships.cs +82 -0
- package/src/Revit/Tools/GetElementTypes.cs +8 -0
- package/src/Revit/Tools/GetElements.cs +58 -55
- package/src/Revit/Tools/GetLinkedElements.cs +89 -0
- package/src/Revit/Tools/GetLinkedModels.cs +73 -0
- package/src/Revit/Tools/GetModelCoordinates.cs +56 -0
- package/src/Revit/Tools/GetModelHealth.cs +7 -0
- package/src/Revit/Tools/GetModelOverview.cs +187 -160
- package/src/Revit/Tools/GetScheduleFields.cs +44 -0
- package/src/Revit/Tools/GetSchedules.cs +96 -0
- package/src/Revit/Tools/InheritedState.Summary.cs +57 -0
- package/src/Revit/Tools/InheritedState.cs +144 -0
- package/src/Revit/Tools/ManageElementSets.cs +114 -0
- package/src/Revit/Tools/ManageSchedules.cs +174 -0
- package/src/Revit/Tools/ManageSelection.cs +9 -0
- package/src/Revit/Tools/ManageSheetPlacements.cs +113 -0
- package/src/Revit/Tools/ManageSheets.cs +72 -0
- package/src/Revit/Tools/ManageViews.cs +115 -0
- package/src/Revit/Tools/MeasureGeometry.cs +60 -0
- package/src/Revit/Tools/ModelChanges.cs +154 -0
- package/src/Revit/Tools/ModelEditBatch.cs +105 -0
- package/src/Revit/Tools/ModelEditInputs.cs +49 -0
- package/src/Revit/Tools/OpenView.cs +8 -0
- package/src/Revit/Tools/ParameterResolver.cs +94 -0
- package/src/Revit/Tools/QuerySpatialElements.cs +70 -0
- package/src/Revit/Tools/SearchApiDocs.cs +72 -4
- package/src/Revit/Tools/SetParameters.cs +50 -119
- package/src/Revit/Tools/SpatialBounds.cs +30 -0
- package/src/Revit/Tools/SummarizeElements.cs +94 -0
- package/src/Revit/Tools/ToolContract.cs +48 -0
- package/src/Revit/Tools/ToolSupport.cs +4 -0
- package/src/Revit/Tools/TransformElements.cs +73 -0
- package/workspace/AGENTS.md +54 -48
package/AGENTS.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Contributing to PI-Revit
|
|
2
|
+
|
|
3
|
+
This file guides agents changing **this source repository**. Start with
|
|
4
|
+
[the architecture](docs/architecture.md) for resource ownership and discovery,
|
|
5
|
+
and [evaluation](docs/evaluation.md) for evidence and validation limits.
|
|
6
|
+
Follow the user's requested scope; an investigation does not authorize implementation,
|
|
7
|
+
and a source change does not by itself authorize installation, deployment, publication,
|
|
8
|
+
or changes to a live Revit model.
|
|
9
|
+
|
|
10
|
+
## Two different AGENTS files
|
|
11
|
+
|
|
12
|
+
- **This file:** contributor instructions, repository structure, and checks.
|
|
13
|
+
- **[workspace/AGENTS.md](workspace/AGENTS.md):** template copied into the user's
|
|
14
|
+
Revit working folder by setup. It owns model output locations and local session
|
|
15
|
+
conventions. It is not the contributor guide or the complete tool manual.
|
|
16
|
+
|
|
17
|
+
Pi's global/project instruction scope is separate from resource type. A skill is
|
|
18
|
+
a task-specific entry with optional references; a tool is executable behavior;
|
|
19
|
+
a package distributes them. Do not turn every manual into a separate skill or
|
|
20
|
+
copy all operational guidance into workspace instructions.
|
|
21
|
+
|
|
22
|
+
## Where a change belongs
|
|
23
|
+
|
|
24
|
+
Fix a class of problem where every present and future resource inherits the fix: in a
|
|
25
|
+
shared mechanism, in declared metadata, or in the platform section. A sentence in one
|
|
26
|
+
manual is never the only fix. Each rule has one owner.
|
|
27
|
+
|
|
28
|
+
| Change | Primary owner | Update alongside it |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| Revit operation, inputs, outputs, effects | `src/Revit/Tools/<Tool>.cs` | `ToolRegistry.cs`, manual, focused C# tests |
|
|
31
|
+
| A tool's contract: keywords, limits with alternatives, verification | the tool's `Keywords`/`Limits`/`Verification` (bridge) or `extensions/pi-revit/contracts.ts` (native) | `npm run generate:contracts`; discovery corpus entries |
|
|
32
|
+
| Parameter lookup by name, BuiltInParameter or GUID | `src/Revit/Tools/ParameterResolver.cs`, the only resolver | element-query tests; never `LookupParameter` in a tool |
|
|
33
|
+
| Special or system-owned objects (revision schedules, templates, groups, design options) | `src/Revit/Tools/ElementTraits.cs` | element-traits tests; flag or count, never mix silently |
|
|
34
|
+
| State an object inherits when created from an existing one (duplicate, copy, mirror, retype) | `src/Revit/Tools/InheritedState.cs` (reading) and `InheritedState.Summary.cs` (pure summary) | derived-state tests; the gate requires it wherever a tool duplicates, copies or retypes |
|
|
35
|
+
| Assigning a name or sheet number; name collisions | `src/Revit/Tools/ElementNames.cs`, the only place a tool assigns them | the gate rejects any other `Name`/`SheetNumber` assignment |
|
|
36
|
+
| What a call changed in the model (`model_changes`) | `src/Revit/Tools/ModelChanges.cs` and `ChangeSet.cs`, attached once by the dispatcher in `BridgeServer.cs` | derived-state tests; never report changes per tool |
|
|
37
|
+
| Shared document identity/transaction rules | `src/Revit/Tools/DocumentGuard.cs`, `ModelEditBatch.cs`, related helpers | guard/transaction tests; execution and recovery references |
|
|
38
|
+
| HTTP, queueing, receipt retention | `src/Revit/BridgeServer.cs`, `CommandQueue.cs`, `OperationStore.cs` | receipt/result tests and recovery reference |
|
|
39
|
+
| Cross-cutting protocol (capability, scope/completion, evidence, identity, language) | `extensions/pi-revit/platform-prompt.ts`, stated once for all tools | platform tests; never repeat it per tool or per manual |
|
|
40
|
+
| Completion/loop steering | `extensions/pi-revit/completion-monitor.ts` (metadata-driven) | platform tests; the `modify-*` evaluation scenarios |
|
|
41
|
+
| Objects that predate the request; per-request created-object ledger | `extensions/pi-revit/scope-monitor.ts` (reads `model_changes` and `name_collision`) | scope-monitor tests; the `modify-name-collision` scenario |
|
|
42
|
+
| Pi registration, result presentation, retries | `extensions/pi-revit/index.ts`, `tool-schema.ts` | extension tests and affected manuals |
|
|
43
|
+
| Instance routing | `extensions/pi-revit/instance-router.ts` | instance-router tests and instance manual |
|
|
44
|
+
| Discovery matching and ranking | `extensions/pi-revit/discovery.ts`, `tool-catalog.ts` | `tests/discovery/corpus.json` (recall gate) and catalogue tests |
|
|
45
|
+
| Documentation index, groups, guidance resources | `skills/pi-revit/tool-manifest.json` | regenerate; corpus entry for each new workflow |
|
|
46
|
+
| A "never" or "must" rule | `docs/invariants.json` plus an `<!-- inv:<id> -->` tag on the sentence | a code test, or, only for agent intent, an `agent-eval` scenario |
|
|
47
|
+
| Agent behavior worth measuring | `tests/agent-eval/scenarios.json` | invariants it protects; live runs on a disposable fixture |
|
|
48
|
+
| Reusable script library | `extensions/pi-revit/script-library.ts` | script-library tests and manual |
|
|
49
|
+
| Cross-tool operating rule | `skills/pi-revit/references/` | short entry link only if needed on every task |
|
|
50
|
+
| One public tool's usage | hand-written part of `skills/pi-revit/references/tools/<public_name>.md` | executable examples; the Contract block is generated |
|
|
51
|
+
| A multi-tool task recipe | workflow reference under `skills/pi-revit/references/` | manifest guidance entry, corpus entry and task-based evaluation |
|
|
52
|
+
| Revit subject knowledge | a scoped future `skills/revit-<subject>/SKILL.md` and references | official Autodesk sources and version; discovered automatically; add corpus and routing evaluation |
|
|
53
|
+
| API signatures | existing `search_api_docs` implementation and live version's documentation | search tests; do not maintain a parallel copied API catalogue |
|
|
54
|
+
| Installation or output-folder convention | `scripts/`, `bin/pi-revit.js`, `workspace/AGENTS.md` | README and installer tests |
|
|
55
|
+
|
|
56
|
+
Generated artifacts are never edited by hand: `skills/pi-revit/contracts.generated.json`,
|
|
57
|
+
each manual's `Contract (generated)` block and the tool-index tables. Change the code or
|
|
58
|
+
manifest and run `npm run generate:contracts`; `npm run test:docs` fails when they are stale.
|
|
59
|
+
|
|
60
|
+
Tool vocabulary is English. There are no per-language rules: the model translates a
|
|
61
|
+
request into English search words, replies in the user's language, and reads localized
|
|
62
|
+
Revit names from results. Prefer exact identities (BuiltInParameter, GUID) over display names.
|
|
63
|
+
|
|
64
|
+
The future subject library is an extension point, not an already implemented
|
|
65
|
+
library. Keep one package until independent ownership or releases justify another.
|
|
66
|
+
Names in the table are repository-relative paths, not files to create indiscriminately.
|
|
67
|
+
|
|
68
|
+
## Adding or changing a public tool
|
|
69
|
+
|
|
70
|
+
1. Decide whether it belongs in the Revit bridge or the Pi extension. A bridge
|
|
71
|
+
`ITool` implements metadata/schema and execution, and is registered in
|
|
72
|
+
`src/Revit/ToolRegistry.cs`. Set `Write`, `Effects`, `RequiresDocument` and tier to
|
|
73
|
+
match real behavior. `write: false` does not mean no UI/file effects. Tools with
|
|
74
|
+
`RequiresDocument: false` run off the API thread with no Revit context; do not
|
|
75
|
+
access the Revit API there.
|
|
76
|
+
2. Declare the contract. `Keywords` holds at least 3 English task words, outcome words
|
|
77
|
+
and synonyms. Every `Limits` entry names what the tool does not cover and an
|
|
78
|
+
alternative: another `tool`, `api` members (checked against the installed
|
|
79
|
+
RevitAPI.xml), a `user` action, or `revit_unsupported` with its evidence. A tool
|
|
80
|
+
that writes or has effects declares `Verification`. Prompt guidelines hold only
|
|
81
|
+
tool-specific facts; identity, manual location, capability and completion rules
|
|
82
|
+
live once in the platform section.
|
|
83
|
+
3. Use the shared primitives: `ParameterResolver` for any parameter reference,
|
|
84
|
+
`ElementTraits` for special objects, `ModelEditBatch` for edits, `InheritedState` for
|
|
85
|
+
anything created from an existing object, and `ElementNames` for names and sheet numbers.
|
|
86
|
+
The dispatcher reports `model_changes` for every write tool; do not add a private variant. Preserve enforced
|
|
87
|
+
safeguards. The public bridge contract is the class schema plus registry-added
|
|
88
|
+
`expected_document_id` and extension-added `_operation_id`. Never weaken identity
|
|
89
|
+
guards or receipt routing to make an example pass.
|
|
90
|
+
4. Add the manifest entry (name, source, group, summary) and a manual under
|
|
91
|
+
`references/tools/`. Run `npm run generate:contracts`, which writes the manual's
|
|
92
|
+
Contract block and the tool index. Write the hand part against the final schema
|
|
93
|
+
and actual execution: purpose/preconditions, action differences, effects/identity,
|
|
94
|
+
units/coordinates, result interpretation, recovery and verification. Include at
|
|
95
|
+
least one valid JSON input example and a source pointer. Label example IDs as
|
|
96
|
+
placeholders to discover. A native tool also needs its `NATIVE_CONTRACTS` entry; the
|
|
97
|
+
manifest's native entries reserve its name against bridge descriptors.
|
|
98
|
+
5. Add at least 5 English task phrasings to `tests/discovery/corpus.json`. Register
|
|
99
|
+
any new "never" or "must" rule in `docs/invariants.json` with its test. Add or extend
|
|
100
|
+
an `agent-eval` scenario when the tool changes what the agent can do.
|
|
101
|
+
6. Update `documentation_revision` whenever guidance changes. Compatibility with a
|
|
102
|
+
bridge is the per-tool contract hash (input schema and effects, without wording).
|
|
103
|
+
Do not bump the package release or redeploy unless part of the task.
|
|
104
|
+
7. Run the checks below. Include defaults, rejected inputs, state transitions,
|
|
105
|
+
partial/rollback results and caller-visible outcomes where meaningful. Update the
|
|
106
|
+
README/change log for user-visible behavior. Report live checks separately from
|
|
107
|
+
offline checks.
|
|
108
|
+
|
|
109
|
+
## Maintaining skills and workflows
|
|
110
|
+
|
|
111
|
+
- Keep `skills/pi-revit/SKILL.md` a concise task router with essential cross-tool
|
|
112
|
+
rules. Put detail in linked references. Large collections of tool names do not
|
|
113
|
+
belong in its description. Tools/manuals can also be discovered without loading
|
|
114
|
+
this skill; do not assume the model will always select it.
|
|
115
|
+
- Every workflow distinguishes explanation/planning, inspection, and modification
|
|
116
|
+
or deliverable creation. Do not make an ordinary question open/edit/export a model.
|
|
117
|
+
- Add subject skills only for independently meaningful Revit tasks. Their references
|
|
118
|
+
own modeling concepts, constraints and cited Autodesk Help knowledge, while tool
|
|
119
|
+
manuals own our integration contract. Link between them; do not duplicate both.
|
|
120
|
+
- Put project-specific standards in the user's project context. Source-wide rules
|
|
121
|
+
belong here, and runtime output conventions belong in the workspace template.
|
|
122
|
+
- Keep uncertainty explicit: a supported preview can validate then roll back;
|
|
123
|
+
preview IDs are temporary; a timeout is not cancellation; a commit is not a save.
|
|
124
|
+
Link to recovery/verification instructions instead of inventing another policy.
|
|
125
|
+
|
|
126
|
+
## Validation and completion
|
|
127
|
+
|
|
128
|
+
Run these from the repository root, using Node and .NET 8 SDK or newer. Point
|
|
129
|
+
`PI_CODING_AGENT_PATH` to an installed Pi package containing its `jiti` and
|
|
130
|
+
`typebox` dependencies when they are not locally resolvable. Current extension
|
|
131
|
+
fixtures require this variable; the path below is an example, not a fixed location.
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
$env:PI_CODING_AGENT_PATH = 'C:\path\to\node_modules\@earendil-works\pi-coding-agent'
|
|
135
|
+
npm.cmd run generate:contracts
|
|
136
|
+
npm.cmd run test:docs
|
|
137
|
+
npm.cmd run test:extension
|
|
138
|
+
dotnet run --project tests/document-identity/document-identity-tests.csproj
|
|
139
|
+
dotnet run --project tests/element-query-regressions/element-query-regressions.csproj
|
|
140
|
+
dotnet run --project tests/element-traits/element-traits-tests.csproj
|
|
141
|
+
dotnet run --project tests/derived-state/derived-state-tests.csproj
|
|
142
|
+
git diff --check
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`test:docs` checks actual registered input schemas and source-derived bridge
|
|
146
|
+
metadata without running Revit operations. It also checks that generated artifacts are
|
|
147
|
+
current, that contracts are valid with resolvable alternatives, and that the invariant
|
|
148
|
+
register and its tests agree. It enforces discovery-corpus recall, the startup prompt
|
|
149
|
+
budget and the architecture rules (no model saves, one parameter resolver, special
|
|
150
|
+
objects classified, inherited state reported for created-from-existing objects, names assigned
|
|
151
|
+
through `ElementNames`, model changes attached by the dispatcher). `test:extension` uses isolated mock
|
|
152
|
+
discovery and intercepted HTTP. Neither establishes live API behavior, successful
|
|
153
|
+
drawings, agent instruction adherence, or performance improvement.
|
|
154
|
+
|
|
155
|
+
Use the relevant existing suites for changed components: `tests/model-edit-batch`,
|
|
156
|
+
`transaction-export`, `operation-store`, `element-query-regressions`, `element-traits`, `derived-state`,
|
|
157
|
+
`linked-geometry`, `schedule-fields`, `search-engine`, and `installer` each document
|
|
158
|
+
their scope. Agent behavior is measured with `tests/agent-eval` on a disposable fixture
|
|
159
|
+
(see its README); it never runs as an incidental check. A full bridge build requires matching Revit SDK assemblies; build
|
|
160
|
+
using `scripts/build.ps1`, not deployment, when compilation alone is requested.
|
|
161
|
+
Do not install dependencies, publish a release, modify a live model or deploy an
|
|
162
|
+
add-in as an incidental documentation check.
|
|
163
|
+
|
|
164
|
+
Before completion review the diff, run appropriate checks, and explain what
|
|
165
|
+
changed, why, and what was actually tested. For model-affecting changes, include
|
|
166
|
+
live verification only when performed within the requested scope. See the
|
|
167
|
+
evaluation guide before claiming faster, cheaper, or more reliable agent behavior.
|
package/CHANGELOG.md
CHANGED
|
@@ -5,48 +5,120 @@ Format follows [Keep a Changelog](https://keepachangelog.com/); version headers
|
|
|
5
5
|
`## [x.y.z] - YYYY-MM-DD` so tooling (and Pi's changelog parser format) can read them.
|
|
6
6
|
|
|
7
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.
|
|
11
|
-
|
|
12
|
-
###
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- `
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
|
50
122
|
|
|
51
123
|
### Fixed
|
|
52
124
|
- When pi starts before Revit and the background rediscovery timer (rather than a `ping`
|