@openenthrium/oe-runtime-sdk 1.8.6 → 1.8.7
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 +56 -52
- package/package.json +2 -2
- package/src/index.js +0 -1
- package/src/telemetry/bootstrap.js +0 -39
- package/src/telemetry/registration.js +0 -16
package/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# OE Runtime SDK
|
|
1
|
+
# OE Runtime SDK · `@openenthrium/oe-runtime-sdk`
|
|
2
2
|
|
|
3
3
|
Embed AI agent execution directly in your Node.js application. Same engine as [OE Runtime CLI](https://www.openenthrium.com/runtime.html) — no subprocess, no HTTP overhead, just a function call.
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/@openenthrium/oe-runtime-sdk)
|
|
6
|
+
[](https://github.com/enthrium/open-enthrium-ai-agent-runtime/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
5
10
|
## Install
|
|
6
11
|
|
|
7
12
|
```bash
|
|
@@ -11,56 +16,58 @@ npm install @openenthrium/oe-runtime-sdk
|
|
|
11
16
|
Install only the connector dependencies your agents actually use:
|
|
12
17
|
|
|
13
18
|
```bash
|
|
14
|
-
# PostgreSQL
|
|
15
|
-
npm install
|
|
16
|
-
npm install
|
|
17
|
-
npm install
|
|
19
|
+
npm install pg # PostgreSQL
|
|
20
|
+
npm install mysql2 # MySQL / MariaDB
|
|
21
|
+
npm install mongodb # MongoDB
|
|
22
|
+
npm install ioredis # Redis
|
|
23
|
+
npm install ssh2 # SSH / SFTP
|
|
24
|
+
npm install kafkajs # Kafka
|
|
25
|
+
npm install @aws-sdk/client-s3 # S3 / object storage
|
|
26
|
+
npm install googleapis # Gmail, Google Drive
|
|
27
|
+
```
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
npm install mongodb
|
|
29
|
+
---
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
npm install ioredis
|
|
31
|
+
## Usage
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
npm install kafkajs
|
|
33
|
+
### Run a SKILL.md skill (recommended)
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
npm install @aws-sdk/client-s3
|
|
35
|
+
Pass the skill folder — the SDK resolves `agent.yaml` + `SKILL.md` inside it automatically.
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
```js
|
|
38
|
+
const { runAgent } = require("@openenthrium/oe-runtime-sdk");
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
const result = await runAgent(
|
|
41
|
+
"./skills/sql-databases", // folder containing SKILL.md + agent.yaml
|
|
42
|
+
"./oe-config.json",
|
|
43
|
+
{ topic: "Q3 sales" } // optional params
|
|
44
|
+
);
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
console.log(result.output);
|
|
47
|
+
console.log(result.toolCalls); // connector tools called
|
|
48
|
+
```
|
|
39
49
|
|
|
40
|
-
###
|
|
50
|
+
### Run from an agent.yaml file path
|
|
41
51
|
|
|
42
52
|
```js
|
|
43
53
|
const { runAgent } = require("@openenthrium/oe-runtime-sdk");
|
|
44
54
|
|
|
45
55
|
const result = await runAgent(
|
|
46
|
-
"./agent.yaml",
|
|
47
|
-
"./oe-config.json"
|
|
48
|
-
{ topic: "Q3 sales" } // optional params
|
|
56
|
+
"./my-agent/agent.yaml",
|
|
57
|
+
"./oe-config.json"
|
|
49
58
|
);
|
|
50
59
|
|
|
51
60
|
console.log(result.output);
|
|
52
|
-
console.log(result.toolCalls); // list of connector tools called
|
|
53
61
|
```
|
|
54
62
|
|
|
55
|
-
###
|
|
63
|
+
### Run from inline objects (no file I/O)
|
|
56
64
|
|
|
57
65
|
```js
|
|
58
66
|
const { runAgentFromObject } = require("@openenthrium/oe-runtime-sdk");
|
|
59
67
|
|
|
60
68
|
const agent = {
|
|
61
69
|
name: "Database Analyst",
|
|
62
|
-
|
|
63
|
-
steps: [{ name: "Query", content: "List all tables and their row counts." }],
|
|
70
|
+
skills: [{ path: "./SKILL.md", trigger_type: "auto" }],
|
|
64
71
|
connectors: [{ connection_name: "My Database", connection_type: "postgresql" }],
|
|
65
72
|
};
|
|
66
73
|
|
|
@@ -81,9 +88,7 @@ console.log(result.output);
|
|
|
81
88
|
### With hooks (streaming tool calls)
|
|
82
89
|
|
|
83
90
|
```js
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
const result = await runAgent("./agent.yaml", "./oe-config.json", {}, {
|
|
91
|
+
const result = await runAgent("./my-agent/agent.yaml", "./oe-config.json", {}, {
|
|
87
92
|
onToolCall: (name) => console.log(`→ ${name}`),
|
|
88
93
|
onToolResult: (name, result) => console.log(`↳ ${result}`),
|
|
89
94
|
onDone: (output) => console.log("Done:", output),
|
|
@@ -91,22 +96,15 @@ const result = await runAgent("./agent.yaml", "./oe-config.json", {}, {
|
|
|
91
96
|
});
|
|
92
97
|
```
|
|
93
98
|
|
|
94
|
-
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## oe-config.json
|
|
95
102
|
|
|
96
|
-
Same
|
|
103
|
+
Same config used by OE Runtime CLI — no changes needed:
|
|
97
104
|
|
|
98
105
|
```json
|
|
99
106
|
{
|
|
100
|
-
"llm": {
|
|
101
|
-
"provider": "openai",
|
|
102
|
-
"model": "gpt-4o",
|
|
103
|
-
"apiKey": "YOUR_OPENAI_API_KEY"
|
|
104
|
-
},
|
|
105
|
-
"server": {
|
|
106
|
-
"enabled": false,
|
|
107
|
-
"port": 3333,
|
|
108
|
-
"apiKey": "your-secret-api-key"
|
|
109
|
-
},
|
|
107
|
+
"llm": { "provider": "openai", "model": "gpt-4o", "apiKey": "sk-..." },
|
|
110
108
|
"connectors": [
|
|
111
109
|
{
|
|
112
110
|
"connection_name": "My Database",
|
|
@@ -121,19 +119,25 @@ Same `oe-config.json` used by OE Runtime CLI — no changes needed:
|
|
|
121
119
|
}
|
|
122
120
|
```
|
|
123
121
|
|
|
124
|
-
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Supported LLM Providers
|
|
125
|
+
|
|
126
|
+
`openai` · `anthropic` · `azure` · `groq` · `gemini` · `ollama` · `mistral` · `deepseek` · `together` · `fireworks` · `bedrock` · and more
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
---
|
|
127
129
|
|
|
128
|
-
##
|
|
130
|
+
## Part of Open Enthrium
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
| | |
|
|
133
|
+
|---|---|
|
|
134
|
+
| ⚡ **Runtime CLI** | [@openenthrium/oe-runtime](https://www.npmjs.com/package/@openenthrium/oe-runtime) — standalone binary / npx |
|
|
135
|
+
| 🖥️ **Platform** | [open-enthrium-ai-platform](https://github.com/enthrium/open-enthrium-ai-platform) — full web app with workspaces, RAG, Agent Builder |
|
|
136
|
+
| 🔌 **MCP Server** | [open-enthrium-ai-mcp-server](https://github.com/enthrium/open-enthrium-ai-mcp-server) — connect Claude Code, Cursor, Windsurf to enterprise data |
|
|
137
|
+
| 🌐 **Website** | [openenthrium.com](https://www.openenthrium.com) |
|
|
131
138
|
|
|
132
|
-
|
|
139
|
+
---
|
|
133
140
|
|
|
134
|
-
##
|
|
141
|
+
## License
|
|
135
142
|
|
|
136
|
-
-
|
|
137
|
-
- [Skills library](https://github.com/enthrium/open-enthrium-ai-agent-runtime/releases/latest/download/oe-runtime-skills.zip)
|
|
138
|
-
- [GitHub](https://github.com/enthrium/open-enthrium-ai-agent-runtime)
|
|
139
|
-
- [Open Enthrium](https://www.openenthrium.com)
|
|
143
|
+
[Apache-2.0](https://github.com/enthrium/open-enthrium-ai-agent-runtime/blob/main/LICENSE) — free to use, modify, and deploy for any purpose, including commercial use.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openenthrium/oe-runtime-sdk",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"description": "OE Runtime SDK
|
|
3
|
+
"version": "1.8.7",
|
|
4
|
+
"description": "OE Runtime SDK — embed AI agent execution directly in your Node.js application. Same engine as OE Runtime CLI, importable as a library.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"homepage": "https://www.openenthrium.com/runtime.html",
|
|
7
7
|
"repository": {
|
package/src/index.js
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const { v4: uuidv4 } = require("uuid");
|
|
4
|
-
const { sendRegistration } = require("./registration");
|
|
5
|
-
|
|
6
|
-
const { version } = JSON.parse(fs.readFileSync(path.resolve(__dirname, "../../../package.json"), "utf8"));
|
|
7
|
-
|
|
8
|
-
module.exports = async function bootstrap(prisma) {
|
|
9
|
-
try {
|
|
10
|
-
if (process.env.LICENSE_TYPE === "enterprise") return;
|
|
11
|
-
|
|
12
|
-
const upsert = (key, value) => prisma.setting.upsert({
|
|
13
|
-
where: { key },
|
|
14
|
-
create: { key, value },
|
|
15
|
-
update: { value },
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const getSetting = (key) => prisma.setting.findUnique({ where: { key } }).then(r => r?.value ?? null);
|
|
19
|
-
|
|
20
|
-
// Generate instance ID once
|
|
21
|
-
let instanceId = await getSetting("telemetry.instanceId");
|
|
22
|
-
if (!instanceId) {
|
|
23
|
-
instanceId = uuidv4();
|
|
24
|
-
await upsert("telemetry.instanceId", instanceId);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const lastVersion = await getSetting("telemetry.lastVersion");
|
|
28
|
-
|
|
29
|
-
// Send on first boot or version upgrade
|
|
30
|
-
if (lastVersion !== version) {
|
|
31
|
-
const email = process.env.SUPER_ADMIN_EMAIL || "";
|
|
32
|
-
await sendRegistration({ email, company: "", instanceId, version, event: lastVersion ? "upgrade" : "first_boot" });
|
|
33
|
-
await upsert("telemetry.lastVersion", version);
|
|
34
|
-
console.log(`[Telemetry] Registered instance ${instanceId} v${version}`);
|
|
35
|
-
}
|
|
36
|
-
} catch (err) {
|
|
37
|
-
// never crash the server
|
|
38
|
-
}
|
|
39
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const TELEMETRY_URL = "https://script.google.com/macros/s/AKfycbxzUHUVoXFQW9Hh2cUMKeIhmNWNLPHU2nSKS_yDO3CLYNpfmvGMuyeH8Y8jypvbdAQ/exec";
|
|
2
|
-
const TELEMETRY_TOKEN = "oe-reg-2026-openenthrium";
|
|
3
|
-
|
|
4
|
-
async function sendRegistration({ email, company, instanceId, version, event = "first_boot" }) {
|
|
5
|
-
try {
|
|
6
|
-
await fetch(TELEMETRY_URL, {
|
|
7
|
-
method: "POST",
|
|
8
|
-
headers: { "Content-Type": "application/json" },
|
|
9
|
-
body: JSON.stringify({ token: TELEMETRY_TOKEN, email, company, instanceId, version, event }),
|
|
10
|
-
});
|
|
11
|
-
} catch {
|
|
12
|
-
// silent fail — never block the user
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
module.exports = { sendRegistration };
|