Skip to content

Update @runt/schema to commit 8d3bd82 with proper type validation#205

Merged
rgbkrk merged 6 commits into
mainfrom
update-runt-schema-8d3bd82
Jul 11, 2025
Merged

Update @runt/schema to commit 8d3bd82 with proper type validation#205
rgbkrk merged 6 commits into
mainfrom
update-runt-schema-8d3bd82

Conversation

@rgbkrk

@rgbkrk rgbkrk commented Jul 11, 2025

Copy link
Copy Markdown
Member

Updates @runt/schema to commit 8d3bd82a1c2e54cf46b0f133d327d4ca6de6acdc which includes the fixed AiToolResultData interface, allowing us to use proper schema validation instead of flexible workarounds.

Changes Made

Schema Update

  • Updated from 14c2c60f5576eebc509ed76b5cde0c3cab4246a4 to 8d3bd82a1c2e54cf46b0f133d327d4ca6de6acdc
  • Now includes the fixed AiToolResultData interface with optional fields

Code Cleanup

  • Restored proper isAiToolResultData type guard usage
  • Removed flexible validation workaround in RichOutput component
  • Updated AiToolResultOutput to use proper AiToolResultData interface
  • Cleaner, more maintainable code with proper type safety

Benefits

  • Proper Type Safety: Using official schema types instead of custom validation
  • Maintainability: No more workarounds - code follows schema exactly
  • Consistency: Schema and frontend now perfectly aligned
  • Future-proof: Schema changes will be caught by TypeScript

Testing

  • All 58 tests passing
  • TypeScript compilation successful
  • Linting and formatting checks passed
  • Full check suite passes

This completes the schema update cycle: the runt schema was fixed to match actual runtime behavior, and now anode uses the corrected schema types properly.

rgbkrk added 6 commits July 10, 2025 18:57
- Update RichOutput to use proper MediaContainer types
- Fix AI tool output components to use correct schema field names
- Remove unused imports and fix linter errors
- Update output index to re-export schema types
- All tests passing (58/58)
- Replace raw strings with AI_TOOL_CALL_MIME_TYPE and AI_TOOL_RESULT_MIME_TYPE
- Use TEXT_MIME_TYPES, APPLICATION_MIME_TYPES, IMAGE_MIME_TYPES arrays
- Add support for Jupyter MIME types (Plotly, Vega-Lite, etc.)
- Improve type safety and consistency with schema definitions
- Use flexible validation instead of strict schema type guard
- Handle actual data structure: {tool_call_id, result, status}
- Remove unused imports
- Tool results now display correctly with success/error icons
- Use proper schema validation with fixed AiToolResultData interface
- Restore isAiToolResultData type guard usage
- Remove flexible workaround now that schema matches runtime behavior
- Clean up component types to use proper AiToolResultData interface
- All tests passing with proper type safety
…commit

- Keep new schema commit 8d3bd82a1c2e54cf46b0f133d327d4ca6de6acdc
- Use proper isAiToolResultData type guard instead of flexible workaround
- Maintain clean component interfaces with AiToolResultData schema type
- All tests passing after merge resolution
@rgbkrk
rgbkrk merged commit ddcfc51 into main Jul 11, 2025
1 check passed
@rgbkrk
rgbkrk deleted the update-runt-schema-8d3bd82 branch July 11, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant