@botpress/cli 1.2.3 → 1.3.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 (38) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/dist/command-implementations/lint-command.js +33 -2
  3. package/dist/command-implementations/lint-command.js.map +2 -2
  4. package/dist/linter/base-linter.js +75 -0
  5. package/dist/linter/base-linter.js.map +7 -0
  6. package/dist/linter/{integration-linter.test.js → base-linter.test.js} +1 -1
  7. package/dist/linter/base-linter.test.js.map +7 -0
  8. package/dist/linter/bot-linter.js +35 -0
  9. package/dist/linter/bot-linter.js.map +7 -0
  10. package/dist/linter/integration-linter.js +3 -44
  11. package/dist/linter/integration-linter.js.map +3 -3
  12. package/dist/linter/interface-linter.js +35 -0
  13. package/dist/linter/interface-linter.js.map +7 -0
  14. package/dist/linter/ruleset-tests/bot.ruleset.test.js +356 -0
  15. package/dist/linter/ruleset-tests/bot.ruleset.test.js.map +7 -0
  16. package/dist/linter/ruleset-tests/common.js +37 -0
  17. package/dist/linter/ruleset-tests/common.js.map +7 -0
  18. package/dist/linter/{rulesets → ruleset-tests}/integration.ruleset.test.js +75 -24
  19. package/dist/linter/ruleset-tests/integration.ruleset.test.js.map +7 -0
  20. package/dist/linter/ruleset-tests/interface.ruleset.test.js +391 -0
  21. package/dist/linter/ruleset-tests/interface.ruleset.test.js.map +7 -0
  22. package/dist/linter/rulesets/bot.ruleset.js +191 -0
  23. package/dist/linter/rulesets/bot.ruleset.js.map +7 -0
  24. package/dist/linter/rulesets/integration.ruleset.js +12 -0
  25. package/dist/linter/rulesets/integration.ruleset.js.map +2 -2
  26. package/dist/linter/rulesets/interface.ruleset.js +157 -0
  27. package/dist/linter/rulesets/interface.ruleset.js.map +7 -0
  28. package/dist/utils/path-utils.test.js +2 -3
  29. package/dist/utils/path-utils.test.js.map +2 -2
  30. package/dist/utils/schema-utils.test.js +1 -2
  31. package/dist/utils/schema-utils.test.js.map +2 -2
  32. package/package.json +2 -2
  33. package/templates/empty-bot/package.json +1 -1
  34. package/templates/empty-integration/package.json +1 -1
  35. package/templates/hello-world/package.json +1 -1
  36. package/templates/webhook-message/package.json +1 -1
  37. package/dist/linter/integration-linter.test.js.map +0 -7
  38. package/dist/linter/rulesets/integration.ruleset.test.js.map +0 -7
