jsfe 1.61.0 → 1.62.0

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":"form-client.d.ts","sourceRoot":"","sources":["../../src/forms/form-client.js"],"names":[],"mappings":"AAiCA,iGAAiG;AACjG;;;;;SAoHC;AAMD;;;;;;;;GAQG;AACH;;;;;;;;SAoBC;AAED;;;;yGAIyG;AACzG,oDAyBC;AACD,+GAA+G;AAC/G;wHACwH;AACxH,qEAWC;AAED;;;;SA4CC;AAED;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BC;AArTD,qCAAsC,eAAe,CAAC"}
1
+ {"version":3,"file":"form-client.d.ts","sourceRoot":"","sources":["../../src/forms/form-client.js"],"names":[],"mappings":"AAiCA,iGAAiG;AACjG;;;;;SAoHC;AAMD;;;;;;;;GAQG;AACH;;;;;;;;SAoBC;AAED;;;;yGAIyG;AACzG,oDAyBC;AACD,+GAA+G;AAC/G;wHACwH;AACxH,qEAWC;AAED;;;;SA4CC;AAED;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CC;AAjUD,qCAAsC,eAAe,CAAC"}
@@ -369,7 +369,20 @@ export function formSubmissionReaders(submission, getSession) {
369
369
  const valid = read && Object.hasOwn(read, 'value') && read.value !== '' && read.refused !== true && !read.incompleteMoney;
370
370
  return { ...hit, value: valid ? read.value : raw, invalid: !valid, origin: 'form_submission', current: false, utterance: '' };
371
371
  });
372
- return { hits, ambiguous: [], remaining: [], questions: [], refused: [], decisions: hits.map(hit => ({ form: hit.form, name: hit.name, rule: 'form_submission' })) };
372
+ // A card re-sends every field it shows. A field sent back with the value the form already holds is not an answer:
373
+ // it is neither acknowledged nor checked again (prod 2026-11-12: "Thank you, I already have your product number"
374
+ // on every store-card submission). A changed value is a correction, as before. When nothing at all changed, the
375
+ // readings stand, so the turn is never read as empty.
376
+ const unchanged = hit => {
377
+ const held = cargo.forms[hit.form]?.values;
378
+ if (!held || !Object.hasOwn(held, hit.name))
379
+ return false;
380
+ return hit.declined === true ? held[hit.name] === null : !hit.invalid && held[hit.name] !== null && held[hit.name] !== undefined
381
+ && typeof held[hit.name] !== 'object' && String(held[hit.name]) === String(hit.value);
382
+ };
383
+ const changed = hits.filter(hit => !unchanged(hit));
384
+ const read = changed.length ? changed : hits;
385
+ return { hits: read, ambiguous: [], remaining: [], questions: [], refused: [], decisions: read.map(hit => ({ form: hit.form, name: hit.name, rule: 'form_submission' })) };
373
386
  },
374
387
  enrichFormMatches(matches, chain, form, names = [], asked = '') {
375
388
  const result = enrichFormMatches(matches, chain, form, names, asked);
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:feb4e662f3f0f2fc594664c8e3c598b055876f86a68ee803f9893311f2c4943c";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:21d96f8627fcefdd2301e67dd90862e990be0cd030b855c7dfddec495c35339c";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.61.0",
3
+ "version": "1.62.0",
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",