@thatopen/services 0.3.11 → 0.3.13

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 (38) hide show
  1. package/dist/cli/commands/revit.d.ts +9 -0
  2. package/dist/cli/lib/revit-addin.d.ts +20 -0
  3. package/dist/cli.js +128 -0
  4. package/dist/cloud/LasToPotree.d.ts +59 -0
  5. package/dist/cloud/SplatToFq.d.ts +38 -0
  6. package/dist/cloud/index.d.ts +2 -0
  7. package/docs/builtin/paths.json +86 -86
  8. package/docs/cloud/GaussianSplatConverter.md +43 -0
  9. package/docs/cloud/PointCloudConverter.md +53 -0
  10. package/docs/revit-collab-quickstart.md +205 -0
  11. package/package.json +95 -95
  12. package/src/built-in/ClashesManager/example.ts +283 -283
  13. package/src/built-in/UIManager/src/clashes-panel/example.ts +160 -160
  14. package/src/built-in/UIManager/src/models-list/example.ts +122 -118
  15. package/src/cli/templates/app/package.json +33 -33
  16. package/src/cli/templates/app/src/setups/camera-tools.ts +0 -63
  17. package/src/cli/templates/app/src/setups/camera-views.ts +0 -201
  18. package/src/cli/templates/app/src/setups/card-header.ts +0 -35
  19. package/src/cli/templates/app/src/setups/clipper-tool.ts +0 -773
  20. package/src/cli/templates/app/src/setups/clipper.ts +0 -75
  21. package/src/cli/templates/app/src/setups/cloud-runner.ts +0 -13
  22. package/src/cli/templates/app/src/setups/exploded-view.ts +0 -246
  23. package/src/cli/templates/app/src/setups/helper-panel.ts +0 -88
  24. package/src/cli/templates/app/src/setups/hider.ts +0 -98
  25. package/src/cli/templates/app/src/setups/index.ts +0 -23
  26. package/src/cli/templates/app/src/setups/inspection.ts +0 -136
  27. package/src/cli/templates/app/src/setups/measurement-panel.ts +0 -188
  28. package/src/cli/templates/app/src/setups/measurement-tool.ts +0 -588
  29. package/src/cli/templates/app/src/setups/measurements.ts +0 -133
  30. package/src/cli/templates/app/src/setups/navigation-gizmo.ts +0 -316
  31. package/src/cli/templates/app/src/setups/plans-panel.ts +0 -619
  32. package/src/cli/templates/app/src/setups/right-sidebar.ts +0 -178
  33. package/src/cli/templates/app/src/setups/styles-panel.ts +0 -110
  34. package/src/cli/templates/app/src/setups/styles.ts +0 -375
  35. package/src/cli/templates/app/src/setups/tool-mode-manager.ts +0 -156
  36. package/src/cli/templates/app/src/setups/tool-mode.ts +0 -23
  37. package/src/cli/templates/app/src/setups/toolbar.ts +0 -229
  38. package/src/cli/templates/app/src/setups/ui-manager.ts +0 -27
