llmverify 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/LICENSE +24 -21
- package/README.md +833 -95
- package/dist/adapters/factory.d.ts +62 -0
- package/dist/adapters/factory.js +101 -0
- package/dist/adapters/index.d.ts +31 -0
- package/dist/adapters/index.js +51 -0
- package/dist/adapters/providers/anthropic.d.ts +22 -0
- package/dist/adapters/providers/anthropic.js +88 -0
- package/dist/adapters/providers/cohere.d.ts +22 -0
- package/dist/adapters/providers/cohere.js +80 -0
- package/dist/adapters/providers/custom.d.ts +53 -0
- package/dist/adapters/providers/custom.js +84 -0
- package/dist/adapters/providers/deepseek.d.ts +26 -0
- package/dist/adapters/providers/deepseek.js +78 -0
- package/dist/adapters/providers/google.d.ts +22 -0
- package/dist/adapters/providers/google.js +68 -0
- package/dist/adapters/providers/groq.d.ts +22 -0
- package/dist/adapters/providers/groq.js +78 -0
- package/dist/adapters/providers/local.d.ts +53 -0
- package/dist/adapters/providers/local.js +109 -0
- package/dist/adapters/providers/mistral.d.ts +22 -0
- package/dist/adapters/providers/mistral.js +74 -0
- package/dist/adapters/providers/openai.d.ts +22 -0
- package/dist/adapters/providers/openai.js +99 -0
- package/dist/adapters/types.d.ts +144 -0
- package/dist/adapters/types.js +58 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.js +238 -0
- package/dist/compat/index.d.ts +272 -0
- package/dist/compat/index.js +282 -0
- package/dist/constants.d.ts +87 -0
- package/dist/constants.js +115 -0
- package/dist/csm6/baseline.d.ts +21 -0
- package/dist/csm6/baseline.js +120 -0
- package/dist/csm6/index.d.ts +9 -0
- package/dist/csm6/index.js +28 -0
- package/dist/csm6/security/harmful-content.d.ts +15 -0
- package/dist/csm6/security/harmful-content.js +180 -0
- package/dist/csm6/security/index.d.ts +12 -0
- package/dist/csm6/security/index.js +28 -0
- package/dist/csm6/security/pii-detection.d.ts +44 -0
- package/dist/csm6/security/pii-detection.js +433 -0
- package/dist/csm6/security/prompt-injection.d.ts +39 -0
- package/dist/csm6/security/prompt-injection.js +359 -0
- package/dist/engines/classification/compression.d.ts +53 -0
- package/dist/engines/classification/compression.js +167 -0
- package/dist/engines/classification/engine.d.ts +53 -0
- package/dist/engines/classification/engine.js +208 -0
- package/dist/engines/classification/hallucination.d.ts +54 -0
- package/dist/engines/classification/hallucination.js +189 -0
- package/dist/engines/classification/index.d.ts +31 -0
- package/dist/engines/classification/index.js +48 -0
- package/dist/engines/classification/instruction-eval.d.ts +28 -0
- package/dist/engines/classification/instruction-eval.js +189 -0
- package/dist/engines/classification/intent.d.ts +21 -0
- package/dist/engines/classification/intent.js +197 -0
- package/dist/engines/classification/json-repair.d.ts +28 -0
- package/dist/engines/classification/json-repair.js +214 -0
- package/dist/engines/classification/types.d.ts +232 -0
- package/dist/engines/classification/types.js +24 -0
- package/dist/engines/classification/utils.d.ts +53 -0
- package/dist/engines/classification/utils.js +154 -0
- package/dist/engines/consistency/index.d.ts +24 -0
- package/dist/engines/consistency/index.js +173 -0
- package/dist/engines/hallucination/claim-extractor.d.ts +14 -0
- package/dist/engines/hallucination/claim-extractor.js +179 -0
- package/dist/engines/hallucination/index.d.ts +23 -0
- package/dist/engines/hallucination/index.js +111 -0
- package/dist/engines/hallucination/risk-analyzer.d.ts +19 -0
- package/dist/engines/hallucination/risk-analyzer.js +86 -0
- package/dist/engines/index.d.ts +13 -0
- package/dist/engines/index.js +42 -0
- package/dist/engines/json-validator/index.d.ts +23 -0
- package/dist/engines/json-validator/index.js +181 -0
- package/dist/engines/risk-scoring/index.d.ts +23 -0
- package/dist/engines/risk-scoring/index.js +138 -0
- package/dist/engines/runtime/baseline.d.ts +69 -0
- package/dist/engines/runtime/baseline.js +124 -0
- package/dist/engines/runtime/fingerprint.d.ts +43 -0
- package/dist/engines/runtime/fingerprint.js +132 -0
- package/dist/engines/runtime/health-score.d.ts +46 -0
- package/dist/engines/runtime/health-score.js +157 -0
- package/dist/engines/runtime/index.d.ts +15 -0
- package/dist/engines/runtime/index.js +28 -0
- package/dist/engines/runtime/latency.d.ts +39 -0
- package/dist/engines/runtime/latency.js +98 -0
- package/dist/engines/runtime/structure.d.ts +36 -0
- package/dist/engines/runtime/structure.js +155 -0
- package/dist/engines/runtime/token-rate.d.ts +39 -0
- package/dist/engines/runtime/token-rate.js +101 -0
- package/dist/errors.d.ts +57 -0
- package/dist/errors.js +86 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +192 -0
- package/dist/sentinel/duplicateQueryTest.d.ts +39 -0
- package/dist/sentinel/duplicateQueryTest.js +125 -0
- package/dist/sentinel/index.d.ts +26 -0
- package/dist/sentinel/index.js +35 -0
- package/dist/sentinel/shortReasoningTest.d.ts +38 -0
- package/dist/sentinel/shortReasoningTest.js +122 -0
- package/dist/sentinel/staticEchoTest.d.ts +38 -0
- package/dist/sentinel/staticEchoTest.js +109 -0
- package/dist/sentinel/structuredListTest.d.ts +38 -0
- package/dist/sentinel/structuredListTest.js +107 -0
- package/dist/sentinel/suite.d.ts +56 -0
- package/dist/sentinel/suite.js +93 -0
- package/dist/types/config.d.ts +67 -0
- package/dist/types/config.js +81 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +27 -0
- package/dist/types/results.d.ts +151 -0
- package/dist/types/results.js +13 -0
- package/dist/types/runtime.d.ts +196 -0
- package/dist/types/runtime.js +24 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/similarity.d.ts +29 -0
- package/dist/utils/similarity.js +107 -0
- package/dist/utils/text.d.ts +43 -0
- package/dist/utils/text.js +98 -0
- package/dist/verify.d.ts +41 -0
- package/dist/verify.js +204 -0
- package/dist/wrapper/index.d.ts +10 -0
- package/dist/wrapper/index.js +15 -0
- package/dist/wrapper/monitorLLM.d.ts +76 -0
- package/dist/wrapper/monitorLLM.js +186 -0
- package/docs/ALGORITHMS.md +429 -0
- package/docs/FOR-DEVELOPERS.md +562 -0
- package/docs/GETTING-STARTED.md +327 -0
- package/docs/LIMITATIONS.md +312 -0
- package/examples/basic.ts +32 -0
- package/examples/classification.ts +230 -0
- package/examples/express-middleware.ts +141 -0
- package/examples/langchain-like-api.ts +69 -0
- package/examples/model-adapters.ts +274 -0
- package/examples/nextjs-api.ts +70 -0
- package/examples/pii-detection.ts +77 -0
- package/examples/prompt-injection.ts +70 -0
- package/examples/runtime-monitoring.ts +208 -0
- package/examples/zod-like-api.ts +60 -0
- package/package.json +122 -35
- package/prompts/llmverify-assistants.md +86 -0
- package/recipes/ci-gate.ts +70 -0
- package/recipes/security-audit.ts +77 -0
- package/index.d.ts +0 -42
- package/index.js +0 -71
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to llmverify will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-12-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of llmverify
|
|
12
|
+
- CSM6 Baseline Profile implementation
|
|
13
|
+
- Hallucination risk indicator engine
|
|
14
|
+
- Consistency checking engine
|
|
15
|
+
- JSON validation engine
|
|
16
|
+
- Prompt injection detection (OWASP LLM-01 aligned)
|
|
17
|
+
- PII detection (email, phone, SSN, credit cards, API keys)
|
|
18
|
+
- Harmful content detection
|
|
19
|
+
- CLI tool with text and JSON output
|
|
20
|
+
- Privacy guarantees (100% local processing in free tier)
|
|
21
|
+
- Confidence intervals on all scores
|
|
22
|
+
- Explicit limitations in all results
|
|
23
|
+
|
|
24
|
+
### Security
|
|
25
|
+
- Zero network traffic in free tier
|
|
26
|
+
- No telemetry in free tier
|
|
27
|
+
- Privacy validation enforced at runtime
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
30
|
+
- Complete README with examples
|
|
31
|
+
- Privacy guarantee documentation
|
|
32
|
+
- Accuracy statement and limitations
|
|
33
|
+
- CSM6 framework documentation
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 KingCaliber Labs
|
|
4
|
+
|
|
5
|
+
Contributors:
|
|
6
|
+
- Haiec (original author)
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|