@openenthrium/oe-runtime-sdk 1.8.3 → 1.8.6
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 +1 -1
- package/package.json +1 -1
- package/src/routes/marketplace.js +16 -16
- package/src/routes/templates.js +1 -1
- package/src/utils/tools/registry.js +33 -30
package/README.md
CHANGED
|
@@ -134,6 +134,6 @@ See [OE Runtime Connector Catalog](https://www.openenthrium.com/runtime.html) fo
|
|
|
134
134
|
## Links
|
|
135
135
|
|
|
136
136
|
- [OE Runtime CLI](https://www.openenthrium.com/runtime.html)
|
|
137
|
-
- [
|
|
137
|
+
- [Skills library](https://github.com/enthrium/open-enthrium-ai-agent-runtime/releases/latest/download/oe-runtime-skills.zip)
|
|
138
138
|
- [GitHub](https://github.com/enthrium/open-enthrium-ai-agent-runtime)
|
|
139
139
|
- [Open Enthrium](https://www.openenthrium.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openenthrium/oe-runtime-sdk",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.6",
|
|
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.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"homepage": "https://www.openenthrium.com/runtime.html",
|
|
@@ -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
|
|
6
|
+
const SKILLS_DIR = path.resolve(__dirname, "../../cli/skills");
|
|
7
7
|
|
|
8
|
-
function
|
|
9
|
-
if (!fs.existsSync(
|
|
10
|
-
return fs.readdirSync(
|
|
11
|
-
.filter(f => fs.statSync(path.join(
|
|
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(
|
|
14
|
-
const configPath = path.join(
|
|
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/
|
|
23
|
-
router.get("/
|
|
22
|
+
// GET /api/marketplace/skills
|
|
23
|
+
router.get("/skills", authenticate, (req, res) => {
|
|
24
24
|
try {
|
|
25
|
-
res.json({
|
|
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/
|
|
32
|
-
router.get("/
|
|
33
|
-
const file = path.join(
|
|
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/
|
|
41
|
-
router.get("/
|
|
42
|
-
const file = path.join(
|
|
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"`);
|
package/src/routes/templates.js
CHANGED
|
@@ -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/
|
|
9
|
+
const SAMPLES_DIR = path.resolve(__dirname, "../../cli/skills");
|
|
10
10
|
|
|
11
11
|
// ── List templates ─────────────────────────────────────────────────────────────
|
|
12
12
|
router.get("/", (req, res) => {
|
|
@@ -18,40 +18,43 @@ try {
|
|
|
18
18
|
// Running inside a compiled binary — static ADAPTERS map below handles routing
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
21
|
+
function tryRequire(p) { try { return require(p); } catch { return null; } }
|
|
22
|
+
|
|
23
|
+
const database = tryRequire("./adapters/database");
|
|
24
|
+
const restApi = tryRequire("./adapters/rest-api");
|
|
25
|
+
const mongodb = tryRequire("./adapters/mongodb");
|
|
26
|
+
const gmail = tryRequire("./adapters/gmail");
|
|
27
|
+
const slack = tryRequire("./adapters/slack");
|
|
28
|
+
const jira = tryRequire("./adapters/jira");
|
|
29
|
+
const confluence = tryRequire("./adapters/confluence");
|
|
30
|
+
const notion = tryRequire("./adapters/notion");
|
|
31
|
+
const hubspot = tryRequire("./adapters/hubspot");
|
|
32
|
+
const freshdesk = tryRequire("./adapters/freshdesk");
|
|
33
|
+
const zendesk = tryRequire("./adapters/zendesk");
|
|
34
|
+
const github = tryRequire("./adapters/github");
|
|
35
|
+
const zohoMail = tryRequire("./adapters/zoho-mail");
|
|
36
|
+
const gdrive = tryRequire("./adapters/gdrive");
|
|
37
|
+
const redis = tryRequire("./adapters/redis");
|
|
38
|
+
const elasticsearch = tryRequire("./adapters/elasticsearch");
|
|
39
|
+
const onedrive = tryRequire("./adapters/onedrive");
|
|
40
|
+
const dropbox = tryRequire("./adapters/dropbox");
|
|
41
|
+
const box = tryRequire("./adapters/box");
|
|
42
|
+
const ssh = tryRequire("./adapters/ssh");
|
|
43
|
+
const shell = tryRequire("./adapters/shell");
|
|
44
|
+
const sftp = tryRequire("./adapters/sftp");
|
|
45
|
+
const s3 = tryRequire("./adapters/s3");
|
|
46
|
+
const kafka = tryRequire("./adapters/kafka");
|
|
47
|
+
const mqttAdapter = tryRequire("./adapters/mqtt");
|
|
48
|
+
const ldap = tryRequire("./adapters/ldap");
|
|
49
|
+
const graphql = tryRequire("./adapters/graphql");
|
|
50
|
+
const web3 = tryRequire("./adapters/web3");
|
|
51
|
+
const mcpClient = tryRequire("./adapters/mcp-client");
|
|
52
|
+
const filesystem = tryRequire("./adapters/filesystem");
|
|
51
53
|
|
|
52
54
|
const ADAPTERS = {
|
|
53
55
|
// SQL databases
|
|
54
56
|
postgresql: database,
|
|
57
|
+
postgres: database,
|
|
55
58
|
mysql: database,
|
|
56
59
|
mssql: database,
|
|
57
60
|
oracle: database,
|