@snaptrude/plugin-core 0.9.16 → 0.9.18-voids-20261016.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 (107) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/api-manifest.full.json +10406 -0
  3. package/api-manifest.json +827 -51
  4. package/dist/api/analysis/daylight.d.ts +5 -5
  5. package/dist/api/analysis/solar.d.ts +2 -2
  6. package/dist/api/core/camera/index.d.ts +29 -0
  7. package/dist/api/core/camera/index.d.ts.map +1 -1
  8. package/dist/api/core/geom/create/index.d.ts +7 -1
  9. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  10. package/dist/api/core/geom/update/contour.d.ts +8 -2
  11. package/dist/api/core/geom/update/contour.d.ts.map +1 -1
  12. package/dist/api/core/zoom/index.d.ts +13 -0
  13. package/dist/api/core/zoom/index.d.ts.map +1 -1
  14. package/dist/api/design/bim.d.ts +209 -0
  15. package/dist/api/design/bim.d.ts.map +1 -0
  16. package/dist/api/design/boolean/index.d.ts +2 -0
  17. package/dist/api/design/boolean/index.d.ts.map +1 -1
  18. package/dist/api/design/catalog.d.ts +320 -0
  19. package/dist/api/design/catalog.d.ts.map +1 -0
  20. package/dist/api/design/create/bulk-items.d.ts +65 -25
  21. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  22. package/dist/api/design/create/index.d.ts +272 -99
  23. package/dist/api/design/create/index.d.ts.map +1 -1
  24. package/dist/api/design/create/opening-fields.d.ts +13 -12
  25. package/dist/api/design/create/opening-fields.d.ts.map +1 -1
  26. package/dist/api/design/delete/index.d.ts +1 -0
  27. package/dist/api/design/delete/index.d.ts.map +1 -1
  28. package/dist/api/design/doors/index.d.ts +18 -24
  29. package/dist/api/design/doors/index.d.ts.map +1 -1
  30. package/dist/api/design/family.d.ts +797 -27
  31. package/dist/api/design/family.d.ts.map +1 -1
  32. package/dist/api/design/index.d.ts +16 -0
  33. package/dist/api/design/index.d.ts.map +1 -1
  34. package/dist/api/design/networks.d.ts +1703 -0
  35. package/dist/api/design/networks.d.ts.map +1 -0
  36. package/dist/api/design/query/index.d.ts +42 -32
  37. package/dist/api/design/query/index.d.ts.map +1 -1
  38. package/dist/api/design/selection/index.d.ts +10 -10
  39. package/dist/api/design/types/index.d.ts +40 -24
  40. package/dist/api/design/types/index.d.ts.map +1 -1
  41. package/dist/api/design/update/index.d.ts +43 -3
  42. package/dist/api/design/update/index.d.ts.map +1 -1
  43. package/dist/api/design/windows/index.d.ts +8 -8
  44. package/dist/api/design/windows/index.d.ts.map +1 -1
  45. package/dist/api/presentation/aiInspiration.d.ts +10 -10
  46. package/dist/api/presentation/annotate.d.ts +38 -22
  47. package/dist/api/presentation/annotate.d.ts.map +1 -1
  48. package/dist/api/presentation/drawingContract.d.ts +32 -0
  49. package/dist/api/presentation/drawingContract.d.ts.map +1 -0
  50. package/dist/api/presentation/drawings.d.ts +3523 -0
  51. package/dist/api/presentation/drawings.d.ts.map +1 -0
  52. package/dist/api/presentation/export.d.ts +23 -5
  53. package/dist/api/presentation/export.d.ts.map +1 -1
  54. package/dist/api/presentation/index.d.ts +41 -12
  55. package/dist/api/presentation/index.d.ts.map +1 -1
  56. package/dist/api/presentation/placedViews.d.ts +106 -6
  57. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  58. package/dist/api/presentation/sections.d.ts +461 -0
  59. package/dist/api/presentation/sections.d.ts.map +1 -0
  60. package/dist/api/presentation/shapes.d.ts +2 -2
  61. package/dist/api/presentation/sheets.d.ts +175 -19
  62. package/dist/api/presentation/sheets.d.ts.map +1 -1
  63. package/dist/api/presentation/viewPresets.d.ts +222 -0
  64. package/dist/api/presentation/viewPresets.d.ts.map +1 -0
  65. package/dist/api/presentation/views.d.ts +103 -5
  66. package/dist/api/presentation/views.d.ts.map +1 -1
  67. package/dist/api/presentation/walkthroughs.d.ts +6 -6
  68. package/dist/errors/codes.d.ts +3 -1
  69. package/dist/errors/codes.d.ts.map +1 -1
  70. package/dist/index.cjs +3749 -2328
  71. package/dist/index.cjs.map +1 -1
  72. package/dist/index.js +3616 -2328
  73. package/dist/index.js.map +1 -1
  74. package/package.json +1 -1
  75. package/scripts/generate-manifest.mjs +5 -0
  76. package/src/api/core/camera/index.ts +29 -0
  77. package/src/api/core/geom/create/index.ts +7 -1
  78. package/src/api/core/geom/update/contour.ts +8 -2
  79. package/src/api/core/zoom/index.ts +13 -0
  80. package/src/api/design/bim.ts +121 -0
  81. package/src/api/design/boolean/index.ts +2 -0
  82. package/src/api/design/catalog.ts +203 -0
  83. package/src/api/design/create/bulk-items.ts +57 -17
  84. package/src/api/design/create/index.ts +288 -120
  85. package/src/api/design/create/opening-fields.ts +15 -12
  86. package/src/api/design/delete/index.ts +1 -0
  87. package/src/api/design/doors/index.ts +58 -42
  88. package/src/api/design/family.ts +662 -32
  89. package/src/api/design/index.ts +34 -4
  90. package/src/api/design/networks.ts +607 -0
  91. package/src/api/design/query/index.ts +12 -2
  92. package/src/api/design/types/index.ts +31 -24
  93. package/src/api/design/update/index.ts +44 -3
  94. package/src/api/design/windows/index.ts +40 -22
  95. package/src/api/presentation/annotate.ts +90 -58
  96. package/src/api/presentation/drawingContract.ts +70 -0
  97. package/src/api/presentation/drawings.ts +1179 -0
  98. package/src/api/presentation/export.ts +32 -6
  99. package/src/api/presentation/index.ts +48 -14
  100. package/src/api/presentation/placedViews.ts +119 -28
  101. package/src/api/presentation/sections.ts +420 -0
  102. package/src/api/presentation/sheets.ts +181 -20
  103. package/src/api/presentation/viewPresets.ts +241 -0
  104. package/src/api/presentation/views.ts +46 -6
  105. package/src/errors/codes.ts +7 -0
  106. package/test/drawingContract.test.mjs +288 -0
  107. package/test/errors.test.mjs +1 -0
