@xyne/workflow-sdk 3.2.61 → 3.2.62

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 (112) hide show
  1. package/dist/agents/compaction.d.ts +62 -0
  2. package/dist/agents/compaction.d.ts.map +1 -0
  3. package/dist/agents/compaction.js +153 -0
  4. package/dist/agents/compaction.js.map +1 -0
  5. package/dist/agents/host-agent-step.d.ts +2 -2
  6. package/dist/agents/llm-call-policy.d.ts +48 -0
  7. package/dist/agents/llm-call-policy.d.ts.map +1 -0
  8. package/dist/agents/llm-call-policy.js +140 -0
  9. package/dist/agents/llm-call-policy.js.map +1 -0
  10. package/dist/builder/index.d.ts +1 -1
  11. package/dist/builder/index.d.ts.map +1 -1
  12. package/dist/builder/index.js.map +1 -1
  13. package/dist/client/index.d.ts +1 -1
  14. package/dist/client/index.d.ts.map +1 -1
  15. package/dist/client/types.d.ts +10 -2
  16. package/dist/client/types.d.ts.map +1 -1
  17. package/dist/client/workflow-client.d.ts.map +1 -1
  18. package/dist/client/workflow-client.js +8 -0
  19. package/dist/client/workflow-client.js.map +1 -1
  20. package/dist/connectors/builtin/steps/parallel.step.d.ts +4 -4
  21. package/dist/connectors/builtin/steps/wait-for-human.step.d.ts +7 -0
  22. package/dist/connectors/builtin/steps/wait-for-human.step.d.ts.map +1 -1
  23. package/dist/connectors/builtin/steps/wait-for-human.step.js +15 -0
  24. package/dist/connectors/builtin/steps/wait-for-human.step.js.map +1 -1
  25. package/dist/engine/workflow-executor.d.ts.map +1 -1
  26. package/dist/engine/workflow-executor.js +6 -0
  27. package/dist/engine/workflow-executor.js.map +1 -1
  28. package/dist/expression/recalc.d.ts +26 -0
  29. package/dist/expression/recalc.d.ts.map +1 -0
  30. package/dist/expression/recalc.js +62 -0
  31. package/dist/expression/recalc.js.map +1 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +1 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/persistence/in-memory-adapter.d.ts +7 -0
  37. package/dist/persistence/in-memory-adapter.d.ts.map +1 -1
  38. package/dist/persistence/in-memory-adapter.js +35 -2
  39. package/dist/persistence/in-memory-adapter.js.map +1 -1
  40. package/dist/persistence/types.d.ts +32 -1
  41. package/dist/persistence/types.d.ts.map +1 -1
  42. package/dist/router/workflow-router.d.ts.map +1 -1
  43. package/dist/router/workflow-router.js +19 -1
  44. package/dist/router/workflow-router.js.map +1 -1
  45. package/dist/runtime/workflow-runtime.d.ts +89 -4
  46. package/dist/runtime/workflow-runtime.d.ts.map +1 -1
  47. package/dist/runtime/workflow-runtime.js +176 -13
  48. package/dist/runtime/workflow-runtime.js.map +1 -1
  49. package/dist/types/audit-log.d.ts +55 -0
  50. package/dist/types/audit-log.d.ts.map +1 -0
  51. package/dist/types/audit-log.js +2 -0
  52. package/dist/types/audit-log.js.map +1 -0
  53. package/dist/types/index.d.ts +1 -1
  54. package/dist/types/index.d.ts.map +1 -1
  55. package/dist/types/index.js.map +1 -1
  56. package/dist/types/workflow-config.d.ts +56 -0
  57. package/dist/types/workflow-config.d.ts.map +1 -1
  58. package/dist/types/workflow-config.js +16 -0
  59. package/dist/types/workflow-config.js.map +1 -1
  60. package/dist/util/gate-assignees.d.ts +2 -0
  61. package/dist/util/gate-assignees.d.ts.map +1 -0
  62. package/dist/util/gate-assignees.js +14 -0
  63. package/dist/util/gate-assignees.js.map +1 -0
  64. package/dist/util/variable-ref.d.ts +3 -1
  65. package/dist/util/variable-ref.d.ts.map +1 -1
  66. package/dist/util/variable-ref.js +1 -1
  67. package/dist/util/variable-ref.js.map +1 -1
  68. package/dist/util/wait-audit.d.ts +9 -0
  69. package/dist/util/wait-audit.d.ts.map +1 -0
  70. package/dist/util/wait-audit.js +75 -0
  71. package/dist/util/wait-audit.js.map +1 -0
  72. package/package.json +1 -1
  73. package/dist/connectors/builtin/steps/compute.step.d.ts +0 -56
  74. package/dist/connectors/builtin/steps/compute.step.d.ts.map +0 -1
  75. package/dist/connectors/builtin/steps/compute.step.js +0 -48
  76. package/dist/connectors/builtin/steps/compute.step.js.map +0 -1
  77. package/dist/connectors/builtin/steps/wait-for-api-call.step.d.ts +0 -80
  78. package/dist/connectors/builtin/steps/wait-for-api-call.step.d.ts.map +0 -1
  79. package/dist/connectors/builtin/steps/wait-for-api-call.step.js +0 -104
  80. package/dist/connectors/builtin/steps/wait-for-api-call.step.js.map +0 -1
  81. package/dist/connectors/builtin/steps/wait.step.d.ts +0 -1087
  82. package/dist/connectors/builtin/steps/wait.step.d.ts.map +0 -1
  83. package/dist/connectors/builtin/steps/wait.step.js +0 -252
  84. package/dist/connectors/builtin/steps/wait.step.js.map +0 -1
  85. package/dist/conversational-flow/edit/followups.d.ts +0 -28
  86. package/dist/conversational-flow/edit/followups.d.ts.map +0 -1
  87. package/dist/conversational-flow/edit/followups.js +0 -103
  88. package/dist/conversational-flow/edit/followups.js.map +0 -1
  89. package/dist/util/computed-value.d.ts +0 -103
  90. package/dist/util/computed-value.d.ts.map +0 -1
  91. package/dist/util/computed-value.js +0 -453
  92. package/dist/util/computed-value.js.map +0 -1
  93. package/dist/util/expression-format.d.ts +0 -41
  94. package/dist/util/expression-format.d.ts.map +0 -1
  95. package/dist/util/expression-format.js +0 -84
  96. package/dist/util/expression-format.js.map +0 -1
  97. package/dist/util/expression-functions.d.ts +0 -35
  98. package/dist/util/expression-functions.d.ts.map +0 -1
  99. package/dist/util/expression-functions.js +0 -82
  100. package/dist/util/expression-functions.js.map +0 -1
  101. package/dist/util/expression.d.ts +0 -98
  102. package/dist/util/expression.d.ts.map +0 -1
  103. package/dist/util/expression.js +0 -395
  104. package/dist/util/expression.js.map +0 -1
  105. package/dist/util/jsonata-signatures.d.ts +0 -45
  106. package/dist/util/jsonata-signatures.d.ts.map +0 -1
  107. package/dist/util/jsonata-signatures.js +0 -113
  108. package/dist/util/jsonata-signatures.js.map +0 -1
  109. package/dist/util/signature.d.ts +0 -41
  110. package/dist/util/signature.d.ts.map +0 -1
  111. package/dist/util/signature.js +0 -124
  112. package/dist/util/signature.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait.step.d.ts","sourceRoot":"","sources":["../../../../src/connectors/builtin/steps/wait.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAgB,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAyHjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,MAAM,WAAW,cAAe,SAAQ,MAA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,oBAAoB,GACxB,OAAO,CAAC,cAAc,CAAC;IASX,QAAQ,CACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,cAAc,CAAC;IAU1B,OAAO,CAAC,YAAY;IAcpB;;;;;OAKG;YACW,eAAe;IA6B7B;;;;;;;;OAQG;YACW,OAAO;CA0BtB"}
