@geometra/mcp 1.28.0 → 1.29.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.
- package/dist/server.js +7 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -747,6 +747,12 @@ Use \`kind: "text"\` for textboxes / textareas, \`"choice"\` for selects / combo
|
|
|
747
747
|
const field = resolvedFields.fields[index];
|
|
748
748
|
try {
|
|
749
749
|
const result = await executeFillField(session, field, detail);
|
|
750
|
+
// Post-fill validation: choice fields may report ok but leave the field invalid
|
|
751
|
+
const readback = result.compact?.readback;
|
|
752
|
+
const stillInvalid = field.kind === 'choice' && readback?.state && readback.state.invalid === true;
|
|
753
|
+
if (stillInvalid) {
|
|
754
|
+
throw new Error(`Choice field "${field.fieldLabel}" still invalid after fill: ${readback?.error ?? 'selection did not commit'}`);
|
|
755
|
+
}
|
|
750
756
|
steps.push(detail === 'verbose'
|
|
751
757
|
? { index, kind: field.kind, ok: true, summary: result.summary }
|
|
752
758
|
: { index, kind: field.kind, ok: true, ...result.compact });
|
|
@@ -754,7 +760,7 @@ Use \`kind: "text"\` for textboxes / textareas, \`"choice"\` for selects / combo
|
|
|
754
760
|
catch (e) {
|
|
755
761
|
const message = e instanceof Error ? e.message : String(e);
|
|
756
762
|
// Retry once for transient selection failures
|
|
757
|
-
if (message.includes('selection_not_confirmed')) {
|
|
763
|
+
if (message.includes('selection_not_confirmed') || message.includes('still invalid after fill')) {
|
|
758
764
|
try {
|
|
759
765
|
const retryResult = await executeFillField(session, field, detail);
|
|
760
766
|
steps.push(detail === 'verbose'
|
package/package.json
CHANGED