You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Comprehensive field compatibility fixes for Commander API
Field Type Definition Updates:
- Update field-types.json with missing elements for complex fields
- Fix phone field: add elements [region, number, ext, type]
- Fix name field: change elements from [firstName, lastName, fullName] to [first, middle, last]
- Fix bankAccount field: add missing otherType element
- Fix privateKey field: add elements [publicKey, privateKey]
- Fix schedule field: add elements [type, time, month]
- Add missing appFiller field type with elements [applicationTitle, contentFilter, macroSequence]
- Add missing pamResources field type with elements [controllerUid, folderUid, resourceRef]
- Update complex field processing logic to handle new field definitions
Field Value Formatting Fixes:
- Add automatic field validation and formatting in processFieldsForSDK()
- Fix date fields: auto-convert Unix seconds to milliseconds
- Fix card numbers: remove dashes, spaces, and dots from card numbers
- Fix expiration dates: convert MM/YY to MM/YYYY format with smart year detection
- Provide user warnings when field values are automatically reformatted
Testing & Infrastructure:
- Add GetFieldType() helper function for testing field type definitions
- Add comprehensive field loading tests in loader_test.go
- Add field processing tests for new complex field types (appFiller, schedule)
- Add field formatting tests with 25+ test cases covering edge cases
- Add field reconstruction tests for complex field processing pipeline
Resolves issues with:
- Field type mismatches between MCP and Commander API expectations
- Date fields sending Unix timestamps in wrong format
- Card numbers being created with dashes causing display issues
- Expiration dates using MM/YY when Vault expects MM/YYYY
- Missing field type definitions causing processing failures
All changes ensure full compatibility with Commander API field requirements
and provide comprehensive test coverage for field processing pipeline.
0 commit comments