@@ -0,0 +1,288 @@
1
+ // The drawing tool contract the agent reads: export file names are base names
2
+ // without an extension, and architectural scales are standard denominators only.
3
+ // Run: node --test test/
4
+ // Imports the BUILT package (dist) — run `pnpm build` first.
5
+ import test from "node:test"
6
+ import assert from "node:assert/strict"
7
+ import { readFileSync } from "node:fs"
8
+ import {
9
+ STANDARD_DRAWING_SCALES,
10
+ METRIC_DRAWING_SCALES,
11
+ IMPERIAL_DRAWING_SCALES,
12
+ IMPERIAL_DETAIL_DRAWING_SCALES,
13
+ IMPERIAL_SITE_DRAWING_SCALES,
14
+ PluginDrawingCreateOptions,
15
+ PluginDrawingCreateArgs,
16
+ PluginDrawingScaleArgs,
17
+ PluginDrawingExportOptions,
18
+ PluginDrawingExportArgs,
19
+ PluginPresentationExportArgs,
20
+ PluginPresentationSheetsPlaceArgs,
21
+ PluginPresentationSheetsPlaceDrawingArgs,
22
+ PluginPresentationSheetsPlaceDrawingResult,
23
+ PluginPresentationSheetsPlaceResult,
24
+ PluginPresentationPlacedViewsSetScaleArgs,
25
+ } from "../dist/index.js"
26
+ import { buildManifest } from "../scripts/generate-manifest.mjs"
27
+
28
+ // The Scale dropdown's values in the frontend (ALL_SCALES_DICTIONARY in
29
+ // src/app/common/utils/scaleMeasurements.ts): metric, imperial detail, imperial site.
30
+ const METRIC = [10, 20, 50, 100, 150, 200, 250, 500, 1000]
31
+ const IMPERIAL_DETAIL = [12, 16, 24, 32, 48, 64, 96, 128, 192, 384, 768, 1536]
32
+ const IMPERIAL_SITE = [120, 240, 360, 480, 600, 1200, 2400, 3600, 4800]
33
+
34
+ const messagesOf = (result) => result.error.issues.map((issue) => issue.message)
35
+
36
+ // --- standard scales ---------------------------------------------------------
37
+
38
+ test("STANDARD_DRAWING_SCALES is the frontend's metric and imperial list, ascending", () => {
39
+ const expected = [...METRIC, ...IMPERIAL_DETAIL, ...IMPERIAL_SITE].sort((a, b) => a - b)
40
+ assert.deepEqual([...STANDARD_DRAWING_SCALES], expected)
41
+ assert.deepEqual([...METRIC_DRAWING_SCALES], METRIC)
42
+ assert.deepEqual([...IMPERIAL_DRAWING_SCALES], [...IMPERIAL_DETAIL, ...IMPERIAL_SITE].sort((a, b) => a - b))
43
+ assert.deepEqual([...IMPERIAL_DETAIL_DRAWING_SCALES], IMPERIAL_DETAIL)
44
+ assert.deepEqual([...IMPERIAL_SITE_DRAWING_SCALES], IMPERIAL_SITE)
45
+ })
46
+
47
+ const scaleSchemas = [
48
+ ["drawings.create options", (scale) => PluginDrawingCreateOptions.safeParse({ scale })],
49
+ ["drawings.create args", (scale) => PluginDrawingCreateArgs.safeParse({ viewId: "v1", scale })],
50
+ ["drawings.setScale", (scale) => PluginDrawingScaleArgs.safeParse({ drawingId: "d1", scale })],
51
+ ["sheets.place", (scale) => PluginPresentationSheetsPlaceArgs.safeParse({ sheetId: "s1", viewId: "v1", scale })],
52
+ ["placedViews.setScale", (scale) => PluginPresentationPlacedViewsSetScaleArgs.safeParse({ shapeId: "p1", scale })],
53
+ ]
54
+
55
+ for (const [name, parse] of scaleSchemas) {
56
+ test(`${name} accepts every standard scale`, () => {
57
+ for (const scale of STANDARD_DRAWING_SCALES) {
58
+ assert.equal(parse(scale).success, true, `${name} rejected ${scale}`)
59
+ }
60
+ })
61
+
62
+ test(`${name} rejects a non-standard scale and lists the allowed ones`, () => {
63
+ for (const scale of [137, 75, 1, 99.5]) {
64
+ const result = parse(scale)
65
+ assert.equal(result.success, false, `${name} accepted ${scale}`)
66
+ const message = messagesOf(result).join("\n")
67
+ assert.match(message, /standard/i)
68
+ assert.ok(message.includes(`Metric: ${METRIC.join(", ")}`), message)
69
+ assert.ok(message.includes(`imperial detail: ${IMPERIAL_DETAIL.join(", ")}`), message)
70
+ assert.ok(message.includes(`imperial site: ${IMPERIAL_SITE.join(", ")}`), message)
71
+ assert.match(message, /largest/i)
72
+ }
73
+ })
74
+ }
75
+
76
+ test("create options still allow omitting the scale", () => {
77
+ assert.equal(PluginDrawingCreateOptions.safeParse({}).success, true)
78
+ assert.equal(PluginPresentationSheetsPlaceArgs.safeParse({ sheetId: "s", viewId: "v" }).success, true)
79
+ })
80
+
81
+ // --- placing a drawing on a sheet -------------------------------------------
82
+
83
+ test("sheets.placeDrawing takes an optional boolean fit", () => {
84
+ const base = { sheetId: "s", drawingId: "d" }
85
+ assert.equal(PluginPresentationSheetsPlaceDrawingArgs.safeParse(base).success, true)
86
+ assert.equal(PluginPresentationSheetsPlaceDrawingArgs.safeParse({ ...base, fit: true }).success, true)
87
+ assert.equal(PluginPresentationSheetsPlaceDrawingArgs.safeParse({ ...base, fit: false }).success, true)
88
+ assert.equal(PluginPresentationSheetsPlaceDrawingArgs.safeParse({ ...base, fit: "yes" }).success, false)
89
+ })
90
+
91
+ test("sheets.placeDrawing reports the scale it used and whether it rescaled", () => {
92
+ const ok = (value) => PluginPresentationSheetsPlaceDrawingResult.safeParse(value).success
93
+ assert.equal(ok({ shapeId: "shape:a", scale: 192, rescaled: true }), true)
94
+ assert.equal(ok({ shapeId: "shape:a", scale: null, rescaled: false }), true)
95
+ assert.equal(ok({ shapeId: "shape:a" }), false)
96
+ assert.equal(ok({ shapeId: "shape:a", scale: 100 }), false)
97
+ assert.equal(ok({ shapeId: "shape:a", scale: 100, rescaled: false, overlaps: true }), true)
98
+ assert.equal(ok({ shapeId: "shape:a", scale: 100, rescaled: false, overlaps: "yes" }), false)
99
+ })
100
+
101
+ test("sheets.place may report the scale, whether it rescaled and whether it overlaps", () => {
102
+ const ok = (value) => PluginPresentationSheetsPlaceResult.safeParse(value).success
103
+ assert.equal(ok({ shapeId: "shape:a" }), true)
104
+ assert.equal(ok({ shapeId: "shape:a", scale: 192, rescaled: true, overlaps: false }), true)
105
+ assert.equal(ok({ shapeId: "shape:a", scale: null, rescaled: false }), true)
106
+ assert.equal(ok({ shapeId: "shape:a", overlaps: "no" }), false)
107
+ assert.equal(ok({ shapeId: "shape:a", rescaled: 1 }), false)
108
+ })
109
+
110
+ test("sheets.place may report that a drawing at an explicit scale overflows the sheet; placeDrawing never does", () => {
111
+ const place = (value) => PluginPresentationSheetsPlaceResult.safeParse(value).success
112
+ assert.equal(place({ shapeId: "shape:a", scale: 100, rescaled: false, overflows: true }), true)
113
+ assert.equal(place({ shapeId: "shape:a", scale: 100, rescaled: false, overflows: "yes" }), false)
114
+ const placeDrawing = PluginPresentationSheetsPlaceDrawingResult.safeParse({
115
+ shapeId: "shape:a",
116
+ scale: 100,
117
+ rescaled: false,
118
+ overflows: true,
119
+ })
120
+ assert.equal(placeDrawing.success, true)
121
+ assert.equal("overflows" in placeDrawing.data, false)
122
+ })
123
+
124
+ // --- file names --------------------------------------------------------------
125
+
126
+ const fileNameSchemas = [
127
+ ["drawings.export options", (fileName) => PluginDrawingExportOptions.safeParse({ fileName })],
128
+ ["drawings.export args", (fileName) => PluginDrawingExportArgs.safeParse({ drawingId: "d1", format: "pdf", fileName })],
129
+ ["presentation.export", (fileName) => PluginPresentationExportArgs.safeParse({ format: "pdf", fileName })],
130
+ ]
131
+
132
+ for (const [name, parse] of fileNameSchemas) {
133
+ test(`${name} rejects a file name with an extension`, () => {
134
+ for (const fileName of ["Floor Pattern View.pdf", "plan.PDF", "a.svg", "a.png", "a.jpg", "a.JPEG"]) {
135
+ const result = parse(fileName)
136
+ assert.equal(result.success, false, `${name} accepted ${fileName}`)
137
+ assert.match(messagesOf(result).join("\n"), /without an extension/i)
138
+ }
139
+ })
140
+
141
+ test(`${name} rejects a file name ending in a dot or whitespace`, () => {
142
+ // The host appends the extension, so "a.pdf." would become "a.pdf..pdf".
143
+ for (const fileName of ["a.pdf.", "plan.", "plan..", "plan ", "plan\t", "a.pdf .", "a.pdf. "]) {
144
+ const result = parse(fileName)
145
+ assert.equal(result.success, false, `${name} accepted ${JSON.stringify(fileName)}`)
146
+ assert.match(messagesOf(result).join("\n"), /without an extension/i)
147
+ }
148
+ })
149
+
150
+ test(`${name} accepts a base name`, () => {
151
+ for (const fileName of ["Floor Pattern View", "Level 1.2 plan", "pdf plan", "notes.v2"]) {
152
+ assert.equal(parse(fileName).success, true, `${name} rejected ${fileName}`)
153
+ }
154
+ })
155
+ }
156
+
157
+ // --- the contract the agent reads (api-manifest summaries) -------------------
158
+
159
+ // Overloaded methods produce one leaf per signature; the documented one comes first.
160
+ const manifest = new Map()
161
+ for (const leaf of buildManifest()) if (!manifest.has(leaf.path)) manifest.set(leaf.path, leaf)
162
+ const summaryOf = (path) => {
163
+ const leaf = manifest.get(path)
164
+ assert.ok(leaf, `no manifest leaf ${path}`)
165
+ return leaf.summary
166
+ }
167
+
168
+ test("export summaries tell the agent to pass fileName without an extension", () => {
169
+ for (const path of ["presentation.drawings.export", "presentation.export"]) {
170
+ assert.match(summaryOf(path), /fileName[^.]*without (an|its) extension/i, path)
171
+ }
172
+ })
173
+
174
+ test("scale summaries list the standard scales and say how to choose one", () => {
175
+ for (const path of [
176
+ "presentation.drawings.create",
177
+ "presentation.drawings.setScale",
178
+ "presentation.sheets.place",
179
+ "presentation.placedViews.setScale",
180
+ ]) {
181
+ const summary = summaryOf(path)
182
+ assert.ok(summary.includes(`Metric: ${METRIC.join(", ")}.`), `${path}: ${summary}`)
183
+ assert.ok(summary.includes(`Imperial detail: ${IMPERIAL_DETAIL.join(", ")}`), `${path}: ${summary}`)
184
+ assert.ok(summary.includes(`Imperial site: ${IMPERIAL_SITE.join(", ")}`), `${path}: ${summary}`)
185
+ assert.match(summary, /Pick the LARGEST standard scale \(smallest denominator\)/, path)
186
+ assert.match(summary, /fits its frame or sheet/i, path)
187
+ assert.match(summary, /usually 1:50 to 1:200/, path)
188
+ assert.match(summary, /Never use a site-sized scale/, path)
189
+ assert.match(summary, /project's unit system/, path)
190
+ }
191
+ })
192
+
193
+ test("drawings.create tells the agent to omit position and follow the label layout's suggested scale", () => {
194
+ const summary = summaryOf("presentation.drawings.create")
195
+ assert.match(summary, /Omit `position` unless the user asked for a specific place/, summary)
196
+ assert.match(summary, /next to its source view/, summary)
197
+ assert.match(summary, /labels\.getLayout\(drawingId\)/, summary)
198
+ assert.match(summary, /suggestedScale/, summary)
199
+ })
200
+
201
+ test("drawing writes send the agent to presentation.camera instead of promising to frame the camera", () => {
202
+ for (const path of [
203
+ "presentation.drawings.create",
204
+ "presentation.drawings.setScale",
205
+ "presentation.drawings.setCrop",
206
+ ]) {
207
+ const summary = summaryOf(path)
208
+ assert.doesNotMatch(summary, /frames the camera/i, path)
209
+ assert.match(summary, /Changes the drawing, not the Present camera/, path)
210
+ assert.match(summary, /presentation\.camera\.zoomTo\(drawing\.id\)/, path)
211
+ assert.match(summary, /presentation\.camera\.capture\(\)/, path)
212
+ }
213
+ for (const path of ["presentation.drawings.setScale", "presentation.drawings.setCrop"]) {
214
+ assert.match(summaryOf(path), /moves\s+to the nearest free spot/, path)
215
+ }
216
+ })
217
+
218
+ test("drawings.create says it never puts a drawing on a sheet and names the sheet calls", () => {
219
+ const summary = summaryOf("presentation.drawings.create")
220
+ assert.match(summary, /beside its source view/, summary)
221
+ assert.match(summary, /never on a sheet/, summary)
222
+ assert.match(summary, /sheets\.place\(sheetId, viewId\)/, summary)
223
+ assert.match(summary, /sheets\.placeDrawing\(sheetId, drawingId\)/, summary)
224
+ })
225
+
226
+ test("sheets.placeDrawing documents fitting, fit: false and one sheet per drawing", () => {
227
+ const summary = summaryOf("presentation.sheets.placeDrawing")
228
+ assert.match(summary, /scaled down to fit/, summary)
229
+ assert.match(summary, /never scaled up/, summary)
230
+ assert.match(summary, /`fit: false`/, summary)
231
+ assert.match(summary, /naming the\s+drawing, the sheet and the scale/, summary)
232
+ assert.match(summary, /without\s+`fit: false`\s+to fit it, or\s+use a larger sheet/, summary)
233
+ assert.doesNotMatch(summary, /use\s+`?sheets\.place`?\s+to\s+fit/, summary)
234
+ assert.match(summary, /reports the architectural scale/, summary)
235
+ })
236
+
237
+ // Without a position the host puts the drawing at the sheet centre or the nearest free spot,
238
+ // and only centres it over other drawings (reporting overlaps: true) when there is none.
239
+ const NO_STACK = /lands\s+on\s+top/
240
+ const FREE_SPOT = /nearest\s+free\s+spot/
241
+ const CENTRED_WHEN_FULL = /no\s+free\s+spot[^.]*centred[^.]*`overlaps:\s*true`/
242
+ const EXPLICIT_POSITION = /`position`[^.]*placed\s+as\s+given[^.]*`overlaps:\s*true`[^.]*not\s+moved/
243
+ const DRAWINGS_ONLY = /only\s+other\s+drawings\s+count[^.]*text,\s+images\s+and\s+other\s+shapes/
244
+
245
+ const assertPlacementLayout = (summary) => {
246
+ assert.doesNotMatch(summary, NO_STACK, summary)
247
+ assert.match(summary, FREE_SPOT, summary)
248
+ assert.match(summary, CENTRED_WHEN_FULL, summary)
249
+ assert.match(summary, EXPLICIT_POSITION, summary)
250
+ assert.match(summary, DRAWINGS_ONLY, summary)
251
+ }
252
+
253
+ test("sheets.placeDrawing says where a drawing goes without a position and when it overlaps", () => {
254
+ assertPlacementLayout(summaryOf("presentation.sheets.placeDrawing"))
255
+ })
256
+
257
+ test("sheets.place says it is the call that puts a view on a sheet and fits it to that sheet", () => {
258
+ const summary = summaryOf("presentation.sheets.place")
259
+ assert.match(summary, /This is the call that puts a view on a\s+sheet/, summary)
260
+ assert.match(summary, /largest\s+standard scale at which it fits inside the target sheet's margin/, summary)
261
+ assert.match(summary, /never at a larger scale than the normal view drop/, summary)
262
+ assert.match(summary, /3D view[^.]*shrunk\s+evenly/, summary)
263
+ assertPlacementLayout(summary)
264
+ })
265
+
266
+ // The full JSDoc of sheets.place, for the @returns and @throws tags the summary leaves out.
267
+ const placeJsDoc = () => {
268
+ const source = readFileSync(new URL("../src/api/presentation/sheets.ts", import.meta.url), "utf8")
269
+ const end = source.indexOf("public abstract place(")
270
+ const start = source.lastIndexOf("/**", end)
271
+ return source
272
+ .slice(start, end)
273
+ .replace(/\{@linkcode (\w+)\}/g, "$1")
274
+ .replace(/\s*\*\s*/g, " ")
275
+ }
276
+
277
+ test("sheets.place documents the scale and rescaled it returns", () => {
278
+ const doc = placeJsDoc()
279
+ assert.match(doc, /@returns[^@]*`scale` used \(`null` for a 3D view\)/, doc)
280
+ assert.match(doc, /@returns[^@]*`rescaled`/, doc)
281
+ assert.doesNotMatch(doc, /a host that reports them/, doc)
282
+ })
283
+
284
+ test("sheets.place documents PRECONDITION_FAILED for a view that does not fit", () => {
285
+ const doc = placeJsDoc()
286
+ assert.match(doc, /@throws[^@]*`PRECONDITION_FAILED`[^@]*smallest standard scale/, doc)
287
+ assert.match(doc, /@throws[^@]*`PRECONDITION_FAILED`[^@]*title block alone/, doc)
288
+ })
@@ -180,5 +180,6 @@ test("PLUGIN_ERROR_CODES matches the reviewed snapshot (append-only contract)",
180
180
  "PROPOSAL_SWITCH_BLOCKED",
181
181
  "INTERNAL",
182
182
  "UNKNOWN",
183
+ "HANDLE_STALE",
183
184
  ])
184
185
  })