@openenthrium/oe-runtime 1.5.8 → 1.5.9
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 +61 -1
- package/bin.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,12 @@ OE Runtime is a standalone binary that reads a declarative YAML agent file, conn
|
|
|
36
36
|
"user": "postgres",
|
|
37
37
|
"password": "secret"
|
|
38
38
|
}
|
|
39
|
-
]
|
|
39
|
+
],
|
|
40
|
+
"server": {
|
|
41
|
+
"enabled": true,
|
|
42
|
+
"port": 3333,
|
|
43
|
+
"apiKey": "your-secret"
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
46
|
```
|
|
42
47
|
|
|
@@ -77,6 +82,61 @@ npx -y @openenthrium/oe-runtime agent.yaml --config oe-config.json
|
|
|
77
82
|
| **CLI** | `npx -y @openenthrium/oe-runtime agent.yaml --config oe-config.json` | One-shot agent runs, scripts, CI/CD |
|
|
78
83
|
| **HTTP Server** | `npx -y @openenthrium/oe-runtime --serve --config oe-config.json` | Persistent API server any app can call |
|
|
79
84
|
|
|
85
|
+
> **Tip:** Set `"server": { "enabled": true }` in `oe-config.json` to auto-start as HTTP server without the `--serve` flag.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## HTTP Server Endpoints
|
|
90
|
+
|
|
91
|
+
All endpoints require the `x-api-key` header when `server.apiKey` is set in your config.
|
|
92
|
+
|
|
93
|
+
| Method | Path | Description |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `GET` | `/health` | Liveness check — returns `{ "status": "ok", "version": "..." }` |
|
|
96
|
+
| `POST` | `/run` | Run an agent from an inline YAML string |
|
|
97
|
+
| `POST` | `/run-file` | Run an agent from a YAML file path on disk |
|
|
98
|
+
|
|
99
|
+
**POST /run** — body:
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"yaml": "name: Hi\nsteps:\n - name: Greet\n content: Say hi!",
|
|
103
|
+
"params": {},
|
|
104
|
+
"input": "optional user message"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**POST /run-file** — body:
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"file": "/path/to/agent.yaml",
|
|
112
|
+
"params": { "topic": "AI trends" },
|
|
113
|
+
"input": "optional user message"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Response** (both /run and /run-file):
|
|
118
|
+
```json
|
|
119
|
+
{ "success": true, "output": "...", "duration_ms": 1234 }
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Example curl:**
|
|
123
|
+
```bash
|
|
124
|
+
# Health check
|
|
125
|
+
curl http://localhost:3333/health -H "x-api-key: your-secret"
|
|
126
|
+
|
|
127
|
+
# Run inline agent
|
|
128
|
+
curl -X POST http://localhost:3333/run \
|
|
129
|
+
-H "x-api-key: your-secret" \
|
|
130
|
+
-H "Content-Type: application/json" \
|
|
131
|
+
-d '{"yaml":"name: Hi\nsteps:\n - name: Greet\n content: Say hi!"}'
|
|
132
|
+
|
|
133
|
+
# Run agent from file
|
|
134
|
+
curl -X POST http://localhost:3333/run-file \
|
|
135
|
+
-H "x-api-key: your-secret" \
|
|
136
|
+
-H "Content-Type: application/json" \
|
|
137
|
+
-d '{"file":"/path/to/agent.yaml","params":{"topic":"AI trends"}}'
|
|
138
|
+
```
|
|
139
|
+
|
|
80
140
|
---
|
|
81
141
|
|
|
82
142
|
## Supported Connectors
|
package/bin.js
CHANGED
|
@@ -23,7 +23,8 @@ if (!fs.existsSync(BIN_PATH)) {
|
|
|
23
23
|
process.exit(1);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const cwd = process.env.INIT_CWD || process.cwd();
|
|
27
|
+
const child = spawn(BIN_PATH, process.argv.slice(2), { stdio: "inherit", cwd });
|
|
27
28
|
child.on("exit", (code) => process.exit(code ?? 0));
|
|
28
29
|
child.on("error", (err) => {
|
|
29
30
|
console.error("OE Runtime:", err.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openenthrium/oe-runtime",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"description": "OE Runtime - run AI agents against 2,600+ enterprise data sources. One binary, one YAML agent, one config file.",
|
|
5
5
|
"homepage": "https://www.openenthrium.com/runtime.html",
|
|
6
6
|
"repository": {
|