@@ -0,0 +1,205 @@
1
+ # That Open — Revit Collaboration Quickstart (for AI assistants)
2
+
3
+ You are an AI assistant. A user pointed you at this guide so you can set up or join
4
+ **real‑time Revit collaboration** through the That Open platform. Follow the steps **in
5
+ order**. Ask the user for anything you don't already have. **You may run the setup commands
6
+ yourself** (install the CLI, install the add‑in, launch Revit) — do it, don't just tell the
7
+ user to, *except* where a step says only the user can. Everything is driven by the
8
+ `thatopen` CLI.
9
+
10
+ ## What this does
11
+ Multiple people work on **one shared Revit central model** using Revit's native
12
+ worksharing. The central lives on the That Open platform. Each person has their own local;
13
+ when they **sync**, their changes go up and their teammates' come down. All syncs are
14
+ **queued**, so the central never conflicts or diverges.
15
+
16
+ ## Rules (follow throughout)
17
+ - **Never** print, echo, store, or commit the user's access token.
18
+ - **Ask, don't assume.** Missing a project id, file path, or central name? Ask first.
19
+ - **Use only the `thatopen` CLI** for platform actions. Don't call HTTP APIs by hand.
20
+ - You may **install software and launch Revit** on the user's machine — briefly tell the
21
+ user what you're about to run before you run it.
22
+ - After each command, **check the output** before moving on.
23
+
24
+ ---
25
+
26
+ ## Step 0 — Ask what the user wants to do
27
+ Ask the user:
28
+ > "What would you like to do?
29
+ > (A) **Share** a Revit model with my team for the first time.
30
+ > (B) **Connect** to a shared central a teammate already uploaded.
31
+ > (C) I **already have my local open** in Revit — just sync it."
32
+
33
+ Then collect the inputs for their choice (ask now — you'll need them below):
34
+
35
+ - **(A) Share:** the **absolute path** to the `.rvt` to share, and a short lowercase
36
+ **name** for the shared central (e.g. `tower-central`). Also the platform **Project ID**
37
+ (see below). The file may or may not already be a workshared central — you'll check that
38
+ in Step 3; either way **the user's original file is never modified** (a copy is uploaded).
39
+
40
+ - **(B) Connect:** ask the user to identify the existing central by **one** of:
41
+ - the **project folder id** of the central — the `revit-<name>` folder inside the
42
+ project's `bimterop` folder in the That Open dashboard (copy its id from the folder), **or**
43
+ - the **local path** to the shared central on their PC, if they already have it
44
+ (looks like `C:\ThatOpenShared\<project>\<name>\<file>.rvt`).
45
+
46
+ (If they already have their local *open* in Revit, that's really case **(C)** — just sync.)
47
+
48
+ - **(A) — Project ID:** find it in the That Open dashboard — open the project; the ID is in
49
+ the project settings and the project URL. The user's token (Step 2) must belong to an
50
+ account with access to this project, or platform calls fail with **403** (see
51
+ Troubleshooting). For **(B)** the folder id / local path already encodes the project, so
52
+ you don't need to ask the Project ID separately.
53
+
54
+ - **(C):** nothing extra — Revit must have their local open.
55
+
56
+ Do **not** ask for the access token yet (that's Step 2).
57
+
58
+ ---
59
+
60
+ ## Step 1 — Make sure the tools are ready (do this yourself)
61
+ 1. **CLI.** Run:
62
+ ```
63
+ npm install -g @thatopen/services@latest
64
+ ```
65
+ Verify `thatopen --version` prints a version. (Needs Node.js 18+; if `node -v` fails,
66
+ ask the user to install Node.js, then continue.)
67
+
68
+ 2. **Revit + add‑in.** Run:
69
+ ```
70
+ thatopen revit status
71
+ ```
72
+ - Prints `"loaded": true` → the add‑in is running. Go to **Step 2**.
73
+ - Errors **"The That Open Revit add‑in is not running"** → work through (a) then (b):
74
+
75
+ **(a) Is Revit 2026 open?** If not, launch it (Windows):
76
+ ```
77
+ powershell -Command "Start-Process 'C:\Program Files\Autodesk\Revit 2026\Revit.exe'"
78
+ ```
79
+ Cold start can take 1–3 minutes. Wait, then re‑run `thatopen revit status`. If it now
80
+ says `"loaded": true`, go to Step 2.
81
+
82
+ **(b) Revit is open but status still errors → the add‑in isn't installed. Install it:**
83
+ - The add‑in files ship in **this same folder** as this guide (`install.ps1`,
84
+ `Bt3Addin.dll`, `Bt3Core.dll`, `bt3.addin`). From this folder, run:
85
+ ```
86
+ powershell -ExecutionPolicy Bypass -File install.ps1
87
+ ```
88
+ *(If you don't have those files, download the plugin zip here, unzip it, then run
89
+ `install.ps1` from the unzipped folder:
90
+ https://drive.google.com/file/d/1HL_Ti7N_qN0Q-X7vNYOQst3yEgIY-xXO/view?usp=drive_link )*
91
+ - **Restart Revit** so it loads the add‑in: close Revit, then launch it again with the
92
+ `Start-Process` command above.
93
+ - On the first launch after installing, Revit shows an **"unsigned add‑in"** prompt.
94
+ **Only the user can click it — ask them to choose "Always Load".**
95
+ - Re‑run `thatopen revit status` every ~10s until it prints `"loaded": true`.
96
+
97
+ ---
98
+
99
+ ## Step 2 — Log in
100
+ The user needs a personal **access token** from the That Open platform. Ask them for it and
101
+ tell them exactly where to get it:
102
+
103
+ > "To log in I need your That Open **access token**. To create one:
104
+ > 1. Open your That Open dashboard in a browser — **production:** https://platform.thatopen.com
105
+ > · **dev:** https://dev.platform.thatopen.com (use the one that matches your team).
106
+ > 2. Go to **Data → API Tokens**.
107
+ > 3. Click **Create a new token** and **copy** it.
108
+ > 4. Paste it here."
109
+
110
+ **Never print, echo, or store the token.** Once the user pastes it, run:
111
+ ```
112
+ thatopen login --token <TOKEN>
113
+ ```
114
+ - **Production is the default.** For the **dev** environment, also add:
115
+ `--api-url https://dev.platform.thatopen.com`
116
+ - Success prints `Logged in successfully…`. If it fails with **"Unauthorized"**, the token
117
+ is invalid or for the other environment — see **Troubleshooting**, then ask for a fresh
118
+ token and retry.
119
+
120
+ ---
121
+
122
+ ## Step 3 — Do the action
123
+
124
+ ### (A) Share a model — `inspect`, then `publish-central`
125
+ First check whether the file is already a workshared central:
126
+ ```
127
+ thatopen revit inspect --file "<FILE>"
128
+ ```
129
+ - **`"isCentral": true`** → it's already a central. Tell the user: *"This is already a
130
+ central; I'll upload a copy to the shared location — your original file won't be touched."*
131
+ Then publish (no `--convert` needed):
132
+ ```
133
+ thatopen revit publish-central --project <PROJECT> --doc <DOC> --file "<FILE>"
134
+ ```
135
+ - **`"isCentral": false`** → it's a plain model. **Tell the user and ask for consent:**
136
+ *"This file isn't a shared central yet. To share it I need to turn it into one. I'll do
137
+ that on a COPY, so your original file stays exactly as it is. Shall I go ahead?"*
138
+ Only after the user agrees, publish **with `--convert`**:
139
+ ```
140
+ thatopen revit publish-central --project <PROJECT> --doc <DOC> --file "<FILE>" --convert
141
+ ```
142
+
143
+ `<DOC>` is the short central name from Step 0; `<FILE>` is the `.rvt` path. Publishing saves
144
+ the central at the shared canonical location, uploads it, and opens **your** local in Revit
145
+ (takes a bit). Success: `Published (…). Central: … (version N). Your original file was not
146
+ modified.` Tell teammates to connect with the **project folder id** shown in the dashboard,
147
+ or with `thatopen revit join --project <PROJECT> --doc <DOC>`.
148
+
149
+ > If you skip `inspect` and the file isn't a central, `publish-central` will refuse with a
150
+ > message telling you to re-run with `--convert` — still ask the user first.
151
+
152
+ ### (B) Connect to a central — `join`
153
+ Use whichever identifier the user gave you in Step 0:
154
+ ```
155
+ thatopen revit join --folder-id <FOLDER_ID> # the revit-<name> folder id in the project
156
+ thatopen revit join --path "<C:\ThatOpenShared\...\central.rvt>" # a local shared-central path
157
+ ```
158
+ (Advanced: `--project <PROJECT> --doc <DOC>` also works if the user knows both.)
159
+ This downloads the central, creates the user's **local**, and opens it in Revit.
160
+ Success: `Joined. Your local was created and opened in Revit: …`.
161
+
162
+ ### (C) Already have a local open — `sync`
163
+ ```
164
+ thatopen revit sync
165
+ ```
166
+ Reads everything from the open local. Nothing else needed.
167
+
168
+ ---
169
+
170
+ ## Step 4 — Work, then sync
171
+ Tell the user to **model normally** in the local Revit opened. To send their changes to the
172
+ team and pull the team's changes, run:
173
+ ```
174
+ thatopen revit sync
175
+ ```
176
+ …or click **"Sync to team"** in the **"That Open"** panel of Revit's **Add‑Ins** tab.
177
+ Success: `Synced. vN → vM.` Repeat as often as they like; syncs are queued, no conflicts.
178
+
179
+ ---
180
+
181
+ ## Troubleshooting
182
+ - **`thatopen login` fails with "Unauthorized"** → the token is invalid/expired, or it's
183
+ for a different environment than `--api-url`. Ask the user to generate a fresh token in
184
+ the dashboard (Data → API Tokens) for the SAME environment: production tokens use **no**
185
+ `--api-url`; dev tokens use `--api-url https://dev.platform.thatopen.com`. Then retry.
186
+ - **publish/join fails with HTTP 403** on `item/folder?projectId=…` → login worked but the
187
+ user's account is **not authorized for that Project ID** (wrong project, wrong
188
+ environment, or no access). Confirm the Project ID with the user and that their token
189
+ (Step 2) belongs to an account with access to it, then retry.
190
+ - **"add‑in not running"** after Revit is open → the add‑in isn't installed; do Step 1(b).
191
+ - **"Could not reach the Revit add‑in"** → Revit was closed; reopen it and retry.
192
+ - **"Not logged in"** → do Step 2.
193
+ - **publish says a value is missing** → re‑run with `--project`, `--doc`, and `--file`.
194
+ - **publish refuses: "not a workshared central … re-run with convert=true"** → the file is a
195
+ plain model. Ask the user for consent to convert a **copy** (original untouched), then add
196
+ `--convert`.
197
+ - **`join` says "Identify the central … with one of …"** → provide `--folder-id`, or
198
+ `--path`, or both `--project` and `--doc`.
199
+
200
+ ## Rules recap (for the AI)
201
+ - Ask for every value you don't have — never guess a project id, file path, or central name.
202
+ - Never echo or store the user's token.
203
+ - You may install the CLI/add‑in and launch Revit yourself; only the "Always Load" prompt
204
+ needs the user.
205
+ - Use only the `thatopen` CLI commands above; verify each command's output before proceeding.
package/package.json CHANGED
@@ -1,95 +1,95 @@
1
- {
2
- "name": "@thatopen/services",
3
- "description": "Client library and CLI for building BIM apps and cloud components on the That Open Platform",
4
- "author": "That Open Company",
5
- "license": "MIT",
6
- "homepage": "https://github.com/ThatOpen/engine_services#readme",
7
- "bugs": {
8
- "url": "https://github.com/ThatOpen/engine_services/issues"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/ThatOpen/engine_services.git"
13
- },
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "private": false,
18
- "version": "0.3.11",
19
- "main": "dist/index.cjs.js",
20
- "module": "dist/index.es.js",
21
- "types": "dist/index.d.ts",
22
- "bin": {
23
- "thatopen": "dist/cli.js"
24
- },
25
- "files": [
26
- "dist",
27
- "src/cli/templates",
28
- "src/built-in",
29
- "docs",
30
- "resources"
31
- ],
32
- "scripts": {
33
- "dev": "vite",
34
- "lint": "eslint src/",
35
- "build": "eslint src/ && tsc && vite build && vite build --config vite.config.cli.mts && node scripts/generate-cli-docs-paths.mjs && node scripts/generate-client-examples-paths.mjs",
36
- "build:lib": "tsc && vite build",
37
- "test": "vitest run",
38
- "test:watch": "vitest",
39
- "build:cli": "vite build --config vite.config.cli.mts",
40
- "preview": "vite preview",
41
- "test:ui": "vite --config test/vite.config.mts",
42
- "template:app": "cd src/cli/templates/app && npm install && cd ../../../.. && node scripts/generate-template-tsconfig.mjs",
43
- "template:app:dev": "cd src/cli/templates/app && npm run dev",
44
- "changeset": "changeset",
45
- "version": "changeset version",
46
- "prepublishOnly": "npm run build"
47
- },
48
- "devDependencies": {
49
- "@changesets/cli": "^2.27.7",
50
- "@thatopen/components": "~3.4.0",
51
- "@thatopen/components-front": "~3.4.0",
52
- "@thatopen/fragments": "~3.4.0",
53
- "@thatopen/ui": "~3.4.0",
54
- "@thatopen/ui-obc": "~3.4.0",
55
- "@types/node": "^20.12.12",
56
- "@types/three": "^0.182.0",
57
- "commander": "^14.0.3",
58
- "esbuild": "^0.27.3",
59
- "eslint": "9.x",
60
- "eslint-config-prettier": "^9.1.0",
61
- "eslint-plugin-prettier": "^5.1.3",
62
- "globals": "^15.3.0",
63
- "jszip": "^3.10.1",
64
- "prettier": "^3.2.5",
65
- "three": ">=0.182.0",
66
- "tsx": "^4.16.2",
67
- "typescript": "^5.2.2",
68
- "typescript-eslint": "^7.10.0",
69
- "vite": "^5.2.0",
70
- "vite-plugin-dts": "^3.9.1",
71
- "vite-plugin-eslint": "^1.8.1",
72
- "vitest": "^4.1.4"
73
- },
74
- "dependencies": {
75
- "dotenv": "^16.4.5",
76
- "socket.io": "^4.8.0",
77
- "socket.io-client": "^4.8.0"
78
- },
79
- "peerDependencies": {
80
- "@thatopen/components": "~3.4.0",
81
- "@thatopen/ui": "~3.4.0",
82
- "three": ">=0.182.0"
83
- },
84
- "peerDependenciesMeta": {
85
- "@thatopen/components": {
86
- "optional": true
87
- },
88
- "@thatopen/ui": {
89
- "optional": true
90
- },
91
- "three": {
92
- "optional": true
93
- }
94
- }
95
- }
1
+ {
2
+ "name": "@thatopen/services",
3
+ "description": "Client library and CLI for building BIM apps and cloud components on the That Open Platform",
4
+ "author": "That Open Company",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/ThatOpen/engine_services#readme",
7
+ "bugs": {
8
+ "url": "https://github.com/ThatOpen/engine_services/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/ThatOpen/engine_services.git"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "private": false,
18
+ "version": "0.3.13",
19
+ "main": "dist/index.cjs.js",
20
+ "module": "dist/index.es.js",
21
+ "types": "dist/index.d.ts",
22
+ "bin": {
23
+ "thatopen": "dist/cli.js"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "src/cli/templates",
28
+ "src/built-in",
29
+ "docs",
30
+ "resources"
31
+ ],
32
+ "scripts": {
33
+ "dev": "vite",
34
+ "lint": "eslint src/",
35
+ "build": "eslint src/ && tsc && vite build && vite build --config vite.config.cli.mts && node scripts/generate-cli-docs-paths.mjs && node scripts/generate-client-examples-paths.mjs",
36
+ "build:lib": "tsc && vite build",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest",
39
+ "build:cli": "vite build --config vite.config.cli.mts",
40
+ "preview": "vite preview",
41
+ "test:ui": "vite --config test/vite.config.mts",
42
+ "template:app": "cd src/cli/templates/app && npm install && cd ../../../.. && node scripts/generate-template-tsconfig.mjs",
43
+ "template:app:dev": "cd src/cli/templates/app && npm run dev",
44
+ "changeset": "changeset",
45
+ "version": "changeset version",
46
+ "prepublishOnly": "npm run build"
47
+ },
48
+ "devDependencies": {
49
+ "@changesets/cli": "^2.27.7",
50
+ "@thatopen/components": "~3.4.0",
51
+ "@thatopen/components-front": "~3.4.0",
52
+ "@thatopen/fragments": "~3.4.0",
53
+ "@thatopen/ui": "~3.4.0",
54
+ "@thatopen/ui-obc": "~3.4.0",
55
+ "@types/node": "^20.12.12",
56
+ "@types/three": "^0.182.0",
57
+ "commander": "^14.0.3",
58
+ "esbuild": "^0.27.3",
59
+ "eslint": "9.x",
60
+ "eslint-config-prettier": "^9.1.0",
61
+ "eslint-plugin-prettier": "^5.1.3",
62
+ "globals": "^15.3.0",
63
+ "jszip": "^3.10.1",
64
+ "prettier": "^3.2.5",
65
+ "three": ">=0.182.0",
66
+ "tsx": "^4.16.2",
67
+ "typescript": "^5.2.2",
68
+ "typescript-eslint": "^7.10.0",
69
+ "vite": "^5.2.0",
70
+ "vite-plugin-dts": "^3.9.1",
71
+ "vite-plugin-eslint": "^1.8.1",
72
+ "vitest": "^4.1.4"
73
+ },
74
+ "dependencies": {
75
+ "dotenv": "^16.4.5",
76
+ "socket.io": "^4.8.0",
77
+ "socket.io-client": "^4.8.0"
78
+ },
79
+ "peerDependencies": {
80
+ "@thatopen/components": "~3.4.0",
81
+ "@thatopen/ui": "~3.4.0",
82
+ "three": ">=0.182.0"
83
+ },
84
+ "peerDependenciesMeta": {
85
+ "@thatopen/components": {
86
+ "optional": true
87
+ },
88
+ "@thatopen/ui": {
89
+ "optional": true
90
+ },
91
+ "three": {
92
+ "optional": true
93
+ }
94
+ }
95
+ }