pi-revit 0.2.2 → 0.2.4

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/CHANGELOG.md ADDED
@@ -0,0 +1,87 @@
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.2.4] - 2026-07-20
11
+
12
+ ### Added
13
+ - This changelog. It ships inside the npm package and gets a `## [x.y.z]` entry with
14
+ **Added / Changed / Fixed** sections for every release, so updates report what actually
15
+ changed instead of just a version number.
16
+
17
+ ## [0.2.3] - 2026-07-20
18
+
19
+ ### Changed
20
+ - `search_api_docs`: results with the same short name in different namespaces are now
21
+ disambiguated with their full namespace, so `Category` vs internal schedule types
22
+ can't be confused.
23
+
24
+ ### Fixed
25
+ - Removed a hardcoded example from the overload note that could mislead the model into
26
+ copying a signature that didn't apply.
27
+
28
+ ## [0.2.2] - 2026-07-20
29
+
30
+ ### Added
31
+ - `search_api_docs`: exception documentation ("Throws:") is now shown for matched members.
32
+ - Overload-targeted queries: a query containing `(` matches against rendered signatures.
33
+
34
+ ### Changed
35
+ - Overloads now rank simplest-first (fewest parameters), so the common form appears on top.
36
+
37
+ ## [0.2.1] - 2026-07-16
38
+
39
+ ### Added
40
+ - Extension/add-in version handshake: `ping` reports both versions and warns when the
41
+ npm extension and the installed Revit add-in are out of sync (partial-update detection).
42
+
43
+ ## [0.2.0] - 2026-07-15
44
+
45
+ ### Changed
46
+ - SKILL.md: documents the top-match inline docs behaviour and the automatic
47
+ `Models\<title>\exports` output location so the agent uses them without prompting.
48
+
49
+ ## [0.1.9] - 2026-07-15
50
+
51
+ ### Added
52
+ - `search_api_docs` indexes every Revit API enum and surfaces `<remarks>` documentation.
53
+
54
+ ### Changed
55
+ - The top match's full documentation is placed directly in the tool's text output
56
+ (where model attention is strongest) instead of only in the structured payload.
57
+
58
+ ## [0.1.8] - 2026-07-13
59
+
60
+ ### Added
61
+ - Automatic per-model output sorting: exports, captures, and scripts land under
62
+ `Models\<model title>\` in the workspace, keyed to the source document.
63
+
64
+ ## [0.1.7] - 2026-07-13
65
+
66
+ ### Fixed
67
+ - npm-install uninstall flow no longer blocks itself on its own installation folder.
68
+
69
+ ## [0.1.6] - 2026-07-13
70
+
71
+ ### Changed
72
+ - The global launcher installs next to the user's permanent pi under npx.
73
+
74
+ ## [0.1.5] - 2026-07-13
75
+
76
+ ### Fixed
77
+ - Uninstall of the npm-installed Pi package.
78
+ - Workspace paths containing non-ASCII characters.
79
+
80
+ First version published to npm.
81
+
82
+ ## [0.1.0] - 2026-06-17
83
+
84
+ Initial public release: Revit bridge add-in (Revit 2025/2026/2027) plus Pi extension with
85
+ `ping`, `get_model_overview`, `get_elements`, `get_element_details`, `set_parameters`,
86
+ `manage_selection`, `capture_view`, `export_documents`, `execute_csharp`, and
87
+ `search_api_docs`.
package/package.json CHANGED
@@ -1,55 +1,56 @@
1
- {
2
- "name": "pi-revit",
3
- "version": "0.2.2",
4
- "description": "Native Pi connector for Autodesk Revit. Run npx.cmd -y pi-revit for the full Windows install.",
5
- "author": "Ahmad Altahlawi",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/Triavision-ai/pi-revit.git"
10
- },
11
- "bugs": {
12
- "url": "https://github.com/Triavision-ai/pi-revit/issues"
13
- },
14
- "homepage": "https://github.com/Triavision-ai/pi-revit#readme",
15
- "keywords": [
16
- "pi-package",
17
- "pi-extension",
18
- "revit",
19
- "bim",
20
- "autodesk",
21
- "revit-api"
22
- ],
23
- "bin": {
24
- "pi-revit": "bin/pi-revit.js"
25
- },
26
- "scripts": {
27
- "deploy": "powershell -ExecutionPolicy Bypass -File scripts/deploy.ps1",
28
- "setup": "powershell -ExecutionPolicy Bypass -File scripts/setup-workspace.ps1",
29
- "uninstall:revit": "powershell -ExecutionPolicy Bypass -File scripts/uninstall.ps1"
30
- },
31
- "files": [
32
- "bin/",
33
- "extensions/",
34
- "skills/",
35
- "scripts/",
36
- "src/",
37
- "workspace/",
38
- "README.md"
39
- ],
40
- "pi": {
41
- "extensions": [
42
- "./extensions/pi-revit/index.ts"
43
- ],
44
- "skills": [
45
- "./skills"
46
- ]
47
- },
48
- "engines": {
49
- "node": ">=20.3"
50
- },
51
- "peerDependencies": {
52
- "@earendil-works/pi-coding-agent": "*",
53
- "typebox": "*"
54
- }
55
- }
1
+ {
2
+ "name": "pi-revit",
3
+ "version": "0.2.4",
4
+ "description": "Native Pi connector for Autodesk Revit. Run npx.cmd -y pi-revit for the full Windows install.",
5
+ "author": "Ahmad Altahlawi",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Triavision-ai/pi-revit.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/Triavision-ai/pi-revit/issues"
13
+ },
14
+ "homepage": "https://github.com/Triavision-ai/pi-revit#readme",
15
+ "keywords": [
16
+ "pi-package",
17
+ "pi-extension",
18
+ "revit",
19
+ "bim",
20
+ "autodesk",
21
+ "revit-api"
22
+ ],
23
+ "bin": {
24
+ "pi-revit": "bin/pi-revit.js"
25
+ },
26
+ "scripts": {
27
+ "deploy": "powershell -ExecutionPolicy Bypass -File scripts/deploy.ps1",
28
+ "setup": "powershell -ExecutionPolicy Bypass -File scripts/setup-workspace.ps1",
29
+ "uninstall:revit": "powershell -ExecutionPolicy Bypass -File scripts/uninstall.ps1"
30
+ },
31
+ "files": [
32
+ "bin/",
33
+ "extensions/",
34
+ "skills/",
35
+ "scripts/",
36
+ "src/",
37
+ "workspace/",
38
+ "README.md",
39
+ "CHANGELOG.md"
40
+ ],
41
+ "pi": {
42
+ "extensions": [
43
+ "./extensions/pi-revit/index.ts"
44
+ ],
45
+ "skills": [
46
+ "./skills"
47
+ ]
48
+ },
49
+ "engines": {
50
+ "node": ">=20.3"
51
+ },
52
+ "peerDependencies": {
53
+ "@earendil-works/pi-coding-agent": "*",
54
+ "typebox": "*"
55
+ }
56
+ }
@@ -183,10 +183,22 @@ namespace RevitBridge.Tools
183
183
  else
184
184
  {
185
185
  markdown.Append(total == top.Count ? $"{total} match(es)." : $"top {top.Count} of {total} matches.");
186
+
187
+ // Same-named members from different namespaces (XYZ exists in
188
+ // Autodesk.Revit.DB and in helper namespaces) render identical
189
+ // signatures; disambiguate those lines with their full container path.
190
+ var ambiguous = top
191
+ .GroupBy(member => member.Signature, StringComparer.Ordinal)
192
+ .Where(group => group.Count() > 1)
193
+ .Select(group => group.Key)
194
+ .ToHashSet(StringComparer.Ordinal);
195
+
186
196
  for (int i = 0; i < top.Count; i++)
187
197
  {
188
198
  var member = top[i];
189
199
  string origin = member.Since is null ? member.Assembly : $"{member.Assembly}, since {member.Since}";
200
+ if (ambiguous.Contains(member.Signature))
201
+ origin += $", in {ContainingPath(member)}";
190
202
  string line = $"\n{i + 1}. **{member.Signature}** — {KindLabel(member)} ({origin}) — {FirstSentence(member.Summary) ?? "(no summary)"}";
191
203
  if (markdown.Length + line.Length > MaxMarkdownChars)
192
204
  {
@@ -220,7 +232,14 @@ namespace RevitBridge.Tools
220
232
  if (member.Exceptions is { Count: > 0 } exceptions)
221
233
  lines.Add($"\n throws: {string.Join("; ", exceptions.Select(pair => $"{pair.Key} — {Cap(pair.Value, MaxParamDocChars)}"))}");
222
234
  if (overloadCount > 1)
223
- lines.Add($"\n note: {member.Composite} has {overloadCount} overload(s) listed; full docs shown for the simplest top-ranked one. To target another, continue the query past a parenthesis with parameter types, e.g. '{member.Composite}(Document, '.");
235
+ {
236
+ // The targeting example must be the query form the signature matcher
237
+ // actually accepts, so it is cut from the displayed signature itself —
238
+ // 'new XYZ(' for constructors, 'Wall.Create(' for methods.
239
+ int paren = member.Signature.IndexOf('(');
240
+ string example = paren >= 0 ? member.Signature[..(paren + 1)] : member.Composite + "(";
241
+ lines.Add($"\n note: {member.Composite} has {overloadCount} overload(s) listed; full docs shown for the simplest top-ranked one. To target another, continue the query past a parenthesis with its parameter types, e.g. '{example}'.");
242
+ }
224
243
  foreach (string line in lines)
225
244
  {
226
245
  if (markdown.Length + line.Length > MaxMarkdownChars)
@@ -229,6 +248,16 @@ namespace RevitBridge.Tools
229
248
  }
230
249
  }
231
250
 
251
+ /// <summary>Namespace-qualified container for disambiguating display lines:
252
+ /// the type itself for types, the declaring type's full path for members.</summary>
253
+ private static string ContainingPath(ApiMember member)
254
+ {
255
+ if (member.Kind == 'T')
256
+ return member.FullName;
257
+ int dot = member.FullName.LastIndexOf('.');
258
+ return dot > 0 ? member.FullName[..dot] : member.FullName;
259
+ }
260
+
232
261
  private static string KindLabel(ApiMember member) => member.IsConstructor ? "constructor" : member.Kind switch
233
262
  {
234
263
  'T' => "type",