@snaptrude/plugin-core 0.10.0 → 0.11.0-rc.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.
- package/CHANGELOG.md +24 -2
- package/api-manifest.full.json +6928 -0
- package/api-manifest.json +85 -4
- package/dist/api/core/camera/index.d.ts +16 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +68 -1
- package/dist/api/core/project/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +14 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +29 -6
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +20 -2
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/furniture/index.d.ts +33 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +2 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +61 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +28 -0
- package/dist/api/design/visibility.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +3 -0
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +35 -1
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sheets.d.ts +20 -2
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +8 -3
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/index.cjs +69 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +62 -3
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/snaptrude-plugin-core-0.11.0.tgz +0 -0
- package/src/api/core/camera/index.ts +17 -0
- package/src/api/core/project/index.ts +62 -1
- package/src/api/core/storeys/index.ts +15 -0
- package/src/api/design/create/index.ts +34 -8
- package/src/api/design/delete/index.ts +20 -1
- package/src/api/design/furniture/index.ts +34 -0
- package/src/api/design/query/index.ts +2 -0
- package/src/api/design/query/spaces.ts +68 -0
- package/src/api/design/visibility.ts +34 -0
- package/src/api/entity/space.ts +2 -0
- package/src/api/presentation/placedViews.ts +29 -1
- package/src/api/presentation/sheets.ts +19 -3
- package/src/errors/codes.ts +30 -2
- package/test/errors.test.mjs +4 -0
package/src/errors/codes.ts
CHANGED
|
@@ -5,8 +5,13 @@
|
|
|
5
5
|
* APPEND-ONLY: codes are a published contract; never rename or remove one.
|
|
6
6
|
* Handle-resolution failures deliberately collapse to ONE code
|
|
7
7
|
* (`HANDLE_INVALID`) so error responses cannot be used as an existence /
|
|
8
|
-
* ownership oracle (PLUGIN_HANDLE_MIGRATION_HLD §6)
|
|
9
|
-
*
|
|
8
|
+
* ownership oracle (PLUGIN_HANDLE_MIGRATION_HLD §6) — with one deliberate
|
|
9
|
+
* exception: `HANDLE_STALE` marks a handle the caller legitimately held that a
|
|
10
|
+
* parametric resolution (merge / split / rebuild) has since retired — a
|
|
11
|
+
* lifetime fact about the caller's own write-scoped handle, not an oracle
|
|
12
|
+
* (forged / never-issued ids still collapse to `HANDLE_INVALID`).
|
|
13
|
+
* `HANDLE_KIND_MISMATCH` stays distinct because the kind is information the
|
|
14
|
+
* caller already holds.
|
|
10
15
|
*/
|
|
11
16
|
export const PLUGIN_ERROR_CODES = [
|
|
12
17
|
"VALIDATION",
|
|
@@ -32,6 +37,10 @@ export const PLUGIN_ERROR_CODES = [
|
|
|
32
37
|
"NO_ACTIVE_STRUCTURE",
|
|
33
38
|
"NO_ELIGIBLE_ELEMENTS",
|
|
34
39
|
"PROPOSAL_SWITCH_BLOCKED",
|
|
40
|
+
"HANDLE_STALE",
|
|
41
|
+
"KIND_HIDDEN_IN_MODE",
|
|
42
|
+
"MERGED_INTO_EXISTING",
|
|
43
|
+
"BLOCKED_IN_BIM",
|
|
35
44
|
"INTERNAL",
|
|
36
45
|
"UNKNOWN",
|
|
37
46
|
] as const
|
|
@@ -123,6 +132,25 @@ export const CODE_META: Record<PluginErrorCode, CodeMeta> = {
|
|
|
123
132
|
category: "execution",
|
|
124
133
|
hintTemplate: "Wait for the in-canvas agent run to finish, then retry.",
|
|
125
134
|
},
|
|
135
|
+
HANDLE_STALE: {
|
|
136
|
+
category: "handle",
|
|
137
|
+
hintTemplate:
|
|
138
|
+
"The entity was retired by a parametric resolution (merge/split/rebuild); re-query for its successor.",
|
|
139
|
+
},
|
|
140
|
+
KIND_HIDDEN_IN_MODE: {
|
|
141
|
+
category: "execution",
|
|
142
|
+
hintTemplate:
|
|
143
|
+
"This entity kind has no representation in the current mode/LOD; switch mode or target a visible kind.",
|
|
144
|
+
},
|
|
145
|
+
MERGED_INTO_EXISTING: {
|
|
146
|
+
category: "execution",
|
|
147
|
+
hintTemplate:
|
|
148
|
+
"The created geometry merged into an existing entity; use the surviving handles from details.",
|
|
149
|
+
},
|
|
150
|
+
BLOCKED_IN_BIM: {
|
|
151
|
+
category: "execution",
|
|
152
|
+
hintTemplate: "This operation is unavailable in BIM mode; switch to Design and retry.",
|
|
153
|
+
},
|
|
126
154
|
INTERNAL: {
|
|
127
155
|
category: "internal",
|
|
128
156
|
hintTemplate: "Host-side fault. Report with errorId.",
|
package/test/errors.test.mjs
CHANGED
|
@@ -178,6 +178,10 @@ test("PLUGIN_ERROR_CODES matches the reviewed snapshot (append-only contract)",
|
|
|
178
178
|
"NO_ACTIVE_STRUCTURE",
|
|
179
179
|
"NO_ELIGIBLE_ELEMENTS",
|
|
180
180
|
"PROPOSAL_SWITCH_BLOCKED",
|
|
181
|
+
"HANDLE_STALE",
|
|
182
|
+
"KIND_HIDDEN_IN_MODE",
|
|
183
|
+
"MERGED_INTO_EXISTING",
|
|
184
|
+
"BLOCKED_IN_BIM",
|
|
181
185
|
"INTERNAL",
|
|
182
186
|
"UNKNOWN",
|
|
183
187
|
])
|