Skip to content

Commit eeead74

Browse files
committed
feat: initial release of valai v0.1.0
- AI/LLM-native TypeScript validation library - Zod-like API with full TypeScript inference - LLM-specific parsing with parseLLM() and auto JSON repair - Multi-format export: toOpenAI(), toClaude(), toGemini(), toJSONSchema() - Built-in JSON repair for malformed LLM outputs - AI metadata with .describe() and .examples()
1 parent 2516ede commit eeead74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+14481
-0
lines changed

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
parserOptions: {
5+
ecmaVersion: 2022,
6+
sourceType: 'module',
7+
project: ['./tsconfig.json', './packages/*/tsconfig.json'],
8+
},
9+
plugins: ['@typescript-eslint'],
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:@typescript-eslint/recommended',
13+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
14+
],
15+
env: {
16+
node: true,
17+
es2022: true,
18+
},
19+
rules: {
20+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/explicit-module-boundary-types': 'off',
23+
'@typescript-eslint/no-explicit-any': 'warn',
24+
'@typescript-eslint/prefer-const': 'error',
25+
'no-console': 'warn',
26+
},
27+
ignorePatterns: ['dist', 'node_modules', '*.js', '*.cjs', '*.mjs'],
28+
};

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ lib-cov
2121
# Coverage directory used by tools like istanbul
2222
coverage
2323
*.lcov
24+
.claude
2425

2526
# nyc test coverage
2627
.nyc_output
@@ -125,6 +126,9 @@ dist
125126
# Stores VSCode versions used for testing VSCode extensions
126127
.vscode-test
127128

129+
# IDE
130+
.idea/
131+
128132
# yarn v3
129133
.pnp.*
130134
.yarn/*

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true,
8+
"arrowParens": "always",
9+
"endOfLine": "lf"
10+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 valai
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)