Fixes to some wrong types definitions#5
Merged
javisperez merged 4 commits intomainfrom Mar 31, 2026
Merged
Conversation
Signed-off-by: Javis Pérez <javis@jozu.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the public Kitfile TypeScript types to unify shared layer fields via a new LayerBase interface, and updates the type documentation accordingly to improve consistency and extensibility.
Changes:
- Introduces
LayerBaseand refactorsModel,Dataset,Code,Doc, andPromptto extend it. - Updates internal Kitfile layer identity naming (
LayerInfo→LayerIdentity) and adjusts model parts typing. - Updates
docs/types.mdand bumps package version to0.0.4.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/types/kitfile.ts |
Adds LayerBase, refactors layer interfaces, and renames internal layer identity type. |
docs/types.md |
Documents LayerBase and updates Kitfile artifact type definitions/tables. |
package.json |
Version bump to 0.0.4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Javis Pérez <javis@jozu.com>
Signed-off-by: Javis Pérez <javis@jozu.com>
amisevsk
approved these changes
Mar 31, 2026
Contributor
amisevsk
left a comment
There was a problem hiding this comment.
LGTM.
LayerBase is kind of a mixed abstraction, as technically not all layers include a description (modelpart layers), so it's introduced as a base interface for all layer types but then it's not used for modelpart layer types.
Signed-off-by: Javis Pérez <javis@jozu.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and unifies the TypeScript types for Kitfile artifact layers, introducing a new
LayerBaseinterface to provide consistentpathanddescriptionfields across all artifact types. The documentation and code are updated for clarity, extensibility, and improved type safety.Type system improvements:
Introduced a new
LayerBaseinterface that defines common fields (pathand optionaldescription) for all Kitfile artifact layer types, and updated all artifact interfaces (Model,Dataset,Code,Doc,Prompt) to extend this base for consistency. [1] [2] [3]Refactored the
Model,Dataset,Code,Doc, andPromptinterfaces to remove redundant fields and ensure they inherit shared properties fromLayerBase. Added new optional fields (e.g.,framework,versionforModel) and updated the type ofparametersfor flexibility. [1] [2]Updated the
ModelPartinterface to include an optionalnameproperty and removed unused fields for clarity. [1] [2]Documentation updates:
docs/types.mddocumentation to describe the newLayerBaseinterface, show inheritance in artifact types, and update property tables for accuracy and completeness. [1] [2]Internal type alignment:
LayerInfotoLayerIdentityfor clarity, and updated internal Kitfile types to use the new naming and structure. Ensured that composite model parts (parts) are properly typed in internal representations.Other:
0.0.3to0.0.4inpackage.json.