@stackone/defender 0.3.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.
@@ -0,0 +1,16 @@
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_basic_tokenize": true,
5
+ "do_lower_case": true,
6
+ "is_local": false,
7
+ "mask_token": "[MASK]",
8
+ "model_max_length": 512,
9
+ "never_split": null,
10
+ "pad_token": "[PAD]",
11
+ "sep_token": "[SEP]",
12
+ "strip_accents": null,
13
+ "tokenize_chinese_chars": true,
14
+ "tokenizer_class": "BertTokenizer",
15
+ "unk_token": "[UNK]"
16
+ }
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@stackone/defender",
3
+ "version": "0.3.0",
4
+ "description": "Prompt injection defense framework for AI tool-calling",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.cts",
8
+ "files": [
9
+ "dist",
10
+ "package.json",
11
+ "README.md"
12
+ ],
13
+ "sideEffects": false,
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.cts",
17
+ "import": "./dist/index.mjs",
18
+ "require": "./dist/index.cjs"
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "scripts": {
23
+ "clean": "rimraf dist",
24
+ "prebuild": "npm run clean",
25
+ "build": "tsdown --env.NODE_ENV=production --minify && npm run copy-models",
26
+ "prebuild:dev": "npm run clean",
27
+ "build:dev": "tsdown --env.NODE_ENV=development && npm run copy-models",
28
+ "copy-models": "node -e \"const{cpSync,mkdirSync,existsSync}=require('fs'),s='src/classifiers/models/minilm-full-aug',d='dist/models/minilm-full-aug';existsSync(s)?(mkdirSync(d,{recursive:true}),cpSync(s,d,{recursive:true}),console.log('Copied ONNX models to dist/models/')):console.warn('ONNX models not found at',s)\"",
29
+ "code:format": "biome format ./src",
30
+ "code:format:fix": "biome format --write ./src",
31
+ "code:lint": "biome lint --error-on-warnings ./src",
32
+ "code:lint:fix": "biome lint --write ./src",
33
+ "code:check": "biome check ./src",
34
+ "code:check:fix": "biome check --write ./src",
35
+ "lint": "npm run code:check",
36
+ "lint:fix": "npm run code:check:fix",
37
+ "test": "FORCE_COLOR=1 vitest run",
38
+ "test:watch": "FORCE_COLOR=1 vitest watch --silent",
39
+ "test:typecheck": "tsc --noEmit --project tsconfig.tests.json",
40
+ "publish-release": "npm publish --access=public"
41
+ },
42
+ "keywords": [
43
+ "prompt-injection",
44
+ "ai-safety",
45
+ "llm",
46
+ "guardrails",
47
+ "security"
48
+ ],
49
+ "author": "StackOne",
50
+ "license": "SSPL-1.0",
51
+ "dependencies": {
52
+ "nanoid": "5.0.4"
53
+ },
54
+ "devDependencies": {
55
+ "@huggingface/transformers": "3.8.1",
56
+ "onnxruntime-node": "1.21.0"
57
+ },
58
+ "peerDependencies": {
59
+ "@huggingface/transformers": "^3.0.0",
60
+ "onnxruntime-node": ">=1.16.0"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "@huggingface/transformers": {
64
+ "optional": true
65
+ },
66
+ "onnxruntime-node": {
67
+ "optional": true
68
+ }
69
+ }
70
+ }