@auto-engineer/narrative 0.11.20 → 0.12.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 (69) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +24 -0
  3. package/dist/src/fluent-builder.d.ts.map +1 -1
  4. package/dist/src/fluent-builder.js +9 -12
  5. package/dist/src/fluent-builder.js.map +1 -1
  6. package/dist/src/getNarratives.specs.js +43 -27
  7. package/dist/src/getNarratives.specs.js.map +1 -1
  8. package/dist/src/id/addAutoIds.specs.js +11 -25
  9. package/dist/src/id/addAutoIds.specs.js.map +1 -1
  10. package/dist/src/id/hasAllIds.specs.js +12 -12
  11. package/dist/src/index.d.ts +2 -1
  12. package/dist/src/index.d.ts.map +1 -1
  13. package/dist/src/index.js +1 -1
  14. package/dist/src/index.js.map +1 -1
  15. package/dist/src/model-to-narrative.specs.js +110 -108
  16. package/dist/src/model-to-narrative.specs.js.map +1 -1
  17. package/dist/src/narrative-context.d.ts +4 -2
  18. package/dist/src/narrative-context.d.ts.map +1 -1
  19. package/dist/src/narrative-context.js +98 -95
  20. package/dist/src/narrative-context.js.map +1 -1
  21. package/dist/src/narrative.d.ts +7 -1
  22. package/dist/src/narrative.d.ts.map +1 -1
  23. package/dist/src/narrative.js +27 -6
  24. package/dist/src/narrative.js.map +1 -1
  25. package/dist/src/samples/items.narrative.js +7 -7
  26. package/dist/src/samples/items.narrative.js.map +1 -1
  27. package/dist/src/samples/place-order.narrative.js +4 -4
  28. package/dist/src/samples/place-order.narrative.js.map +1 -1
  29. package/dist/src/samples/questionnaires.narrative.js +16 -18
  30. package/dist/src/samples/questionnaires.narrative.js.map +1 -1
  31. package/dist/src/samples/seasonal-assistant.schema.json +37 -31
  32. package/dist/src/schema.d.ts +91 -462
  33. package/dist/src/schema.d.ts.map +1 -1
  34. package/dist/src/schema.js +22 -24
  35. package/dist/src/schema.js.map +1 -1
  36. package/dist/src/slice-builder.js +2 -2
  37. package/dist/src/slice-builder.js.map +1 -1
  38. package/dist/src/transformers/model-to-narrative/generators/flow.d.ts.map +1 -1
  39. package/dist/src/transformers/model-to-narrative/generators/flow.js +34 -10
  40. package/dist/src/transformers/model-to-narrative/generators/flow.js.map +1 -1
  41. package/dist/src/transformers/model-to-narrative/generators/imports.d.ts +1 -1
  42. package/dist/src/transformers/model-to-narrative/generators/imports.d.ts.map +1 -1
  43. package/dist/src/transformers/model-to-narrative/generators/imports.js +2 -1
  44. package/dist/src/transformers/model-to-narrative/generators/imports.js.map +1 -1
  45. package/dist/src/transformers/narrative-to-model/index.d.ts.map +1 -1
  46. package/dist/src/transformers/narrative-to-model/index.js +4 -8
  47. package/dist/src/transformers/narrative-to-model/index.js.map +1 -1
  48. package/dist/src/transformers/narrative-to-model/type-inference.specs.js +3 -3
  49. package/dist/src/transformers/narrative-to-model/type-inference.specs.js.map +1 -1
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +5 -5
  52. package/src/fluent-builder.ts +9 -12
  53. package/src/getNarratives.specs.ts +43 -28
  54. package/src/id/addAutoIds.specs.ts +11 -25
  55. package/src/id/hasAllIds.specs.ts +12 -12
  56. package/src/index.ts +2 -1
  57. package/src/model-to-narrative.specs.ts +110 -108
  58. package/src/narrative-context.ts +103 -101
  59. package/src/narrative.ts +44 -6
  60. package/src/samples/items.narrative.ts +7 -7
  61. package/src/samples/place-order.narrative.ts +4 -4
  62. package/src/samples/questionnaires.narrative.ts +17 -18
  63. package/src/samples/seasonal-assistant.schema.json +37 -31
  64. package/src/schema.ts +33 -24
  65. package/src/slice-builder.ts +2 -2
  66. package/src/transformers/model-to-narrative/generators/flow.ts +53 -23
  67. package/src/transformers/model-to-narrative/generators/imports.ts +2 -1
  68. package/src/transformers/narrative-to-model/index.ts +4 -7
  69. package/src/transformers/narrative-to-model/type-inference.specs.ts +3 -3