@@ -0,0 +1,391 @@
1
+ "use strict";
2
+ var import_vitest = require("vitest");
3
+ var import_interface = require("../rulesets/interface.ruleset");
4
+ var import_common = require("./common");
5
+ const describeRule = (0, import_common.createDescribeRule)()(import_interface.INTERFACE_RULESET);
6
+ const EMPTY_STRING = "";
7
+ const TRUTHY_STRING = "truthy";
8
+ const ACTION_NAME = "actionName";
9
+ const EVENT_NAME = "eventName";
10
+ const PARAM_NAME = "paramName";
11
+ const CHANNEL_NAME = "channelName";
12
+ const STATE_NAME = "stateName";
13
+ const ENTITY_NAME = "entityName";
14
+ const MESSAGE_TYPE = "text";
15
+ const ZUI = "x-zui";
16
+ const LEGACY_ZUI = "ui";
17
+ describeRule("action-inputparams-should-have-a-title", (lint) => {
18
+ (0, import_vitest.test)("missing title should trigger", async () => {
19
+ const definition = {
20
+ actions: { [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } } }
21
+ };
22
+ const results = await lint(definition);
23
+ (0, import_vitest.expect)(results).toHaveLength(1);
24
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", PARAM_NAME, ZUI]);
25
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
26
+ });
27
+ (0, import_vitest.test)("empty title should trigger", async () => {
28
+ const definition = {
29
+ actions: {
30
+ [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } } }
31
+ }
32
+ };
33
+ const results = await lint(definition);
34
+ (0, import_vitest.expect)(results).toHaveLength(1);
35
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
36
+ "actions",
37
+ ACTION_NAME,
38
+ "input",
39
+ "schema",
40
+ "properties",
41
+ PARAM_NAME,
42
+ ZUI,
43
+ "title"
44
+ ]);
45
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
46
+ });
47
+ (0, import_vitest.test)("valid title should not trigger", async () => {
48
+ const definition = {
49
+ actions: {
50
+ [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } } }
51
+ }
52
+ };
53
+ const results = await lint(definition);
54
+ (0, import_vitest.expect)(results).toHaveLength(0);
55
+ });
56
+ });
57
+ describeRule("action-inputparams-must-have-a-description", (lint) => {
58
+ (0, import_vitest.test)("missing description should trigger", async () => {
59
+ const definition = {
60
+ actions: { [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: {} } } } } }
61
+ };
62
+ const results = await lint(definition);
63
+ (0, import_vitest.expect)(results).toHaveLength(1);
64
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", PARAM_NAME]);
65
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
66
+ });
67
+ (0, import_vitest.test)("empty description should trigger", async () => {
68
+ const definition = {
69
+ actions: {
70
+ [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } } }
71
+ }
72
+ };
73
+ const results = await lint(definition);
74
+ (0, import_vitest.expect)(results).toHaveLength(1);
75
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
76
+ "actions",
77
+ ACTION_NAME,
78
+ "input",
79
+ "schema",
80
+ "properties",
81
+ PARAM_NAME,
82
+ "description"
83
+ ]);
84
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
85
+ });
86
+ (0, import_vitest.test)("valid description should not trigger", async () => {
87
+ const definition = {
88
+ actions: {
89
+ [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } } }
90
+ }
91
+ };
92
+ const results = await lint(definition);
93
+ (0, import_vitest.expect)(results).toHaveLength(0);
94
+ });
95
+ });
96
+ describeRule("action-outputparams-should-have-a-title", (lint) => {
97
+ (0, import_vitest.test)("missing title should trigger", async () => {
98
+ const definition = {
99
+ actions: { [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } } }
100
+ };
101
+ const results = await lint(definition);
102
+ (0, import_vitest.expect)(results).toHaveLength(1);
103
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", PARAM_NAME, ZUI]);
104
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
105
+ });
106
+ (0, import_vitest.test)("empty title should trigger", async () => {
107
+ const definition = {
108
+ actions: {
109
+ [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } } }
110
+ }
111
+ };
112
+ const results = await lint(definition);
113
+ (0, import_vitest.expect)(results).toHaveLength(1);
114
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
115
+ "actions",
116
+ ACTION_NAME,
117
+ "output",
118
+ "schema",
119
+ "properties",
120
+ PARAM_NAME,
121
+ ZUI,
122
+ "title"
123
+ ]);
124
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
125
+ });
126
+ (0, import_vitest.test)("valid title should not trigger", async () => {
127
+ const definition = {
128
+ actions: {
129
+ [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } } }
130
+ }
131
+ };
132
+ const results = await lint(definition);
133
+ (0, import_vitest.expect)(results).toHaveLength(0);
134
+ });
135
+ });
136
+ describeRule("action-outputparams-must-have-a-description", (lint) => {
137
+ (0, import_vitest.test)("missing description should trigger", async () => {
138
+ const definition = {
139
+ actions: { [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: {} } } } } }
140
+ };
141
+ const results = await lint(definition);
142
+ (0, import_vitest.expect)(results).toHaveLength(1);
143
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", PARAM_NAME]);
144
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
145
+ });
146
+ (0, import_vitest.test)("empty description should trigger", async () => {
147
+ const definition = {
148
+ actions: {
149
+ [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } } }
150
+ }
151
+ };
152
+ const results = await lint(definition);
153
+ (0, import_vitest.expect)(results).toHaveLength(1);
154
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
155
+ "actions",
156
+ ACTION_NAME,
157
+ "output",
158
+ "schema",
159
+ "properties",
160
+ PARAM_NAME,
161
+ "description"
162
+ ]);
163
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
164
+ });
165
+ (0, import_vitest.test)("valid description should not trigger", async () => {
166
+ const definition = {
167
+ actions: {
168
+ [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } } }
169
+ }
170
+ };
171
+ const results = await lint(definition);
172
+ (0, import_vitest.expect)(results).toHaveLength(0);
173
+ });
174
+ });
175
+ describeRule("event-outputparams-should-have-title", (lint) => {
176
+ (0, import_vitest.test)("missing title should trigger", async () => {
177
+ const definition = {
178
+ events: { [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } }
179
+ };
180
+ const results = await lint(definition);
181
+ (0, import_vitest.expect)(results).toHaveLength(1);
182
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", PARAM_NAME, ZUI]);
183
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
184
+ });
185
+ (0, import_vitest.test)("empty title should trigger", async () => {
186
+ const definition = {
187
+ events: {
188
+ [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } }
189
+ }
190
+ };
191
+ const results = await lint(definition);
192
+ (0, import_vitest.expect)(results).toHaveLength(1);
193
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", PARAM_NAME, ZUI, "title"]);
194
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
195
+ });
196
+ (0, import_vitest.test)("valid title should not trigger", async () => {
197
+ const definition = {
198
+ events: {
199
+ [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } }
200
+ }
201
+ };
202
+ const results = await lint(definition);
203
+ (0, import_vitest.expect)(results).toHaveLength(0);
204
+ });
205
+ });
206
+ describeRule("event-outputparams-must-have-description", (lint) => {
207
+ (0, import_vitest.test)("missing description should trigger", async () => {
208
+ const definition = {
209
+ events: { [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: {} } } } }
210
+ };
211
+ const results = await lint(definition);
212
+ (0, import_vitest.expect)(results).toHaveLength(1);
213
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", PARAM_NAME]);
214
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
215
+ });
216
+ (0, import_vitest.test)("empty description should trigger", async () => {
217
+ const definition = {
218
+ events: {
219
+ [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } }
220
+ }
221
+ };
222
+ const results = await lint(definition);
223
+ (0, import_vitest.expect)(results).toHaveLength(1);
224
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", PARAM_NAME, "description"]);
225
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
226
+ });
227
+ (0, import_vitest.test)("valid description should not trigger", async () => {
228
+ const definition = {
229
+ events: {
230
+ [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } }
231
+ }
232
+ };
233
+ const results = await lint(definition);
234
+ (0, import_vitest.expect)(results).toHaveLength(0);
235
+ });
236
+ });
237
+ describeRule("legacy-zui-title-should-be-removed", (lint) => {
238
+ (0, import_vitest.test)("legacy zui title should trigger", async () => {
239
+ const definition = {
240
+ actions: {
241
+ [ACTION_NAME]: { input: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } }
242
+ },
243
+ events: { [EVENT_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } },
244
+ channels: {
245
+ [CHANNEL_NAME]: {
246
+ messages: { [MESSAGE_TYPE]: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } }
247
+ }
248
+ },
249
+ entities: { [ENTITY_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } }
250
+ };
251
+ const results = await lint(definition);
252
+ (0, import_vitest.expect)(results).toHaveLength(4);
253
+ (0, import_vitest.expect)(results[0]?.message).toContain(".title()");
254
+ });
255
+ });
256
+ describeRule("legacy-zui-examples-should-be-removed", (lint) => {
257
+ (0, import_vitest.test)("legacy zui examples should trigger", async () => {
258
+ const definition = {
259
+ actions: {
260
+ [ACTION_NAME]: { input: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } }
261
+ },
262
+ events: { [EVENT_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } },
263
+ channels: {
264
+ [CHANNEL_NAME]: {
265
+ messages: { [MESSAGE_TYPE]: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } }
266
+ }
267
+ },
268
+ entities: { [ENTITY_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } }
269
+ };
270
+ const results = await lint(definition);
271
+ (0, import_vitest.expect)(results).toHaveLength(4);
272
+ (0, import_vitest.expect)(results[0]?.message).toContain("examples");
273
+ });
274
+ });
275
+ describeRule("entities-should-have-a-title", (lint) => {
276
+ (0, import_vitest.test)("missing title should trigger", async () => {
277
+ const definition = {
278
+ entities: { [ENTITY_NAME]: {} }
279
+ };
280
+ const results = await lint(definition);
281
+ (0, import_vitest.expect)(results).toHaveLength(1);
282
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME]);
283
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
284
+ });
285
+ (0, import_vitest.test)("empty title should trigger", async () => {
286
+ const definition = {
287
+ entities: { [ENTITY_NAME]: { title: EMPTY_STRING } }
288
+ };
289
+ const results = await lint(definition);
290
+ (0, import_vitest.expect)(results).toHaveLength(1);
291
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME, "title"]);
292
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
293
+ });
294
+ (0, import_vitest.test)("valid title should not trigger", async () => {
295
+ const definition = {
296
+ entities: { [ENTITY_NAME]: { title: TRUTHY_STRING } }
297
+ };
298
+ const results = await lint(definition);
299
+ (0, import_vitest.expect)(results).toHaveLength(0);
300
+ });
301
+ });
302
+ describeRule("entities-must-have-a-description", (lint) => {
303
+ (0, import_vitest.test)("missing description should trigger", async () => {
304
+ const definition = {
305
+ entities: { [ENTITY_NAME]: {} }
306
+ };
307
+ const results = await lint(definition);
308
+ (0, import_vitest.expect)(results).toHaveLength(1);
309
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME]);
310
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
311
+ });
312
+ (0, import_vitest.test)("empty description should trigger", async () => {
313
+ const definition = {
314
+ entities: { [ENTITY_NAME]: { description: EMPTY_STRING } }
315
+ };
316
+ const results = await lint(definition);
317
+ (0, import_vitest.expect)(results).toHaveLength(1);
318
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME, "description"]);
319
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
320
+ });
321
+ (0, import_vitest.test)("valid description should not trigger", async () => {
322
+ const definition = {
323
+ entities: { [ENTITY_NAME]: { description: TRUTHY_STRING } }
324
+ };
325
+ const results = await lint(definition);
326
+ (0, import_vitest.expect)(results).toHaveLength(0);
327
+ });
328
+ });
329
+ describeRule("entity-fields-should-have-a-title", (lint) => {
330
+ (0, import_vitest.test)("missing title should trigger", async () => {
331
+ const definition = {
332
+ entities: { [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } }
333
+ };
334
+ const results = await lint(definition);
335
+ (0, import_vitest.expect)(results).toHaveLength(1);
336
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME, "schema", "properties", PARAM_NAME, ZUI]);
337
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
338
+ });
339
+ (0, import_vitest.test)("empty title should trigger", async () => {
340
+ const definition = {
341
+ entities: {
342
+ [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } }
343
+ }
344
+ };
345
+ const results = await lint(definition);
346
+ (0, import_vitest.expect)(results).toHaveLength(1);
347
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME, "schema", "properties", PARAM_NAME, ZUI, "title"]);
348
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
349
+ });
350
+ (0, import_vitest.test)("valid title should not trigger", async () => {
351
+ const definition = {
352
+ entities: {
353
+ [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } }
354
+ }
355
+ };
356
+ const results = await lint(definition);
357
+ (0, import_vitest.expect)(results).toHaveLength(0);
358
+ });
359
+ });
360
+ describeRule("entity-fields-must-have-a-description", (lint) => {
361
+ (0, import_vitest.test)("missing description should trigger", async () => {
362
+ const definition = {
363
+ entities: { [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: {} } } } }
364
+ };
365
+ const results = await lint(definition);
366
+ (0, import_vitest.expect)(results).toHaveLength(1);
367
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME, "schema", "properties", PARAM_NAME]);
368
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
369
+ });
370
+ (0, import_vitest.test)("empty description should trigger", async () => {
371
+ const definition = {
372
+ entities: {
373
+ [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } }
374
+ }
375
+ };
376
+ const results = await lint(definition);
377
+ (0, import_vitest.expect)(results).toHaveLength(1);
378
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["entities", ENTITY_NAME, "schema", "properties", PARAM_NAME, "description"]);
379
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
380
+ });
381
+ (0, import_vitest.test)("valid description should not trigger", async () => {
382
+ const definition = {
383
+ entities: {
384
+ [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } }
385
+ }
386
+ };
387
+ const results = await lint(definition);
388
+ (0, import_vitest.expect)(results).toHaveLength(0);
389
+ });
390
+ });
391
+ //# sourceMappingURL=interface.ruleset.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/linter/ruleset-tests/interface.ruleset.test.ts"],
4
+ "sourcesContent": ["import { test, expect } from 'vitest'\nimport { INTERFACE_RULESET } from '../rulesets/interface.ruleset'\nimport { createDescribeRule, type RecursivePartial } from './common'\nimport { type CreateInterfaceBody } from '../../api/interface-body'\n\ntype PartialInterface = RecursivePartial<CreateInterfaceBody>\nconst describeRule = createDescribeRule<CreateInterfaceBody>()(INTERFACE_RULESET)\n\nconst EMPTY_STRING = ''\nconst TRUTHY_STRING = 'truthy'\nconst ACTION_NAME = 'actionName'\nconst EVENT_NAME = 'eventName'\nconst PARAM_NAME = 'paramName'\nconst CHANNEL_NAME = 'channelName'\nconst STATE_NAME = 'stateName'\nconst ENTITY_NAME = 'entityName'\nconst MESSAGE_TYPE = 'text'\nconst ZUI = 'x-zui'\nconst LEGACY_ZUI = 'ui'\n\ndescribeRule('action-inputparams-should-have-a-title', (lint) => {\n test('missing title should trigger', async () => {\n // arrange\n const definition = {\n actions: { [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['actions', ACTION_NAME, 'input', 'schema', 'properties', PARAM_NAME, ZUI])\n expect(results[0]?.message).toContain('title')\n })\n\n test('empty title should trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual([\n 'actions',\n ACTION_NAME,\n 'input',\n 'schema',\n 'properties',\n PARAM_NAME,\n ZUI,\n 'title',\n ])\n expect(results[0]?.message).toContain('title')\n })\n\n test('valid title should not trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('action-inputparams-must-have-a-description', (lint) => {\n test('missing description should trigger', async () => {\n // arrange\n const definition = {\n actions: { [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: {} } } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['actions', ACTION_NAME, 'input', 'schema', 'properties', PARAM_NAME])\n expect(results[0]?.message).toContain('description')\n })\n\n test('empty description should trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual([\n 'actions',\n ACTION_NAME,\n 'input',\n 'schema',\n 'properties',\n PARAM_NAME,\n 'description',\n ])\n expect(results[0]?.message).toContain('description')\n })\n\n test('valid description should not trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { input: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('action-outputparams-should-have-a-title', (lint) => {\n test('missing title should trigger', async () => {\n // arrange\n const definition = {\n actions: { [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['actions', ACTION_NAME, 'output', 'schema', 'properties', PARAM_NAME, ZUI])\n expect(results[0]?.message).toContain('title')\n })\n\n test('empty title should trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual([\n 'actions',\n ACTION_NAME,\n 'output',\n 'schema',\n 'properties',\n PARAM_NAME,\n ZUI,\n 'title',\n ])\n expect(results[0]?.message).toContain('title')\n })\n\n test('valid title should not trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('action-outputparams-must-have-a-description', (lint) => {\n test('missing description should trigger', async () => {\n // arrange\n const definition = {\n actions: { [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: {} } } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['actions', ACTION_NAME, 'output', 'schema', 'properties', PARAM_NAME])\n expect(results[0]?.message).toContain('description')\n })\n\n test('empty description should trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual([\n 'actions',\n ACTION_NAME,\n 'output',\n 'schema',\n 'properties',\n PARAM_NAME,\n 'description',\n ])\n expect(results[0]?.message).toContain('description')\n })\n\n test('valid description should not trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { output: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('event-outputparams-should-have-title', (lint) => {\n test('missing title should trigger', async () => {\n // arrange\n const definition = {\n events: { [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['events', EVENT_NAME, 'schema', 'properties', PARAM_NAME, ZUI])\n expect(results[0]?.message).toContain('title')\n })\n\n test('empty title should trigger', async () => {\n // arrange\n const definition = {\n events: {\n [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['events', EVENT_NAME, 'schema', 'properties', PARAM_NAME, ZUI, 'title'])\n expect(results[0]?.message).toContain('title')\n })\n\n test('valid title should not trigger', async () => {\n // arrange\n const definition = {\n events: {\n [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('event-outputparams-must-have-description', (lint) => {\n test('missing description should trigger', async () => {\n // arrange\n const definition = {\n events: { [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: {} } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['events', EVENT_NAME, 'schema', 'properties', PARAM_NAME])\n expect(results[0]?.message).toContain('description')\n })\n\n test('empty description should trigger', async () => {\n // arrange\n const definition = {\n events: {\n [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['events', EVENT_NAME, 'schema', 'properties', PARAM_NAME, 'description'])\n expect(results[0]?.message).toContain('description')\n })\n\n test('valid description should not trigger', async () => {\n // arrange\n const definition = {\n events: {\n [EVENT_NAME]: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('legacy-zui-title-should-be-removed', (lint) => {\n test('legacy zui title should trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { input: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } },\n },\n events: { [EVENT_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } },\n channels: {\n [CHANNEL_NAME]: {\n messages: { [MESSAGE_TYPE]: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } },\n },\n },\n entities: { [ENTITY_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { title: TRUTHY_STRING } }, schema: {} } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(4)\n expect(results[0]?.message).toContain('.title()')\n })\n})\n\ndescribeRule('legacy-zui-examples-should-be-removed', (lint) => {\n test('legacy zui examples should trigger', async () => {\n // arrange\n const definition = {\n actions: {\n [ACTION_NAME]: { input: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } },\n },\n events: { [EVENT_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } },\n channels: {\n [CHANNEL_NAME]: {\n messages: { [MESSAGE_TYPE]: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } },\n },\n },\n entities: { [ENTITY_NAME]: { [LEGACY_ZUI]: { [PARAM_NAME]: { examples: [TRUTHY_STRING] } }, schema: {} } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(4)\n expect(results[0]?.message).toContain('examples')\n })\n})\n\ndescribeRule('entities-should-have-a-title', (lint) => {\n test('missing title should trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: {} },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME])\n expect(results[0]?.message).toContain('title')\n })\n\n test('empty title should trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: { title: EMPTY_STRING } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME, 'title'])\n expect(results[0]?.message).toContain('title')\n })\n\n test('valid title should not trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: { title: TRUTHY_STRING } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('entities-must-have-a-description', (lint) => {\n test('missing description should trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: {} },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME])\n expect(results[0]?.message).toContain('description')\n })\n\n test('empty description should trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: { description: EMPTY_STRING } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME, 'description'])\n expect(results[0]?.message).toContain('description')\n })\n\n test('valid description should not trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: { description: TRUTHY_STRING } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('entity-fields-should-have-a-title', (lint) => {\n test('missing title should trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: {} } } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME, 'schema', 'properties', PARAM_NAME, ZUI])\n expect(results[0]?.message).toContain('title')\n })\n\n test('empty title should trigger', async () => {\n // arrange\n const definition = {\n entities: {\n [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: EMPTY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME, 'schema', 'properties', PARAM_NAME, ZUI, 'title'])\n expect(results[0]?.message).toContain('title')\n })\n\n test('valid title should not trigger', async () => {\n // arrange\n const definition = {\n entities: {\n [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { [ZUI]: { title: TRUTHY_STRING } } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n\ndescribeRule('entity-fields-must-have-a-description', (lint) => {\n test('missing description should trigger', async () => {\n // arrange\n const definition = {\n entities: { [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: {} } } } },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME, 'schema', 'properties', PARAM_NAME])\n expect(results[0]?.message).toContain('description')\n })\n\n test('empty description should trigger', async () => {\n // arrange\n const definition = {\n entities: {\n [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { description: EMPTY_STRING } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(1)\n expect(results[0]?.path).toEqual(['entities', ENTITY_NAME, 'schema', 'properties', PARAM_NAME, 'description'])\n expect(results[0]?.message).toContain('description')\n })\n\n test('valid description should not trigger', async () => {\n // arrange\n const definition = {\n entities: {\n [ENTITY_NAME]: { schema: { properties: { [PARAM_NAME]: { description: TRUTHY_STRING } } } },\n },\n } as const satisfies PartialInterface\n\n // act\n const results = await lint(definition)\n\n // assert\n expect(results).toHaveLength(0)\n })\n})\n"],
5
+ "mappings": ";AAAA,oBAA6B;AAC7B,uBAAkC;AAClC,oBAA0D;AAI1D,MAAM,mBAAe,kCAAwC,EAAE,kCAAiB;AAEhF,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,eAAe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,EAAE,EAAE;AAAA,MAC5F;AAAA,IACF;AAGA,UAAM,UAAU,MAAM,KAAK,UAAU;AAGrC,8BAAO,OAAO,EAAE,aAAa,CAAC;AAAA,EAChC,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var bot_ruleset_exports = {};
20
+ __export(bot_ruleset_exports, {
21
+ BOT_RULESET: () => BOT_RULESET
22
+ });
23
+ module.exports = __toCommonJS(bot_ruleset_exports);
24
+ var import_spectral_functions = require("@stoplight/spectral-functions");
25
+ var import_spectral_functions2 = require("../spectral-functions");
26
+ const BOT_RULESET = {
27
+ extends: [],
28
+ rules: {
29
+ "event-outputparams-should-have-title": {
30
+ description: "All event output parameters SHOULD have a title",
31
+ message: "{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema",
32
+ severity: "warn",
33
+ given: "$.events[*].schema..properties[*]",
34
+ then: [
35
+ {
36
+ field: "x-zui.title",
37
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `output parameter "${path.at(-3)}" of event "${path[1]}"`)
38
+ }
39
+ ]
40
+ },
41
+ "event-outputparams-must-have-description": {
42
+ description: "All event output parameters MUST have a description",
43
+ message: "{{description}}: {{error}} SHOULD provide a non-empty description by using .describe() in its Zod schema",
44
+ severity: "error",
45
+ given: "$.events[*].schema..properties[*]",
46
+ then: [
47
+ {
48
+ field: "description",
49
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `output parameter "${path.at(-2)}" of event "${path[1]}"`)
50
+ }
51
+ ]
52
+ },
53
+ "configuration-fields-must-have-a-title": {
54
+ description: "All configuration fields MUST have a title",
55
+ message: "{{description}}: {{property}} MUST provide a non-empty title by using .title() in its Zod schema",
56
+ severity: "error",
57
+ given: "$.configuration.schema..properties[*].x-zui",
58
+ then: [
59
+ {
60
+ field: "title",
61
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `configuration parameter "${path.at(-3)}"`)
62
+ }
63
+ ]
64
+ },
65
+ "configuration-fields-must-have-a-description": {
66
+ description: "All configuration fields MUST have a description",
67
+ message: "{{description}}: {{property}} MUST provide a non-empty description by using .describe() in its Zod schema",
68
+ severity: "error",
69
+ given: "$.configuration.schema..properties[*]",
70
+ then: [
71
+ {
72
+ field: "description",
73
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `configuration parameter "${path.at(-2)}"`)
74
+ }
75
+ ]
76
+ },
77
+ "user-tags-should-have-a-title": {
78
+ description: "All user tags SHOULD have a title",
79
+ message: "{{description}}: {{error}} SHOULD have a non-empty title",
80
+ severity: "warn",
81
+ given: "$.user.tags[*]",
82
+ then: [
83
+ {
84
+ field: "title",
85
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `user tag "${path[2]}"`)
86
+ }
87
+ ]
88
+ },
89
+ "user-tags-must-have-a-description": {
90
+ description: "All user tags MUST have a description",
91
+ message: "{{description}}: {{error}} MUST have a non-empty description",
92
+ severity: "error",
93
+ given: "$.user.tags[*]",
94
+ then: [
95
+ {
96
+ field: "description",
97
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `user tag "${path[2]}"`)
98
+ }
99
+ ]
100
+ },
101
+ "conversation-tags-should-have-a-title": {
102
+ description: "All conversation tags SHOULD have a title",
103
+ message: "{{description}}: {{error}} SHOULD have a non-empty title",
104
+ severity: "warn",
105
+ given: "$.conversation.tags[*]",
106
+ then: [
107
+ {
108
+ field: "title",
109
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `conversation tag "${path[2]}"`)
110
+ }
111
+ ]
112
+ },
113
+ "conversation-tags-must-have-a-description": {
114
+ description: "All conversation tags MUST have a description",
115
+ message: "{{description}}: {{error}} MUST have a non-empty description",
116
+ severity: "error",
117
+ given: "$.conversation.tags[*]",
118
+ then: [
119
+ {
120
+ field: "description",
121
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `conversation tag "${path[2]}"`)
122
+ }
123
+ ]
124
+ },
125
+ "message-tags-should-have-a-title": {
126
+ description: "All message tags SHOULD have a title",
127
+ message: "{{description}}: {{error}} SHOULD have a non-empty title",
128
+ severity: "warn",
129
+ given: "$.message.tags[*]",
130
+ then: [
131
+ {
132
+ field: "title",
133
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `message tag "${path[2]}"`)
134
+ }
135
+ ]
136
+ },
137
+ "message-tags-must-have-a-description": {
138
+ description: "All message tags MUST have a description",
139
+ message: "{{description}}: {{error}} MUST have a non-empty description",
140
+ severity: "error",
141
+ given: "$.message.tags[*]",
142
+ then: [
143
+ {
144
+ field: "description",
145
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `message tag "${path[2]}"`)
146
+ }
147
+ ]
148
+ },
149
+ "legacy-zui-title-should-be-removed": {
150
+ description: "Legacy ZUI title fields (ui.title) SHOULD be removed. Please use .title() in your Zod schemas instead",
151
+ severity: "error",
152
+ given: "$..ui[*].title",
153
+ then: [{ function: import_spectral_functions.falsy }]
154
+ },
155
+ "legacy-zui-examples-should-be-removed": {
156
+ description: "Legacy ZUI examples fields (ui.examples) SHOULD be removed. There are currently no alternatives",
157
+ severity: "hint",
158
+ given: "$..ui[*].examples",
159
+ then: [{ function: import_spectral_functions.falsy }]
160
+ },
161
+ "state-fields-should-have-title": {
162
+ description: "All state fields SHOULD have a title",
163
+ message: "{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema",
164
+ severity: "warn",
165
+ given: "$.states[*].schema..properties[*]",
166
+ then: [
167
+ {
168
+ field: "x-zui.title",
169
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `field "${path.at(-3)}" of state "${path[1]}"`)
170
+ }
171
+ ]
172
+ },
173
+ "state-fields-must-have-description": {
174
+ description: "All state fields MUST have a description",
175
+ message: "{{description}}: {{error}} SHOULD provide a non-empty description by using .describe() in its Zod schema",
176
+ severity: "error",
177
+ given: "$.states[*].schema..properties[*]",
178
+ then: [
179
+ {
180
+ field: "description",
181
+ function: (0, import_spectral_functions2.truthyWithMessage)(({ path }) => `field "${path.at(-2)}" of state "${path[1]}"`)
182
+ }
183
+ ]
184
+ }
185
+ }
186
+ };
187
+ // Annotate the CommonJS export names for ESM import in node:
188
+ 0 && (module.exports = {
189
+ BOT_RULESET
190
+ });
191
+ //# sourceMappingURL=bot.ruleset.js.map