jsfe 1.105.0 → 1.105.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.
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/forms/contracts.js"],"names":[],"mappings":"AAgBA;;;IAGC;AACD;;;;;EAGC;AACD,qGAAqG;AACrG;;QAwCC;AAqBD;;;QAEC;AAgBD;;;;;;;;;QASC;AACD;;;;QAGC;AACD;;;;;;;;QA8BC;AAED,mHAAmH;AACnH,kDAgBC;AAED,+GAA+G;AAC/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EC"}
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/forms/contracts.js"],"names":[],"mappings":"AAgBA;;;IAGC;AACD;;;;;EAGC;AACD,qGAAqG;AACrG;;QA0CC;AAqBD;;;QAEC;AAgBD;;;;;;;;;QASC;AACD;;;;QAGC;AACD;;;;;;;;QA8BC;AAED,mHAAmH;AACnH,kDAgBC;AAED,+GAA+G;AAC/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EC"}
@@ -53,7 +53,7 @@ export function linkFormSchemas(flows, { externalFlows = [] } = {}) {
53
53
  const leafSchema = input => {
54
54
  if (input.schema)
55
55
  return objectSchema(input.schema.inputs);
56
- if (input.profile?.kind === 'choice' && !input.profile.accept_other)
56
+ if (input.profile?.kind === 'choice' && !input.profile.accept_other && !input.choices_from)
57
57
  return { type: 'string', enum: (input.profile.choices || []).map(c => c.key), description: input.response?.description || input.description || input.label || input.name };
58
58
  return { type: 'string', description: input.response?.description || input.description || input.label || input.name };
59
59
  };
@@ -70,6 +70,9 @@ export function linkFormSchemas(flows, { externalFlows = [] } = {}) {
70
70
  for (const input of inputs.flatMap(input => input.any_of || [input])) {
71
71
  if (parameters.some(p => p.name === input.name) || !input.profile && !input.schema)
72
72
  continue;
73
+ // A closed choice whose options the form computes while it runs (choices_from) has none to name before it is asked.
74
+ if (input.choices_from && input.profile?.kind === 'choice' && !input.profile.accept_other)
75
+ continue;
73
76
  parameters.push(input.schema ? { name: input.name, type: 'object', jsonSchema: objectSchema(input.schema.inputs), description: input.response?.description || input.description || input.label || input.name }
74
77
  : { name: input.name, type: 'string', ...(input.profile.kind === 'choice' && !input.profile.accept_other ? { enum: input.profile.choices.map(c => c.key) } : {}), description: input.response?.description || input.description || input.label || input.name });
75
78
  }
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:e8c80684923747d7a70dfe7de0f02a322e0ac1b9b65b749ad416a675628fc180";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:15a475e8354da76a751b7957b4172d99f491d7a6c7bb6219252a9b50e60b8d17";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.105.0",
3
+ "version": "1.105.1",
4
4
  "description": "TypeScript workflow engine for conversational/automation apps: multi-flow orchestration, interrupt/resume, stack-based control, robust errors, and flexible tool/REST integration.",
5
5
  "license": "MIT",
6
6
  "author": "Ron Pinkas",