package/package.json CHANGED
@@ -23,9 +23,9 @@
23
23
  "typescript": "^5.9.2",
24
24
  "zod": "^3.22.4",
25
25
  "zod-to-json-schema": "^3.22.3",
26
- "@auto-engineer/file-store": "0.11.20",
27
- "@auto-engineer/id": "0.11.20",
28
- "@auto-engineer/message-bus": "0.11.20"
26
+ "@auto-engineer/file-store": "0.12.1",
27
+ "@auto-engineer/id": "0.12.1",
28
+ "@auto-engineer/message-bus": "0.12.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.0.0",
@@ -33,12 +33,12 @@
33
33
  "eslint-plugin-sort-keys-fix": "^1.1.2",
34
34
  "fake-indexeddb": "^6.0.0",
35
35
  "tsx": "^4.20.3",
36
- "@auto-engineer/cli": "0.11.20"
36
+ "@auto-engineer/cli": "0.12.1"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "version": "0.11.20",
41
+ "version": "0.12.1",
42
42
  "scripts": {
43
43
  "build": "tsx scripts/build.ts",
44
44
  "test": "vitest run --reporter=dot",
@@ -72,7 +72,7 @@ class CommandSliceBuilderImpl implements FluentCommandSliceBuilder {
72
72
  type: 'command',
73
73
  name,
74
74
  id,
75
- client: { description: '', specs: undefined },
75
+ client: { specs: [] },
76
76
  server: { description: '', specs: { name: '', rules: [] }, data: undefined },
77
77
  };
78
78
  addSlice(this.slice);
@@ -88,16 +88,15 @@ class CommandSliceBuilderImpl implements FluentCommandSliceBuilder {
88
88
  client(fn: () => void): FluentCommandSliceBuilder;
89
89
  client(description: string, fn: () => void): FluentCommandSliceBuilder;
90
90
  client(descriptionOrFn: string | (() => void), fn?: () => void): FluentCommandSliceBuilder {
91
- const description = typeof descriptionOrFn === 'string' ? descriptionOrFn : '';
92
91
  const callback = typeof descriptionOrFn === 'function' ? descriptionOrFn : fn;
93
92
 
94
- debugCommand('Adding client block to slice %s, description: "%s"', this.slice.name, description);
93
+ debugCommand('Adding client block to slice %s', this.slice.name);
95
94
 
96
95
  if (callback) {
97
96
  const slice = getCurrentSlice();
98
97
  if (slice) {
99
98
  debugCommand('Starting client block execution');
100
- startClientBlock(slice, description);
99
+ startClientBlock(slice);
101
100
  callback();
102
101
  endClientBlock();
103
102
  debugCommand('Client block execution completed');
@@ -179,7 +178,7 @@ class QuerySliceBuilderImpl implements FluentQuerySliceBuilder {
179
178
  type: 'query',
180
179
  name,
181
180
  id,
182
- client: { description: '', specs: undefined },
181
+ client: { specs: [] },
183
182
  server: { description: '', specs: { name: '', rules: [] }, data: undefined },
184
183
  };
185
184
  addSlice(this.slice);
@@ -189,16 +188,15 @@ class QuerySliceBuilderImpl implements FluentQuerySliceBuilder {
189
188
  client(fn: () => void): FluentQuerySliceBuilder;
190
189
  client(description: string, fn: () => void): FluentQuerySliceBuilder;
191
190
  client(descriptionOrFn: string | (() => void), fn?: () => void): FluentQuerySliceBuilder {
192
- const description = typeof descriptionOrFn === 'string' ? descriptionOrFn : '';
193
191
  const callback = typeof descriptionOrFn === 'function' ? descriptionOrFn : fn;
194
192
 
195
- debugQuery('Adding client block to slice %s, description: "%s"', this.slice.name, description);
193
+ debugQuery('Adding client block to slice %s', this.slice.name);
196
194
 
197
195
  if (callback) {
198
196
  const slice = getCurrentSlice();
199
197
  if (slice) {
200
198
  debugQuery('Starting client block execution');
201
- startClientBlock(slice, description);
199
+ startClientBlock(slice);
202
200
  callback();
203
201
  endClientBlock();
204
202
  debugQuery('Client block execution completed');
@@ -320,7 +318,7 @@ class ExperienceSliceBuilderImpl implements FluentExperienceSliceBuilder {
320
318
  type: 'experience',
321
319
  name,
322
320
  id,
323
- client: { description: '', specs: undefined },
321
+ client: { specs: [] },
324
322
  };
325
323
  addSlice(this.slice);
326
324
  debugExperience('Experience slice added to flow: %s', name);
@@ -329,16 +327,15 @@ class ExperienceSliceBuilderImpl implements FluentExperienceSliceBuilder {
329
327
  client(fn: () => void): FluentExperienceSliceBuilder;
330
328
  client(description: string, fn: () => void): FluentExperienceSliceBuilder;
331
329
  client(descriptionOrFn: string | (() => void), fn?: () => void): FluentExperienceSliceBuilder {
332
- const description = typeof descriptionOrFn === 'string' ? descriptionOrFn : '';
333
330
  const callback = typeof descriptionOrFn === 'function' ? descriptionOrFn : fn;
334
331
 
335
- debugExperience('Adding client block to slice %s, description: "%s"', this.slice.name, description);
332
+ debugExperience('Adding client block to slice %s', this.slice.name);
336
333
 
337
334
  if (callback) {
338
335
  const slice = getCurrentSlice();
339
336
  if (slice) {
340
337
  debugExperience('Starting client block execution');
341
- startClientBlock(slice, description);
338
+ startClientBlock(slice);
342
339
  callback();
343
340
  endClientBlock();
344
341
  debugExperience('Client block execution completed');
@@ -56,8 +56,13 @@ describe('getNarratives', (_mode) => {
56
56
  expect(createItemSlice.stream).toBe('item-${id}');
57
57
  if (createItemSlice.type === 'command') {
58
58
  expect(createItemSlice.client.specs).toBeDefined();
59
- expect(createItemSlice.client.specs?.name).toBe('A form that allows users to add items');
60
- expect(createItemSlice.client.specs?.rules).toHaveLength(1);
59
+ expect(Array.isArray(createItemSlice.client.specs)).toBe(true);
60
+ expect(createItemSlice.client.specs).toHaveLength(1);
61
+ expect(createItemSlice.client.specs[0].type).toBe('describe');
62
+ expect(createItemSlice.client.specs[0].title).toBe('A form that allows users to add items');
63
+ if (createItemSlice.client.specs[0].type === 'describe') {
64
+ expect(createItemSlice.client.specs[0].children).toHaveLength(1);
65
+ }
61
66
  expect(createItemSlice.server.specs).toBeDefined();
62
67
  const spec = createItemSlice.server.specs;
63
68
  expect(spec.name).toBeDefined();
@@ -91,8 +96,13 @@ describe('getNarratives', (_mode) => {
91
96
  expect(viewItemSlice.type).toBe('query');
92
97
  expect(viewItemSlice.name).toBe('view items');
93
98
  expect(viewItemSlice.client.specs).toBeDefined();
94
- expect(viewItemSlice.client.specs?.name).toBe('view Items Screen');
95
- expect(viewItemSlice.client.specs?.rules).toHaveLength(3);
99
+ expect(Array.isArray(viewItemSlice.client.specs)).toBe(true);
100
+ expect(viewItemSlice.client.specs).toHaveLength(1);
101
+ expect(viewItemSlice.client.specs[0].type).toBe('describe');
102
+ expect(viewItemSlice.client.specs[0].title).toBe('view Items Screen');
103
+ if (viewItemSlice.client.specs[0].type === 'describe') {
104
+ expect(viewItemSlice.client.specs[0].children).toHaveLength(3);
105
+ }
96
106
  expect(viewItemSlice.request).toBeDefined();
97
107
  expect(viewItemSlice.request).toMatch(
98
108
  /query items\(\$itemId: String!\) {\s+items\(itemId: \$itemId\) {\s+id\s+description\s+}/,
@@ -119,8 +129,13 @@ describe('getNarratives', (_mode) => {
119
129
 
120
130
  if (submitOrderSlice.type === 'command') {
121
131
  expect(submitOrderSlice.client.specs).toBeDefined();
122
- expect(submitOrderSlice.client.specs?.name).toBe('Order submission form');
123
- expect(submitOrderSlice.client.specs?.rules).toHaveLength(2);
132
+ expect(Array.isArray(submitOrderSlice.client.specs)).toBe(true);
133
+ expect(submitOrderSlice.client.specs).toHaveLength(1);
134
+ expect(submitOrderSlice.client.specs[0].type).toBe('describe');
135
+ expect(submitOrderSlice.client.specs[0].title).toBe('Order submission form');
136
+ if (submitOrderSlice.client.specs[0].type === 'describe') {
137
+ expect(submitOrderSlice.client.specs[0].children).toHaveLength(2);
138
+ }
124
139
  expect(submitOrderSlice.server.specs).toBeDefined();
125
140
  const spec = submitOrderSlice.server.specs;
126
141
  expect(spec.rules).toHaveLength(1);
@@ -390,13 +405,13 @@ describe('getNarratives', (_mode) => {
390
405
  it('should handle experience slice with client specs', async () => {
391
406
  const memoryVfs = new InMemoryFileStore();
392
407
  const flowWithExperienceContent = `
393
- import { flow, experience, should, specs } from '@auto-engineer/narrative';
408
+ import { flow, experience, it, specs } from '@auto-engineer/narrative';
394
409
 
395
410
  flow('Test Experience Flow', () => {
396
411
  experience('Homepage', 'AUTO-H1a4Bn6Cy').client(() => {
397
412
  specs(() => {
398
- should('show a hero section with a welcome message');
399
- should('allow user to start the questionnaire');
413
+ it('show a hero section with a welcome message');
414
+ it('allow user to start the questionnaire');
400
415
  });
401
416
  });
402
417
  });
@@ -418,15 +433,12 @@ flow('Test Experience Flow', () => {
418
433
  if (homepageSlice?.type === 'experience') {
419
434
  expect(homepageSlice.client).toBeDefined();
420
435
  expect(homepageSlice.client.specs).toBeDefined();
421
- expect(homepageSlice.client.specs?.rules).toBeDefined();
422
- expect(homepageSlice.client.specs?.rules).toHaveLength(2);
423
-
424
- const rules = homepageSlice.client.specs?.rules;
425
- if (rules && Array.isArray(rules)) {
426
- expect(rules).toHaveLength(2);
427
- expect(rules[0]).toBe('show a hero section with a welcome message');
428
- expect(rules[1]).toBe('allow user to start the questionnaire');
429
- }
436
+ expect(Array.isArray(homepageSlice.client.specs)).toBe(true);
437
+ expect(homepageSlice.client.specs).toHaveLength(2);
438
+ expect(homepageSlice.client.specs[0].type).toBe('it');
439
+ expect(homepageSlice.client.specs[0].title).toBe('show a hero section with a welcome message');
440
+ expect(homepageSlice.client.specs[1].type).toBe('it');
441
+ expect(homepageSlice.client.specs[1].title).toBe('allow user to start the questionnaire');
430
442
  }
431
443
  }
432
444
  });
@@ -434,12 +446,12 @@ flow('Test Experience Flow', () => {
434
446
  it('simulates browser execution with transpiled CommonJS code', async () => {
435
447
  const memoryVfs = new InMemoryFileStore();
436
448
  const flowContent = `
437
- import { flow, experience, should, specs } from '@auto-engineer/narrative';
449
+ import { flow, experience, it, specs } from '@auto-engineer/narrative';
438
450
 
439
451
  flow('Browser Test Flow', () => {
440
452
  experience('HomePage').client(() => {
441
453
  specs(() => {
442
- should('render correctly');
454
+ it('render correctly');
443
455
  });
444
456
  });
445
457
  });
@@ -466,8 +478,10 @@ flow('Browser Test Flow', () => {
466
478
  if (slice.type === 'experience') {
467
479
  expect(slice.client).toBeDefined();
468
480
  expect(slice.client.specs).toBeDefined();
469
- expect(slice.client.specs?.rules).toHaveLength(1);
470
- expect(slice.client.specs?.rules?.[0]).toBe('render correctly');
481
+ expect(Array.isArray(slice.client.specs)).toBe(true);
482
+ expect(slice.client.specs).toHaveLength(1);
483
+ expect(slice.client.specs[0].type).toBe('it');
484
+ expect(slice.client.specs[0].title).toBe('render correctly');
471
485
  }
472
486
  });
473
487
 
@@ -972,7 +986,8 @@ import {
972
986
  query,
973
987
  experience,
974
988
  flow,
975
- should,
989
+ describe,
990
+ it,
976
991
  specs,
977
992
  rule,
978
993
  example,
@@ -1048,9 +1063,9 @@ flow('Questionnaires', 'AUTO-Q9m2Kp4Lx', () => {
1048
1063
  }
1049
1064
  \`)
1050
1065
  .client(() => {
1051
- specs('Questionnaire Link', () => {
1052
- should('display a confirmation message when the link is sent');
1053
- should('handle errors when the link cannot be sent');
1066
+ describe('Questionnaire Link', () => {
1067
+ it('display a confirmation message when the link is sent');
1068
+ it('handle errors when the link cannot be sent');
1054
1069
  });
1055
1070
  });
1056
1071
 
@@ -1080,8 +1095,8 @@ flow('Questionnaires', 'AUTO-Q9m2Kp4Lx', () => {
1080
1095
  }
1081
1096
  \`)
1082
1097
  .client(() => {
1083
- specs('Submission Confirmation', () => {
1084
- should('display a confirmation message upon successful submission');
1098
+ describe('Submission Confirmation', () => {
1099
+ it('display a confirmation message upon successful submission');
1085
1100
  });
1086
1101
  });
1087
1102
  });`;
@@ -12,7 +12,7 @@ describe('addAutoIds', () => {
12
12
  {
13
13
  type: 'command',
14
14
  name: 'Test Command Slice',
15
- client: { description: 'Test client' },
15
+ client: { specs: [] },
16
16
  server: {
17
17
  description: 'Test server',
18
18
  specs: {
@@ -35,7 +35,7 @@ describe('addAutoIds', () => {
35
35
  type: 'query',
36
36
  name: 'Test Query Slice',
37
37
  id: 'EXISTING-SLICE-001',
38
- client: { description: 'Test client' },
38
+ client: { specs: [] },
39
39
  server: {
40
40
  description: 'Test server',
41
41
  specs: {
@@ -135,7 +135,7 @@ describe('addAutoIds', () => {
135
135
  {
136
136
  type: 'command',
137
137
  name: 'Simple Command',
138
- client: { description: 'Simple client' },
138
+ client: { specs: [] },
139
139
  server: {
140
140
  description: 'Simple server',
141
141
  specs: {
@@ -176,11 +176,10 @@ describe('addAutoIds', () => {
176
176
  type: 'experience',
177
177
  name: 'User Onboarding Experience',
178
178
  client: {
179
- description: 'User onboarding client',
180
- specs: {
181
- name: 'Onboarding Specs',
182
- rules: ['User should see welcome message', 'User should complete profile setup'],
183
- },
179
+ specs: [
180
+ { type: 'it', title: 'User should see welcome message' },
181
+ { type: 'it', title: 'User should complete profile setup' },
182
+ ],
184
183
  },
185
184
  },
186
185
  {
@@ -188,11 +187,7 @@ describe('addAutoIds', () => {
188
187
  name: 'Checkout Experience',
189
188
  id: 'EXISTING-EXPERIENCE-SLICE-001',
190
189
  client: {
191
- description: 'Checkout client',
192
- specs: {
193
- name: 'Checkout Specs',
194
- rules: ['User should review cart items'],
195
- },
190
+ specs: [{ type: 'it', title: 'User should review cart items' }],
196
191
  },
197
192
  },
198
193
  ],
@@ -226,10 +221,7 @@ describe('addAutoIds', () => {
226
221
  name: 'Active Surveys Summary',
227
222
  type: 'experience',
228
223
  client: {
229
- specs: {
230
- name: '',
231
- rules: ['show active surveys summary'],
232
- },
224
+ specs: [{ type: 'it', title: 'show active surveys summary' }],
233
225
  },
234
226
  },
235
227
  ],
@@ -242,10 +234,7 @@ describe('addAutoIds', () => {
242
234
  name: 'Create Survey Form',
243
235
  type: 'experience',
244
236
  client: {
245
- specs: {
246
- name: '',
247
- rules: ['allow entering survey title'],
248
- },
237
+ specs: [{ type: 'it', title: 'allow entering survey title' }],
249
238
  },
250
239
  },
251
240
  ],
@@ -258,10 +247,7 @@ describe('addAutoIds', () => {
258
247
  name: 'Response Rate Charts',
259
248
  type: 'experience',
260
249
  client: {
261
- specs: {
262
- name: '',
263
- rules: ['show daily response rate charts'],
264
- },
250
+ specs: [{ type: 'it', title: 'show daily response rate charts' }],
265
251
  },
266
252
  },
267
253
  ],
@@ -58,13 +58,13 @@ flow('Test Flow with IDs', 'FLOW-001', () => {
58
58
  });`;
59
59
 
60
60
  const multipleFlowsSameSource = `
61
- import { flow, specs, should } from '../narrative';
61
+ import { flow, specs, it } from '../narrative';
62
62
  import { experience } from '../fluent-builder';
63
63
 
64
64
  flow('Home Screen', 'AUTO-aifPcU3hw', () => {
65
65
  experience('Active Surveys Summary', 'AUTO-slice1').client(() => {
66
66
  specs(() => {
67
- should('show active surveys summary');
67
+ it('show active surveys summary');
68
68
  });
69
69
  });
70
70
  });
@@ -72,7 +72,7 @@ flow('Home Screen', 'AUTO-aifPcU3hw', () => {
72
72
  flow('Create Survey', 'AUTO-MPviTMrQC', () => {
73
73
  experience('Create Survey Form', 'AUTO-slice2').client(() => {
74
74
  specs(() => {
75
- should('allow entering survey title');
75
+ it('allow entering survey title');
76
76
  });
77
77
  });
78
78
  });
@@ -80,19 +80,19 @@ flow('Create Survey', 'AUTO-MPviTMrQC', () => {
80
80
  flow('Response Analytics', 'AUTO-eME978Euk', () => {
81
81
  experience('Response Rate Charts', 'AUTO-slice3').client(() => {
82
82
  specs(() => {
83
- should('show daily response rate charts');
83
+ it('show daily response rate charts');
84
84
  });
85
85
  });
86
86
  });`;
87
87
 
88
88
  const multipleFlowsIncomplete = `
89
- import { flow, specs, should } from '../narrative';
89
+ import { flow, specs, it } from '../narrative';
90
90
  import { experience } from '../fluent-builder';
91
91
 
92
92
  flow('Home Screen', 'AUTO-aifPcU3hw', () => {
93
93
  experience('Active Surveys Summary', 'AUTO-slice1').client(() => {
94
94
  specs(() => {
95
- should('show active surveys summary');
95
+ it('show active surveys summary');
96
96
  });
97
97
  });
98
98
  });
@@ -100,7 +100,7 @@ flow('Home Screen', 'AUTO-aifPcU3hw', () => {
100
100
  flow('Create Survey', () => {
101
101
  experience('Create Survey Form', 'AUTO-slice2').client(() => {
102
102
  specs(() => {
103
- should('allow entering survey title');
103
+ it('allow entering survey title');
104
104
  });
105
105
  });
106
106
  });
@@ -108,19 +108,19 @@ flow('Create Survey', () => {
108
108
  flow('Response Analytics', 'AUTO-eME978Euk', () => {
109
109
  experience('Response Rate Charts', 'AUTO-slice3').client(() => {
110
110
  specs(() => {
111
- should('show daily response rate charts');
111
+ it('show daily response rate charts');
112
112
  });
113
113
  });
114
114
  });`;
115
115
 
116
116
  const multipleFlowsSliceMissing = `
117
- import { flow, specs, should } from '../narrative';
117
+ import { flow, specs, it } from '../narrative';
118
118
  import { experience } from '../fluent-builder';
119
119
 
120
120
  flow('Home Screen', 'AUTO-aifPcU3hw', () => {
121
121
  experience('Active Surveys Summary', 'AUTO-slice1').client(() => {
122
122
  specs(() => {
123
- should('show active surveys summary');
123
+ it('show active surveys summary');
124
124
  });
125
125
  });
126
126
  });
@@ -128,7 +128,7 @@ flow('Home Screen', 'AUTO-aifPcU3hw', () => {
128
128
  flow('Create Survey', 'AUTO-MPviTMrQC', () => {
129
129
  experience('Create Survey Form').client(() => {
130
130
  specs(() => {
131
- should('allow entering survey title');
131
+ it('allow entering survey title');
132
132
  });
133
133
  });
134
134
  });
@@ -136,7 +136,7 @@ flow('Create Survey', 'AUTO-MPviTMrQC', () => {
136
136
  flow('Response Analytics', 'AUTO-eME978Euk', () => {
137
137
  experience('Response Rate Charts', 'AUTO-slice3').client(() => {
138
138
  specs(() => {
139
- should('show daily response rate charts');
139
+ it('show daily response rate charts');
140
140
  });
141
141
  });
142
142
  });`;
package/src/index.ts CHANGED
@@ -44,7 +44,7 @@ export type { FieldSelector } from './data-narrative-builders';
44
44
 
45
45
  // Narrative language functions
46
46
  export { narrative, narrative as flow } from './narrative';
47
- export { client, server, specs, should, request, data, rule, example } from './narrative';
47
+ export { client, server, specs, describe, it, should, request, data, rule, example } from './narrative';
48
48
  export type { SliceTypeValueInterface } from './narrative';
49
49
  export { SliceType } from './narrative';
50
50
 
@@ -115,6 +115,7 @@ export type Example = z.infer<typeof ExampleSchema>;
115
115
  export type MessageField = z.infer<typeof MessageFieldSchema>;
116
116
  export type Rule = z.infer<typeof RuleSchema>;
117
117
  export type Spec = z.infer<typeof SpecSchema>;
118
+ export type { ClientSpecNode } from './schema';
118
119
 
119
120
  // ID assignment utilities
120
121
  export { addAutoIds, hasAllIds } from './id';