@openenthrium/oe-runtime-sdk 1.8.4 → 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 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
+ [![npm](https://img.shields.io/npm/v/@openenthrium/oe-runtime-sdk?color=4f46e5)](https://www.npmjs.com/package/@openenthrium/oe-runtime-sdk)
6
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-4f46e5.svg)](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 / MySQL / SQLite
15
- npm install pg # PostgreSQL
16
- npm install mysql2 # MySQL / MariaDB
17
- npm install better-sqlite3 # SQLite
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
- # MongoDB
20
- npm install mongodb
29
+ ---
21
30
 
22
- # Redis
23
- npm install ioredis
31
+ ## Usage
24
32
 
25
- # Kafka / RabbitMQ
26
- npm install kafkajs
33
+ ### Run a SKILL.md skill (recommended)
27
34
 
28
- # S3 / object storage
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
- # SSH
32
- npm install ssh2
37
+ ```js
38
+ const { runAgent } = require("@openenthrium/oe-runtime-sdk");
33
39
 
34
- # Gmail / Google Drive
35
- npm install googleapis
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
- ## Usage
46
+ console.log(result.output);
47
+ console.log(result.toolCalls); // connector tools called
48
+ ```
39
49
 
40
- ### From file paths
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", // path to your agent
47
- "./oe-config.json", // path to your config
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
- ### From objects (no file I/O)
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
- instructions: "You are a SQL analyst.",
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 { runAgent } = require("@openenthrium/oe-runtime-sdk");
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
- ## Config file format
99
+ ---
100
+
101
+ ## oe-config.json
95
102
 
96
- Same `oe-config.json` used by OE Runtime CLI — no changes needed:
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
- ## Supported LLM providers
122
+ ---
123
+
124
+ ## Supported LLM Providers
125
+
126
+ `openai` · `anthropic` · `azure` · `groq` · `gemini` · `ollama` · `mistral` · `deepseek` · `together` · `fireworks` · `bedrock` · and more
125
127
 
126
- OpenAI, Anthropic, Azure OpenAI, Groq, Mistral, Ollama, Google Gemini, AWS Bedrock, and any OpenAI-compatible endpoint.
128
+ ---
127
129
 
128
- ## Supported connectors
130
+ ## Part of Open Enthrium
129
131
 
130
- 30+ connector types — PostgreSQL, MySQL, MongoDB, Redis, Elasticsearch, S3, GitHub, Slack, Gmail, Jira, Confluence, Notion, HubSpot, Kafka, MQTT, LDAP, GraphQL, Web3/Blockchain, SSH, shell, SFTP, and more.
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
- See [OE Runtime Connector Catalog](https://www.openenthrium.com/runtime.html) for the full list.
139
+ ---
133
140
 
134
- ## Links
141
+ ## License
135
142
 
136
- - [OE Runtime CLI](https://www.openenthrium.com/runtime.html)
137
- - [Sample library](https://github.com/enthrium/open-enthrium-ai-agent-runtime/releases/latest/download/oe-runtime-samples.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",
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.",
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
@@ -152,5 +152,4 @@ if (process.env.NODE_ENV === "production") {
152
152
  app.listen(PORT, async () => {
153
153
  console.log(`Open Enthrium server running on port ${PORT}`);
154
154
  await recoverPendingJobs();
155
- try { await require("./telemetry/bootstrap")(prisma); } catch {}
156
155
  });
@@ -3,15 +3,15 @@ const { authenticate } = require("../middleware/auth");
3
3
  const path = require("path");
4
4
  const fs = require("fs");
5
5
 
6
- const SAMPLES_DIR = path.resolve(__dirname, "../../cli/samples");
6
+ const SKILLS_DIR = path.resolve(__dirname, "../../cli/skills");
7
7
 
8
- function readSamples() {
9
- if (!fs.existsSync(SAMPLES_DIR)) return [];
10
- return fs.readdirSync(SAMPLES_DIR)
11
- .filter(f => fs.statSync(path.join(SAMPLES_DIR, f)).isDirectory())
8
+ function readSkills() {
9
+ if (!fs.existsSync(SKILLS_DIR)) return [];
10
+ return fs.readdirSync(SKILLS_DIR)
11
+ .filter(f => fs.statSync(path.join(SKILLS_DIR, f)).isDirectory())
12
12
  .map(folder => {
13
- const yamlPath = path.join(SAMPLES_DIR, folder, "agent.yaml");
14
- const configPath = path.join(SAMPLES_DIR, folder, "oe-config.json");
13
+ const yamlPath = path.join(SKILLS_DIR, folder, "agent.yaml");
14
+ const configPath = path.join(SKILLS_DIR, folder, "oe-config.json");
15
15
  const yaml = fs.existsSync(yamlPath) ? fs.readFileSync(yamlPath, "utf8") : null;
16
16
  const config = fs.existsSync(configPath) ? fs.readFileSync(configPath, "utf8") : null;
17
17
  return { folder, yaml, config };
@@ -19,27 +19,27 @@ function readSamples() {
19
19
  .filter(s => s.yaml);
20
20
  }
21
21
 
22
- // GET /api/marketplace/samples
23
- router.get("/samples", authenticate, (req, res) => {
22
+ // GET /api/marketplace/skills
23
+ router.get("/skills", authenticate, (req, res) => {
24
24
  try {
25
- res.json({ samples: readSamples() });
25
+ res.json({ skills: readSkills() });
26
26
  } catch (e) {
27
27
  res.status(500).json({ error: e.message });
28
28
  }
29
29
  });
30
30
 
31
- // GET /api/marketplace/samples/:folder/yaml
32
- router.get("/samples/:folder/yaml", authenticate, (req, res) => {
33
- const file = path.join(SAMPLES_DIR, req.params.folder, "agent.yaml");
31
+ // GET /api/marketplace/skills/:folder/yaml
32
+ router.get("/skills/:folder/yaml", authenticate, (req, res) => {
33
+ const file = path.join(SKILLS_DIR, req.params.folder, "agent.yaml");
34
34
  if (!fs.existsSync(file)) return res.status(404).json({ error: "Not found" });
35
35
  res.setHeader("Content-Type", "text/yaml");
36
36
  res.setHeader("Content-Disposition", `attachment; filename="${req.params.folder}.yaml"`);
37
37
  res.send(fs.readFileSync(file, "utf8"));
38
38
  });
39
39
 
40
- // GET /api/marketplace/samples/:folder/config
41
- router.get("/samples/:folder/config", authenticate, (req, res) => {
42
- const file = path.join(SAMPLES_DIR, req.params.folder, "oe-config.json");
40
+ // GET /api/marketplace/skills/:folder/config
41
+ router.get("/skills/:folder/config", authenticate, (req, res) => {
42
+ const file = path.join(SKILLS_DIR, req.params.folder, "oe-config.json");
43
43
  if (!fs.existsSync(file)) return res.status(404).json({ error: "Not found" });
44
44
  res.setHeader("Content-Type", "application/json");
45
45
  res.setHeader("Content-Disposition", `attachment; filename="${req.params.folder}.oe-config.json"`);
@@ -6,7 +6,7 @@ const yaml = require("js-yaml");
6
6
 
7
7
  router.use(authenticate, requireManagerOrAdmin);
8
8
 
9
- const SAMPLES_DIR = path.resolve(__dirname, "../../cli/samples");
9
+ const SAMPLES_DIR = path.resolve(__dirname, "../../cli/skills");
10
10
 
11
11
  // ── List templates ─────────────────────────────────────────────────────────────
12
12
  router.get("/", (req, res) => {
@@ -54,6 +54,7 @@ const filesystem = tryRequire("./adapters/filesystem");
54
54
  const ADAPTERS = {
55
55
  // SQL databases
56
56
  postgresql: database,
57
+ postgres: database,
57
58
  mysql: database,
58
59
  mssql: database,
59
60
  oracle: database,
@@ -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 };