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
* [US-001] Create jmespath-utils module with core validation functions
Add packages/agents-core/src/utils/jmespath-utils.ts with:
- ValidationResult interface
- MAX_EXPRESSION_LENGTH constant (1000)
- validateJMESPath() for syntax validation
- validateRegex() for regex pattern validation
- compileJMESPath() wrapper with proper typing
- searchJMESPath<T>() safe search wrapper
- JMESPathExtended interface for missing compile method types
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* [US-002] Add security validation with dangerous pattern detection
- Export DANGEROUS_PATTERNS array with 6 patterns for injection prevention
- Export SecurityOptions interface with maxLength and dangerousPatterns
- Export validateJMESPathSecure() with ordered checks: length, patterns, compile
- Validation checks follow O(1) -> O(n) -> expensive ordering for efficiency
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* [US-003] Add jmespathString Zod factory for OpenAPI compatibility
- Import z from '@hono/zod-openapi'
- Export JMESPathStringOptions interface with maxLength option
- Export jmespathString() function that returns z.string().max().describe()
- Description includes valid/invalid JMESPath examples for OpenAPI docs
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* [US-004] Update signature-validation to re-export from jmespath-utils
- Remove original validateJMESPath and validateRegex implementations
- Import and re-export both functions from jmespath-utils
- Re-export ValidationResult type for backward compatibility
- Public export path @inkeep/agents-core/utils/signature-validation preserved
* [US-005] Refactor JsonTransformer to use shared jmespath-utils
- Remove private validateJMESPath method, MAX_EXPRESSION_LENGTH constant,
DANGEROUS_PATTERNS constant, and JMESPathExtended interface
- Import validateJMESPathSecure, compileJMESPath, DANGEROUS_PATTERNS,
and MAX_EXPRESSION_LENGTH from ./jmespath-utils
- Update transform() method to use shared validation
- Update objectToJMESPath() to use compileJMESPath()
- Maintain backward compatibility with existing error message format
* [US-006] Update trigger-auth.ts to use searchJMESPath from shared jmespath-utils
- Replace direct jmespath import with searchJMESPath from './jmespath-utils'
- Update extractSignature() to use searchJMESPath<string | undefined>()
- Update extractComponent() to use searchJMESPath<string | undefined>()
- Removes direct jmespath dependency in this file
* [US-007] Update TemplateEngine.ts to use searchJMESPath from shared jmespath-utils
* [US-008] Update Zod schemas to use shared jmespath-utils
- Remove JMESPathExtended interface and jmespathExt constant
- Import jmespathString, validateJMESPathSecure, validateRegex from jmespath-utils
- Replace z.string().optional() in TriggerOutputTransformSchema with jmespathString().optional()
- Update TriggerInsertSchema.superRefine() to use validateJMESPathSecure() and validateRegex()
- Remove direct jmespath import
* [US-009] Update trigger-form to use shared validation from agents-core
- Import validateJMESPath and validateRegex from @inkeep/agents-core/utils/signature-validation
- Add adapter functions to convert ValidationResult to string | undefined for form validation
- Remove duplicate validateJMESPath function (lines 412-425)
- Remove duplicate validateRegex function (lines 427-436)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* [US-010] Add comprehensive jmespath-utils test file
- Add tests for validateJMESPath: valid expressions, invalid syntax errors
- Add tests for validateRegex: valid patterns, invalid patterns
- Add tests for validateJMESPathSecure: length validation, all 6 dangerous patterns, custom options
- Add tests for searchJMESPath: successful search, type inference
- Add tests for compileJMESPath: valid compile, invalid syntax throws
- Add tests for jmespathString(): returns schema with maxLength, description contains examples
- Add tests for MAX_EXPRESSION_LENGTH constant and ValidationResult type
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* [US-011] Clean up duplicate tests and verify exports
- Remove signature-validation.test.ts (duplicate tests now in jmespath-utils.test.ts)
- Verified @inkeep/agents-core/utils/signature-validation export continues to work
- Evaluated jmespath-utils export path: not needed since signature-validation re-exports for external use
- Typecheck passes
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* format fixes and openapi snapshot update
* lint ignores
* extracting jmes logic to jmes utils file
* jmes changesets
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>
0 commit comments