@@ -1,252 +0,0 @@
1
- /**
2
- * WAIT step — pause execution and resume on a trigger.
3
- *
4
- * - `delay`: resume after a duration. Pauses with `statePatch.resumeAfter`
5
- * for a host that schedules a delayed re-enqueue.
6
- * - `approval`: resume when a person answers, through the resume API.
7
- *
8
- * Both pause through `ctx.pause()`; the step is stateless and trusts
9
- * `onResume()` to receive whatever the caller provided.
10
- */
11
- import { z } from 'zod';
12
- import { BaseActionStep } from '../../../steps/base-step.js';
13
- import { BuiltinStepType, GateCategory } from '../../../types/known-types.js';
14
- import { ConditionSchema } from '../../../types/workflow-config.js';
15
- import { ConditionEvaluator } from '../../../engine/condition-evaluator.js';
16
- import { ATTACHMENT_ARRAY_JSON_SCHEMA } from '../../../common/attachment.js';
17
- import { pauseFormToJsonSchema } from '../../../util/pause-form-schema.js';
18
- // ─── Pause UI Schemas (shared with PauseState types) ───
19
- const PauseDisplaySectionSchema = z.object({
20
- // Stable key for citation addressing (StepConfigBase.citations). Optional and
21
- // ignored by the executor; declared here so the builder can attach a citation
22
- // to a specific row without injecting an undeclared field that Zod would strip.
23
- id: z.string().optional(),
24
- label: z.string(),
25
- value: z.unknown(),
26
- });
27
- const PauseFormFieldOptionSchema = z.object({
28
- label: z.string(),
29
- value: z.string(),
30
- when: ConditionSchema.optional().describe('Offer this choice only when the condition holds. Omit to always offer it.'),
31
- });
32
- const PauseFormFieldSchema = z.discriminatedUnion('type', [
33
- z.object({
34
- type: z.literal('text'),
35
- name: z.string(),
36
- label: z.string(),
37
- required: z.boolean().optional(),
38
- description: z.string().optional(),
39
- placeholder: z.string().optional(),
40
- defaultValue: z.string().optional(),
41
- }),
42
- z.object({
43
- type: z.literal('textarea'),
44
- name: z.string(),
45
- label: z.string(),
46
- required: z.boolean().optional(),
47
- description: z.string().optional(),
48
- placeholder: z.string().optional(),
49
- defaultValue: z.string().optional(),
50
- rows: z.number().optional(),
51
- }),
52
- z.object({
53
- type: z.literal('number'),
54
- name: z.string(),
55
- label: z.string(),
56
- required: z.boolean().optional(),
57
- description: z.string().optional(),
58
- placeholder: z.string().optional(),
59
- defaultValue: z.number().optional(),
60
- min: z.number().optional(),
61
- max: z.number().optional(),
62
- }),
63
- z.object({
64
- type: z.literal('select'),
65
- name: z.string(),
66
- label: z.string(),
67
- required: z.boolean().optional(),
68
- description: z.string().optional(),
69
- placeholder: z.string().optional(),
70
- defaultValue: z.string().optional(),
71
- // Accepts array of options or a {{variable}} ref string (resolved at runtime)
72
- options: z.union([z.array(PauseFormFieldOptionSchema), z.string()]),
73
- allowCustomValue: z.boolean().optional(),
74
- }),
75
- z.object({
76
- type: z.literal('checkbox'),
77
- name: z.string(),
78
- label: z.string(),
79
- required: z.boolean().optional(),
80
- description: z.string().optional(),
81
- defaultValue: z.boolean().optional(),
82
- }),
83
- // NOTE: keep in sync with the `PauseFormField` union in types/pause-state.ts.
84
- z.object({
85
- type: z.literal('attachment'),
86
- name: z.string(),
87
- label: z.string(),
88
- required: z.boolean().optional(),
89
- description: z.string().optional(),
90
- multiple: z.boolean().optional().describe('Allow multiple files (value becomes an attachment array)'),
91
- accept: z.array(z.string()).optional().describe('Accepted MIME types, e.g. ["application/pdf","image/*"]'),
92
- maxSize: z.number().optional().describe('Max bytes per file'),
93
- maxItems: z.number().optional().describe('Max number of files (multiple only)'),
94
- }),
95
- ]);
96
- const PauseFormSchema = z.object({
97
- fields: z.array(PauseFormFieldSchema),
98
- description: z.string().optional(),
99
- });
100
- const PauseActionSchema = z.object({
101
- key: z.string(),
102
- label: z.string(),
103
- style: z.enum(['primary', 'danger', 'default']).optional(),
104
- abort: z.boolean().optional(),
105
- submitsForm: z.boolean().optional(),
106
- });
107
- // ─── Config ───
108
- const WaitDelayConfigSchema = z.object({
109
- mode: z.literal('delay'),
110
- delayMs: z.number().int().positive().describe('Duration to wait in milliseconds before auto-resuming'),
111
- });
112
- const WaitApprovalConfigSchema = z.object({
113
- mode: z.literal('approval'),
114
- reason: z.string().min(1).describe('Human-readable reason shown to the approver'),
115
- dueInMs: z.number().int().positive().optional().describe('How long the approver has, in milliseconds. Omit for no deadline'),
116
- prompt: z.array(z.string()).optional().describe('What to show above the interaction panel. Each one is shown in turn'),
117
- display: z.array(PauseDisplaySectionSchema).optional().describe('Read-only data sections to display. Values support {{variable}} refs'),
118
- form: PauseFormSchema.optional().describe('Editable form with typed fields for the approver'),
119
- actions: z.array(PauseActionSchema).optional().describe('Action buttons. Defaults to Approve + Reject when omitted'),
120
- });
121
- export const WaitStepConfigSchema = z.discriminatedUnion('mode', [
122
- WaitDelayConfigSchema,
123
- WaitApprovalConfigSchema,
124
- ]);
125
- const WaitStepOutputSchema = z.object({
126
- mode: z.enum(['delay', 'approval']),
127
- resumeData: z.record(z.unknown()),
128
- });
129
- // ─── Step ───
130
- export class WaitStep extends BaseActionStep {
131
- type = BuiltinStepType.WAIT;
132
- name = 'Wait';
133
- description = 'Pause execution and resume after a delay or a person\'s answer';
134
- configSchema = WaitStepConfigSchema;
135
- outputSchema = WaitStepOutputSchema;
136
- category = 'flow';
137
- icon = 'clock';
138
- resolveOutputJsonSchema(config) {
139
- let resumeData = { type: 'object', additionalProperties: true };
140
- if (config['mode'] === 'approval') {
141
- const form = config['form'];
142
- resumeData = {
143
- type: 'object',
144
- properties: {
145
- action: { type: 'string', enum: ['approve', 'retry', 'abort'] },
146
- feedback: { type: 'string' },
147
- attachments: ATTACHMENT_ARRAY_JSON_SCHEMA,
148
- data: form?.fields?.length
149
- ? pauseFormToJsonSchema(form)
150
- : { type: 'object', additionalProperties: true },
151
- },
152
- additionalProperties: true,
153
- };
154
- }
155
- return {
156
- type: 'object',
157
- properties: {
158
- mode: { type: 'string', enum: ['delay', 'approval'] },
159
- resumeData,
160
- },
161
- };
162
- }
163
- async execute(config, ctx) {
164
- switch (config.mode) {
165
- case 'delay':
166
- return this.executeDelay(config, ctx);
167
- case 'approval':
168
- return this.executeApproval(config, ctx);
169
- }
170
- }
171
- async onResume(rowData, _config, _ctx) {
172
- const waitMode = rowData['waitMode'] ?? 'delay';
173
- const resumePayload = rowData['resumePayload'] ?? {};
174
- return {
175
- mode: waitMode,
176
- resumeData: resumePayload,
177
- };
178
- }
179
- executeDelay(config, ctx) {
180
- ctx.pause(`Waiting for ${String(config.delayMs)}ms`, {
181
- category: GateCategory.Delay,
182
- statePatch: {
183
- waitMode: 'delay',
184
- delayMs: config.delayMs,
185
- resumeAfter: new Date(Date.now() + config.delayMs).toISOString(),
186
- },
187
- });
188
- }
189
- /**
190
- * Async only because an option's `when` condition may now compare a computed
191
- * value. It still never returns — `ctx.pause` throws — so the dispatch in
192
- * `execute` is unchanged; an async method returning `Promise<never>` is
193
- * assignable wherever the sync one was.
194
- */
195
- async executeApproval(config, ctx) {
196
- // Build compositional PauseState from resolved config
197
- const pauseState = {
198
- reason: config.reason,
199
- };
200
- if (config.prompt?.length)
201
- pauseState.prompt = config.prompt;
202
- if (config.display)
203
- pauseState.display = config.display;
204
- if (config.form)
205
- pauseState.form = await this.offered(config.form, ctx);
206
- if (config.actions)
207
- pauseState.actions = config.actions;
208
- ctx.pause(config.reason, {
209
- category: GateCategory.WaitingOnHuman,
210
- statePatch: {
211
- waitMode: 'approval',
212
- reason: config.reason,
213
- pauseState,
214
- // Stamped when the gate OPENS, not when the run started: a run may work
215
- // for a while before it reaches this step, and the approver's clock
216
- // should start when the request actually reaches them.
217
- ...(config.dueInMs !== undefined
218
- ? { dueAt: new Date(Date.now() + config.dueInMs).toISOString() }
219
- : {}),
220
- },
221
- });
222
- }
223
- /**
224
- * The form as this person sees it: a choice carrying a `when` is kept only
225
- * when the condition holds against the run so far.
226
- *
227
- * What is filtered is the *offer*, not the answer — so nothing downstream has
228
- * to know a choice existed. A field left with no choices still renders; that
229
- * is the author's flow saying "under this data, there is nothing to pick here",
230
- * and hiding the question instead would be this step inventing a rule.
231
- */
232
- async offered(form, ctx) {
233
- const anyConditioned = form.fields.some((field) => field.type === 'select' && Array.isArray(field.options) && field.options.some((o) => o.when !== undefined));
234
- if (!anyConditioned)
235
- return form;
236
- const evaluator = new ConditionEvaluator();
237
- // Evaluating a condition is async now, so the keep/drop decision is made up
238
- // front and the filter reads the answers. Options are independent of each
239
- // other, so they resolve together.
240
- const fields = await Promise.all(form.fields.map(async (field) => {
241
- if (field.type !== 'select' || !Array.isArray(field.options))
242
- return field;
243
- const keep = await Promise.all(field.options.map((option) => option.when === undefined
244
- ? Promise.resolve(true)
245
- : evaluator.evaluate(option.when, ctx.workflow)));
246
- const options = field.options.filter((_, i) => keep[i]);
247
- return options.length === field.options.length ? field : { ...field, options };
248
- }));
249
- return { ...form, fields };
250
- }
251
- }
252
- //# sourceMappingURL=wait.step.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait.step.js","sourceRoot":"","sources":["../../../../src/connectors/builtin/steps/wait.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG9E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,0DAA0D;AAE1D,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAA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CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAClD,CACF,CAAC;YACF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,OAAO,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC;QACjF,CAAC,CAAC,CACH,CAAC;QACF,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC;CACF"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Follow-up questions: an answer that asks something more before moving on.
3
- *
4
- * A screen with follow-ups carries a SWITCH after its question, and each answer
5
- * that leads to one is a case in it. So the follow-up is asked in the same round
6
- * of the conversation, inside the screen that asked first — it is not a screen of
7
- * its own, has no place in the tree, and nothing else can link to it.
8
- *
9
- * Which is exactly why removing one is safe, and why turning such a screen into
10
- * another kind is refused while it still has any.
11
- */
12
- import type { WorkflowConfig } from '../../types/workflow-config.js';
13
- /**
14
- * Add an answer that asks something more.
15
- *
16
- * The follow-up offers the same ways back as the question above it, so someone
17
- * who has changed their mind is never stuck inside an answer.
18
- */
19
- export declare function addFollowUp(config: WorkflowConfig, promptId: string, args: {
20
- label: string;
21
- question: string;
22
- }): {
23
- config: WorkflowConfig;
24
- promptId: string;
25
- };
26
- /** Take an answer's follow-up away, and the answer with it. */
27
- export declare function removeFollowUp(config: WorkflowConfig, promptId: string, value: string): WorkflowConfig;
28
- //# sourceMappingURL=followups.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"followups.d.ts","sourceRoot":"","sources":["../../../src/conversational-flow/edit/followups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAUrE;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAoC9C;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAkBtG"}
@@ -1,103 +0,0 @@
1
- import { asArray, asRec } from '../json.js';
2
- import { caseFor } from '../locate.js';
3
- import { ConversationalFlowEditError, requireFlow, settle } from '../settle.js';
4
- import { routersFor } from '../routers.js';
5
- import { partsOf, stepIn } from '../shape.js';
6
- import { questionSteps } from './build.js';
7
- import { optionList, promptIn } from './options.js';
8
- /**
9
- * Add an answer that asks something more.
10
- *
11
- * The follow-up offers the same ways back as the question above it, so someone
12
- * who has changed their mind is never stuck inside an answer.
13
- */
14
- export function addFollowUp(config, promptId, args) {
15
- const flow = requireFlow(config);
16
- const { screen, prompt } = requireBranching(flow, promptId);
17
- const label = args.label.trim();
18
- if (!label)
19
- throw new ConversationalFlowEditError('An answer needs a label.');
20
- const value = unique(slug(label), new Set(prompt.options.map((o) => o.value)));
21
- let added = '';
22
- const next = settle(config, (draft) => {
23
- const live = requireFlow(draft);
24
- const at = requireScreen(live, screen.id);
25
- const options = optionList(draft, live, at, promptId);
26
- const firstBack = prompt.options.findIndex((o) => o.back);
27
- options.splice(firstBack === -1 ? options.length : firstBack, 0, { label, value });
28
- const built = questionSteps(draft, live, {
29
- screenId: `${screen.id}__${value}`,
30
- title: label,
31
- prompt: args.question,
32
- options: prompt.options.filter((o) => o.back).map((o) => ({ label: o.label, value: o.value })),
33
- // A follow-up is asked where the question above it is: the same heading,
34
- // and typing goes to the same router.
35
- ...(prompt.header !== undefined ? { header: prompt.header } : {}),
36
- ...(routersFor(live, screen.id)[0] ? { router: routersFor(live, screen.id)[0].id } : {}),
37
- branches: true,
38
- });
39
- added = String(asRec(built[0])['id']);
40
- const choice = `{{steps.${promptId}.output.resumeData.data.${prompt.choiceField ?? 'choice'}}}`;
41
- casesOfPick(draft, live, at, prompt).push({
42
- label: value,
43
- condition: { variable: choice, operator: 'eq', value },
44
- steps: built,
45
- });
46
- });
47
- return { config: next, promptId: added };
48
- }
49
- /** Take an answer's follow-up away, and the answer with it. */
50
- export function removeFollowUp(config, promptId, value) {
51
- const flow = requireFlow(config);
52
- const { screen, prompt } = requireBranching(flow, promptId);
53
- if (!prompt.options.some((o) => o.value === value)) {
54
- throw new ConversationalFlowEditError(`“${screen.title}” has no answer “${value}”.`);
55
- }
56
- return settle(config, (draft) => {
57
- const live = requireFlow(draft);
58
- const at = requireScreen(live, screen.id);
59
- const options = optionList(draft, live, at, promptId);
60
- for (let index = options.length - 1; index >= 0; index -= 1) {
61
- if (asRec(options[index])['value'] === value)
62
- options.splice(index, 1);
63
- }
64
- const cases = casesOfPick(draft, live, at, prompt);
65
- for (let index = cases.length - 1; index >= 0; index -= 1) {
66
- if (asRec(cases[index])['label'] === value)
67
- cases.splice(index, 1);
68
- }
69
- });
70
- }
71
- /** The live list of cases the question's answers branch into. */
72
- function casesOfPick(draft, flow, screen, prompt) {
73
- const entry = caseFor(draft, flow, screen);
74
- const pick = entry ? stepIn(partsOf(entry, flow.routeKey).rest, prompt.pickSwitchId ?? '') : undefined;
75
- if (!pick)
76
- throw new ConversationalFlowEditError(`“${screen.title}” no longer branches on its answers.`);
77
- if (!Array.isArray(pick.config['cases']))
78
- pick.config['cases'] = [];
79
- return asArray(pick.config['cases']);
80
- }
81
- function requireBranching(flow, promptId) {
82
- const found = promptIn(flow, promptId);
83
- if (!found.prompt.pickSwitchId) {
84
- throw new ConversationalFlowEditError(`“${found.screen.title}” answers every option by moving on. Give it follow-up questions first.`);
85
- }
86
- return found;
87
- }
88
- function requireScreen(flow, id) {
89
- const screen = flow.screens.find((s) => s.id === id);
90
- if (!screen)
91
- throw new ConversationalFlowEditError(`There is no screen “${id}”.`);
92
- return screen;
93
- }
94
- function unique(base, taken) {
95
- let name = base;
96
- for (let n = 2; taken.has(name); n += 1)
97
- name = `${base}_${n}`;
98
- return name;
99
- }
100
- function slug(label) {
101
- return label.toLowerCase().normalize('NFKD').replace(/[^a-z0-9]+/g, '_').replace(/^_+|_+$/g, '') || 'answer';
102
- }
103
- //# sourceMappingURL=followups.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"followups.js","sourceRoot":"","sources":["../../../src/conversational-flow/edit/followups.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,MAAsB,EACtB,QAAgB,EAChB,IAAyC;IAEzC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,CAAC,KAAK;QAAE,MAA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,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,MAAM,CAAC,IAAY,EAAE,KAAkB;IAC9C,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;QAAE,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;IAC/D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,IAAI,CAAC,KAAa;IACzB,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC;AAC/G,CAAC"}
@@ -1,103 +0,0 @@
1
- import { type ExpressionFunction } from './expression-functions.js';
2
- import { type ExprType } from './type-compat.js';
3
- /** How a predicate compares. */
4
- export declare const COMPARISON_OPS: readonly [{
5
- readonly op: "=";
6
- readonly said: "is";
7
- }, {
8
- readonly op: "!=";
9
- readonly said: "is not";
10
- }, {
11
- readonly op: ">";
12
- readonly said: "is more than";
13
- }, {
14
- readonly op: ">=";
15
- readonly said: "is at least";
16
- }, {
17
- readonly op: "<";
18
- readonly said: "is less than";
19
- }, {
20
- readonly op: "<=";
21
- readonly said: "is at most";
22
- }];
23
- export type ComparisonOp = (typeof COMPARISON_OPS)[number]['op'];
24
- /** Keep only the items whose `field` compares this way against `value`. */
25
- export interface ItemFilter {
26
- field: string;
27
- op: ComparisonOp;
28
- /** As the author typed it. */
29
- value: string;
30
- /**
31
- * What the field being tested is declared to be, when anything declares it.
32
- *
33
- * Without it the value is spelled from its own shape, and a text field tested
34
- * against `10` becomes `[code = 10]` — which matches nothing, silently,
35
- * because `"10" = 10` is false. The form knows the field's type; this is how
36
- * it says so. Read back from how the literal was spelled, so the round trip
37
- * holds without the reader having to know the schema.
38
- */
39
- type?: ExprType | undefined;
40
- }
41
- /** One value going into a computation: where it is, narrowed, and read. */
42
- export interface ValueSelection {
43
- /** A dotted path, with an explicit root. */
44
- path: string;
45
- /** Only some of the items. */
46
- filter?: ItemFilter | undefined;
47
- /** One field of each item, rather than the whole item. */
48
- field?: string | undefined;
49
- }
50
- /** One argument: data the author pointed at, or text they typed. */
51
- export type Argument = ({
52
- kind: 'value';
53
- } & ValueSelection) | {
54
- kind: 'fixed';
55
- raw: string;
56
- }
57
- /** Several things where a list is wanted, written `[a, b]`. */
58
- | {
59
- kind: 'list';
60
- of: Argument[];
61
- };
62
- /** One catalogue entry over some arguments: `$sum([a, b])`, `a * b`. */
63
- export interface Call {
64
- kind: 'call';
65
- /** A catalogue name — `$sum`, or `multiply` for an operator. */
66
- fn: string;
67
- args: Argument[];
68
- }
69
- /** Every item of a list, rendered as one piece of text. */
70
- export interface ListFormat {
71
- kind: 'list';
72
- /** The list, optionally narrowed by a filter. */
73
- source: ValueSelection;
74
- /** What one item reads, with `{{field}}` standing for a field of that item. */
75
- template: string;
76
- /** Between one item and the next. */
77
- separator: string;
78
- /** What to say when the list is empty. */
79
- empty?: string | undefined;
80
- }
81
- /** A computation a form can describe. */
82
- export type Computation = Call | ListFormat;
83
- /** A literal for inside a predicate, typed from what the author typed. */
84
- export declare function writeLiteral(raw: string): string;
85
- /** One selection as expression text: the list, narrowed, then read. */
86
- export declare function writeSelection(selection: ValueSelection): string;
87
- /** The functions a form can describe. */
88
- export declare const FORMABLE_FUNCTIONS: readonly ExpressionFunction[];
89
- /** Whether a form can describe this function at all. */
90
- export declare function isFormable(fn: string): boolean;
91
- /** The expression a computation describes, or null when it is not yet complete. */
92
- export declare function writeComputation(computation: Computation): string | null;
93
- /** How many arguments an entry takes, and whether it will keep taking them. */
94
- export declare function argumentSlots(fn: string): {
95
- count: number;
96
- } | null;
97
- /** What the nth argument has to be. */
98
- export declare function wantsAt(fn: string, at: number): ExprType;
99
- /** Whether the nth argument is a list, and so takes as many entries as you like. */
100
- export declare function takesSeveral(fn: string, at: number): boolean;
101
- /** Recover a computation from an expression this could have written. */
102
- export declare function readComputation(expression: string, isList: (path: string) => boolean): Computation | null;
103
- //# sourceMappingURL=computed-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"computed-value.d.ts","sourceRoot":"","sources":["../../src/util/computed-value.ts"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAyC,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExF,gCAAgC;AAChC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAOjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAEjE,2EAA2E;AAC3E,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,YAAY,CAAC;IACjB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC7B;AAED,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,oEAAoE;AACpE,MAAM,MAAM,QAAQ,GAChB,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,cAAc,CAAC,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AAChC,+DAA+D;GAC7D;IAAE,IAAI,EAAE,MAAM,CAAC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