-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpackage.json
More file actions
227 lines (227 loc) · 8.49 KB
/
package.json
File metadata and controls
227 lines (227 loc) · 8.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
{
"name": "@elizaos/plugin-knowledge-root",
"private": true,
"version": "2.0.0-alpha.1",
"description": "Knowledge and RAG plugin for elizaOS - provides retrieval augmented generation capabilities",
"type": "module",
"main": "typescript/dist/index.js",
"types": "typescript/dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./typescript/dist/index.d.ts",
"import": "./typescript/dist/index.js",
"default": "./typescript/dist/index.js"
},
"./rust": {
"import": "./rust/pkg/node/elizaos_plugin_plugin_knowledge.js"
}
},
"files": [
"typescript/dist",
"README.md",
"python",
"rust/src",
"rust/Cargo.toml"
],
"keywords": [
"plugin",
"elizaos",
"knowledge",
"rag",
"retrieval-augmented-generation",
"embeddings"
],
"author": "elizaOS",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/elizaos-plugins/plugin-knowledge.git"
},
"scripts": {
"build": "bun run build:ts && bun run build:rust && bun run build:python",
"build:ts": "cd typescript && bun run build.ts",
"build:rust": "test -d rust && cd rust && cargo build --release || echo 'Rust build skipped - no rust directory'",
"build:python": "test -n \"$SKIP_PYTHON_BUILD\" && echo 'Python build skipped (SKIP_PYTHON_BUILD set)' || (test -d python && cd python && (timeout 120 python3 -m build 2>/dev/null || timeout 120 pyproject-build 2>/dev/null) || echo 'Python build skipped or timed out')",
"dev": "cd typescript && bun --hot build.ts",
"test": "bun run test:ts && bun run test:rust && bun run test:python",
"test:ts": "cd typescript && vitest run || echo 'TypeScript tests skipped - no tests found'",
"test:rust": "test -d rust && cd rust && cargo test || echo 'Rust tests skipped'",
"test:python": "test -d python && cd python && pytest -p no:anchorpy --asyncio-mode=auto || echo 'Python tests skipped'",
"typecheck": "tsc --noEmit -p typescript/tsconfig.json",
"lint": "bunx @biomejs/biome check --write ./typescript",
"lint:check": "bunx @biomejs/biome check ./typescript",
"lint:rust": "test -d rust && cd rust && cargo clippy --all-targets --fix --allow-dirty --allow-staged -- -D warnings && cargo fmt || echo 'Rust lint skipped'",
"lint:python": "test -d python && cd python && ruff check --fix . && ruff format . || echo 'Python lint skipped'",
"clean": "rm -rf typescript/dist python/dist rust/target .turbo node_modules",
"format": "bunx @biomejs/biome format --write ./typescript",
"format:check": "bunx @biomejs/biome format ./typescript",
"typecheck:python": "test -d python && cd python && mypy . --ignore-missing-imports || echo 'Python typecheck skipped'",
"typecheck:rust": "test -d rust && cd rust && cargo check || echo 'Rust typecheck skipped'"
},
"devDependencies": {
"@biomejs/biome": "^2.3.11",
"@types/bun": "^1.3.5",
"@types/node": "^25.0.3",
"typescript": "^5.9.3"
},
"peerDependencies": {
"@elizaos/core": "workspace:*"
},
"agentConfig": {
"pluginType": "elizaos:plugin:1.0.0",
"pluginParameters": {
"CTX_KNOWLEDGE_ENABLED": {
"type": "boolean",
"description": "Enables or disables contextual knowledge functionality; when set to 'true' additional text-generation settings are validated.",
"required": false,
"default": "false",
"sensitive": false
},
"EMBEDDING_PROVIDER": {
"type": "string",
"description": "Specifies which provider to use for generating embeddings (e.g., openai, google). If omitted the code assumes 'openai' through plugin-openai.",
"required": false,
"default": "openai",
"sensitive": false
},
"OPENAI_API_KEY": {
"type": "string",
"description": "API key used to authenticate requests to OpenAI services for embeddings or text generation.",
"required": false,
"sensitive": true
},
"OPENAI_EMBEDDING_MODEL": {
"type": "string",
"description": "Name of the OpenAI embedding model; also used as a fallback for TEXT_EMBEDDING_MODEL when EMBEDDING_PROVIDER defaults to openai.",
"required": false,
"sensitive": false
},
"TEXT_EMBEDDING_MODEL": {
"type": "string",
"description": "Embedding model name to use with the configured EMBEDDING_PROVIDER.",
"required": false,
"default": "text-embedding-3-small",
"sensitive": false
},
"EMBEDDING_DIMENSION": {
"type": "number",
"description": "Custom embedding dimension size.",
"required": false,
"default": 1536,
"sensitive": false
},
"OPENAI_EMBEDDING_DIMENSIONS": {
"type": "number",
"description": "Alternative variable to supply embedding dimension when using OpenAI.",
"required": false,
"default": 1536,
"sensitive": false
},
"TEXT_PROVIDER": {
"type": "string",
"description": "Provider to use for text generation when contextual knowledge is enabled (e.g., openai, anthropic, openrouter, google).",
"required": false,
"sensitive": false
},
"ANTHROPIC_API_KEY": {
"type": "string",
"description": "API key for Anthropic text generation models.",
"required": false,
"sensitive": true
},
"OPENROUTER_API_KEY": {
"type": "string",
"description": "API key for OpenRouter when using it as a text provider.",
"required": false,
"sensitive": true
},
"GOOGLE_API_KEY": {
"type": "string",
"description": "API key for Google AI services used for embeddings or text generation.",
"required": false,
"sensitive": true
},
"OPENAI_BASE_URL": {
"type": "string",
"description": "Custom base URL for routing OpenAI API requests (useful for proxies).",
"required": false,
"sensitive": false
},
"ANTHROPIC_BASE_URL": {
"type": "string",
"description": "Custom base URL for Anthropic API requests.",
"required": false,
"sensitive": false
},
"OPENROUTER_BASE_URL": {
"type": "string",
"description": "Custom base URL for OpenRouter API requests.",
"required": false,
"sensitive": false
},
"GOOGLE_BASE_URL": {
"type": "string",
"description": "Custom base URL for Google AI API requests.",
"required": false,
"sensitive": false
},
"TEXT_MODEL": {
"type": "string",
"description": "The specific text generation model to use with the selected TEXT_PROVIDER.",
"required": false,
"sensitive": false
},
"MAX_INPUT_TOKENS": {
"type": "number",
"description": "Maximum number of input tokens permitted per request.",
"required": false,
"default": 4000,
"sensitive": false
},
"MAX_OUTPUT_TOKENS": {
"type": "number",
"description": "Maximum number of output tokens that can be generated.",
"required": false,
"default": 4096,
"sensitive": false
},
"MAX_CONCURRENT_REQUESTS": {
"type": "number",
"description": "Upper bound on concurrent API requests for rate limiting.",
"required": false,
"default": 30,
"sensitive": false
},
"REQUESTS_PER_MINUTE": {
"type": "number",
"description": "Maximum number of API requests allowed per minute.",
"required": false,
"default": 60,
"sensitive": false
},
"TOKENS_PER_MINUTE": {
"type": "number",
"description": "Maximum number of tokens that can be processed per minute.",
"required": false,
"default": 150000,
"sensitive": false
},
"KNOWLEDGE_PATH": {
"type": "string",
"description": "Filesystem path where the knowledge loader searches for documents. Overrides the default ./docs directory.",
"required": false,
"default": "./docs",
"sensitive": false
},
"LOAD_DOCS_ON_STARTUP": {
"type": "boolean",
"description": "Controls whether the plugin should automatically load documents from the docs folder when the agent starts. Any value other than the string 'false' enables loading.",
"required": false,
"default": true,
"sensitive": false
}
}
},
"gitHead": "05d4ca11d769db8c7f54a722ee24b2ce2b951543"
}