openloops 0.2.6 → 0.2.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
|
@@ -224,6 +224,9 @@ AGENTIC_JOBS_LEASE_MS=
|
|
|
224
224
|
LLM_CALL_TIMEOUT_MS=
|
|
225
225
|
MCP_TOOL_TIMEOUT_MS=
|
|
226
226
|
|
|
227
|
+
# Optional, most MongoDB connections per process (default 3)
|
|
228
|
+
OPENLOOPS_MONGO_MAX_POOL_SIZE=
|
|
229
|
+
|
|
227
230
|
# Optional, see "Observability" below
|
|
228
231
|
SENTRY_DSN=
|
|
229
232
|
LANGFUSE_SECRET_KEY=
|
|
@@ -33,6 +33,9 @@ class MongoClient {
|
|
|
33
33
|
constructor(uri, options) {
|
|
34
34
|
if (!uri) throw new Error("[Mongo Client]: uri parameter is required");
|
|
35
35
|
this.client = new import_mongodb.MongoClient(uri, {
|
|
36
|
+
maxPoolSize: Number(import_secret_manager.secretManager.get("OPENLOOPS_MONGO_MAX_POOL_SIZE")) || 3,
|
|
37
|
+
minPoolSize: 0,
|
|
38
|
+
maxIdleTimeMS: 1e4,
|
|
36
39
|
...options,
|
|
37
40
|
connectTimeoutMS: 5e3,
|
|
38
41
|
serverSelectionTimeoutMS: 5e3
|
|
@@ -12,6 +12,9 @@ class MongoClient {
|
|
|
12
12
|
constructor(uri, options) {
|
|
13
13
|
if (!uri) throw new Error("[Mongo Client]: uri parameter is required");
|
|
14
14
|
this.client = new BaseMongoCLient(uri, {
|
|
15
|
+
maxPoolSize: Number(secretManager.get("OPENLOOPS_MONGO_MAX_POOL_SIZE")) || 3,
|
|
16
|
+
minPoolSize: 0,
|
|
17
|
+
maxIdleTimeMS: 1e4,
|
|
15
18
|
...options,
|
|
16
19
|
connectTimeoutMS: 5e3,
|
|
17
20
|
serverSelectionTimeoutMS: 5e3
|
package/docs/configuration.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| --- | --- | --- |
|
|
7
7
|
| `OPENLOOPS_DB_URI` | yes | MongoDB connection string. |
|
|
8
8
|
| `OPENLOOPS_DB_NAME` | no | Database name. Defaults to `openloops`. |
|
|
9
|
+
| `OPENLOOPS_MONGO_MAX_POOL_SIZE` | no | Most connections each process keeps open to MongoDB. Defaults to `3`, which suits serverless functions, where every instance handles one request at a time. Raise it for a long-running server. |
|
|
9
10
|
| `SECRET_MANAGER_KEY` | yes | Key used to decrypt values that start with `ENC:`. The library throws when it loads without it. |
|
|
10
11
|
| `ANTHROPIC_API_KEY` | for the default model | API key of the default provider, `anthropic`. |
|
|
11
12
|
| `OPENAI_API_KEY`, `GEMINI_API_KEY` | for those providers | API keys of the other providers you choose per chat. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openloops",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Open source harness for AI agents: a TypeScript runtime with persistence, tools, MCP trust, approvals and autonomous jobs, where the loop is pluggable",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jose Barcos",
|