@openexpert/opencore 0.1.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/README.md +22 -0
- package/bin/opencore.js +24 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +622 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +25 -0
- package/dist/config.js +65 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +144 -0
- package/dist/index.js.map +1 -0
- package/dist/model-provider.d.ts +18 -0
- package/dist/model-provider.js +44 -0
- package/dist/model-provider.js.map +1 -0
- package/dist/secrets.d.ts +16 -0
- package/dist/secrets.js +9 -0
- package/dist/secrets.js.map +1 -0
- package/dist/storage.d.ts +10 -0
- package/dist/storage.js +17 -0
- package/dist/storage.js.map +1 -0
- package/dist/tools.d.ts +10 -0
- package/dist/tools.js +21 -0
- package/dist/tools.js.map +1 -0
- package/package.json +97 -0
- package/schema/openexpert.schema.json +80 -0
package/package.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openexpert/opencore",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenCore — open-source engine of OpenExpert (MIT). Mode, config, model provider selector (Google / Ollama / OpenAI-compatible / OpenExpert gateway), storage and secrets interfaces, tool catalog, and CLI.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./config": {
|
|
16
|
+
"types": "./dist/config.d.ts",
|
|
17
|
+
"default": "./dist/config.js"
|
|
18
|
+
},
|
|
19
|
+
"./model-provider": {
|
|
20
|
+
"types": "./dist/model-provider.d.ts",
|
|
21
|
+
"default": "./dist/model-provider.js"
|
|
22
|
+
},
|
|
23
|
+
"./storage": {
|
|
24
|
+
"types": "./dist/storage.d.ts",
|
|
25
|
+
"default": "./dist/storage.js"
|
|
26
|
+
},
|
|
27
|
+
"./secrets": {
|
|
28
|
+
"types": "./dist/secrets.d.ts",
|
|
29
|
+
"default": "./dist/secrets.js"
|
|
30
|
+
},
|
|
31
|
+
"./tools": {
|
|
32
|
+
"types": "./dist/tools.d.ts",
|
|
33
|
+
"default": "./dist/tools.js"
|
|
34
|
+
},
|
|
35
|
+
"./schema": "./schema/openexpert.schema.json"
|
|
36
|
+
},
|
|
37
|
+
"bin": {
|
|
38
|
+
"opencore": "./bin/opencore.js",
|
|
39
|
+
"openexpert": "./bin/opencore.js"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"bin",
|
|
44
|
+
"schema",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"NOTICE"
|
|
48
|
+
],
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=24"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"openexpert",
|
|
54
|
+
"opencore",
|
|
55
|
+
"ai",
|
|
56
|
+
"agents",
|
|
57
|
+
"mit",
|
|
58
|
+
"oss",
|
|
59
|
+
"model-gateway"
|
|
60
|
+
],
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "https://github.com/OpenExpert-ai/OpenExpert.git",
|
|
64
|
+
"directory": "packages/opencore"
|
|
65
|
+
},
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/OpenExpert-ai/OpenExpert/issues"
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public",
|
|
71
|
+
"provenance": true
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsup",
|
|
75
|
+
"dev": "tsup --watch",
|
|
76
|
+
"prepare": "tsup",
|
|
77
|
+
"prepack": "tsup",
|
|
78
|
+
"test": "vitest run",
|
|
79
|
+
"test:run": "vitest run",
|
|
80
|
+
"test:coverage": "vitest run --coverage",
|
|
81
|
+
"test:watch": "vitest",
|
|
82
|
+
"doctor": "node ./bin/opencore.js doctor",
|
|
83
|
+
"serve": "node ./bin/opencore.js serve",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"@ai-sdk/openai": "^4.0.5",
|
|
88
|
+
"@clack/prompts": "^0.9.1",
|
|
89
|
+
"ai": "^7.0.0"
|
|
90
|
+
},
|
|
91
|
+
"devDependencies": {
|
|
92
|
+
"@types/node": "^22.16.5",
|
|
93
|
+
"tsup": "^8.3.5",
|
|
94
|
+
"typescript": "^5.8.3",
|
|
95
|
+
"vitest": "^5.0.3"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/OpenExpert-ai/OpenExpert/main/packages/opencore/schema/openexpert.schema.json",
|
|
4
|
+
"title": "OpenExpert configuration",
|
|
5
|
+
"description": "Schema for the openexpert.json file consumed by OpenExpert. Environment variables OPENEXPERT_* always take precedence over the file.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"modelProvider": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["google", "ollama", "openai-compatible"],
|
|
12
|
+
"description": "Which model provider the chat should use."
|
|
13
|
+
},
|
|
14
|
+
"modelId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"description": "Identifier of the model as known by the chosen provider."
|
|
18
|
+
},
|
|
19
|
+
"ollamaBaseUrl": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uri",
|
|
22
|
+
"description": "Base URL of the Ollama server."
|
|
23
|
+
},
|
|
24
|
+
"dataDir": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"description": "Directory where the SQLite database and credentials live. `~/` expands to the user's home directory."
|
|
28
|
+
},
|
|
29
|
+
"ai": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"description": "Sampling parameters for the chat model.",
|
|
33
|
+
"properties": {
|
|
34
|
+
"temperature": {
|
|
35
|
+
"type": "number",
|
|
36
|
+
"minimum": 0,
|
|
37
|
+
"maximum": 2,
|
|
38
|
+
"description": "Sampling temperature (0 = deterministic)."
|
|
39
|
+
},
|
|
40
|
+
"topP": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 1,
|
|
44
|
+
"description": "Nucleus sampling probability mass."
|
|
45
|
+
},
|
|
46
|
+
"maxOutputTokens": {
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"minimum": 1,
|
|
49
|
+
"description": "Maximum number of tokens the model may generate per step."
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"chat": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"description": "Chat and agent behaviour.",
|
|
57
|
+
"properties": {
|
|
58
|
+
"maxSteps": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 1,
|
|
61
|
+
"description": "Maximum number of tool-calling steps per request."
|
|
62
|
+
},
|
|
63
|
+
"injectionGuard": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"description": "Enable the prompt-injection security gate."
|
|
66
|
+
},
|
|
67
|
+
"injectionExtraPatterns": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string" },
|
|
70
|
+
"description": "Extra regular expressions added to the injection gate."
|
|
71
|
+
},
|
|
72
|
+
"retentionDays": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 0,
|
|
75
|
+
"description": "Days to keep chat history before it is pruned."
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|