@inkeep/agents-run-api 0.34.1 → 0.35.1
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/dist/{SandboxExecutorFactory-D3OSN652.js → SandboxExecutorFactory-NUNGK35F.js} +17 -21
- package/dist/{chunk-7GZGZNDA.js → chunk-7C3GUAQD.js} +4 -4
- package/dist/chunk-CWFQPSTI.js +5070 -0
- package/dist/chunk-SBJLXGYG.js +592 -0
- package/dist/{conversations-WAUHDR5J.js → conversations-ZCZG5434.js} +1 -1
- package/dist/dbClient-XO7KFTE7.js +1 -0
- package/dist/index.cjs +6752 -806
- package/dist/index.js +165 -181
- package/dist/nodefs-ZHXQGWPG.js +21 -0
- package/dist/opfs-ahp-CJXSQU3E.js +318 -0
- package/package.json +2 -2
- package/dist/chunk-4HDXSU6S.js +0 -13
- package/dist/chunk-PKBMQBKP.js +0 -5
- package/dist/dbClient-6HPZ2V7Y.js +0 -1
- /package/dist/{json-postprocessor-VOMU4E5L.js → json-postprocessor-IGYTSWFB.js} +0 -0
- /package/dist/{logger-6JGMWF6F.js → logger-3EE6BUSU.js} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getLogger } from './chunk-A2S7GSHL.js';
|
|
2
2
|
import { FUNCTION_TOOL_SANDBOX_POOL_TTL_MS, FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT, FUNCTION_TOOL_SANDBOX_CLEANUP_INTERVAL_MS, FUNCTION_TOOL_EXECUTION_TIMEOUT_MS_DEFAULT, FUNCTION_TOOL_SANDBOX_MAX_OUTPUT_SIZE_BYTES, FUNCTION_TOOL_SANDBOX_QUEUE_WAIT_TIMEOUT_MS } from './chunk-IVALDC72.js';
|
|
3
|
-
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
4
3
|
import { spawn } from 'child_process';
|
|
5
4
|
import crypto, { createHash } from 'crypto';
|
|
6
5
|
import { mkdirSync, existsSync, rmSync, writeFileSync } from 'fs';
|
|
@@ -56,10 +55,10 @@ function parseExecutionResult(stdout, functionId, logger4) {
|
|
|
56
55
|
// src/tools/NativeSandboxExecutor.ts
|
|
57
56
|
var logger = getLogger("native-sandbox-executor");
|
|
58
57
|
var ExecutionSemaphore = class {
|
|
58
|
+
permits;
|
|
59
|
+
waitQueue = [];
|
|
60
|
+
maxWaitTime;
|
|
59
61
|
constructor(permits, maxWaitTimeMs = FUNCTION_TOOL_SANDBOX_QUEUE_WAIT_TIMEOUT_MS) {
|
|
60
|
-
__publicField(this, "permits");
|
|
61
|
-
__publicField(this, "waitQueue", []);
|
|
62
|
-
__publicField(this, "maxWaitTime");
|
|
63
62
|
this.permits = Math.max(1, permits);
|
|
64
63
|
this.maxWaitTime = maxWaitTimeMs;
|
|
65
64
|
}
|
|
@@ -107,11 +106,12 @@ var ExecutionSemaphore = class {
|
|
|
107
106
|
return this.waitQueue.length;
|
|
108
107
|
}
|
|
109
108
|
};
|
|
110
|
-
var
|
|
109
|
+
var NativeSandboxExecutor = class _NativeSandboxExecutor {
|
|
110
|
+
tempDir;
|
|
111
|
+
sandboxPool = {};
|
|
112
|
+
static instance = null;
|
|
113
|
+
executionSemaphores = /* @__PURE__ */ new Map();
|
|
111
114
|
constructor() {
|
|
112
|
-
__publicField(this, "tempDir");
|
|
113
|
-
__publicField(this, "sandboxPool", {});
|
|
114
|
-
__publicField(this, "executionSemaphores", /* @__PURE__ */ new Map());
|
|
115
115
|
this.tempDir = join(tmpdir(), "inkeep-sandboxes");
|
|
116
116
|
this.ensureTempDir();
|
|
117
117
|
this.startPoolCleanup();
|
|
@@ -464,14 +464,13 @@ var _NativeSandboxExecutor = class _NativeSandboxExecutor {
|
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
|
-
__publicField(_NativeSandboxExecutor, "instance", null);
|
|
468
|
-
var NativeSandboxExecutor = _NativeSandboxExecutor;
|
|
469
467
|
var logger2 = getLogger("VercelSandboxExecutor");
|
|
470
|
-
var
|
|
468
|
+
var VercelSandboxExecutor = class _VercelSandboxExecutor {
|
|
469
|
+
static instance;
|
|
470
|
+
config;
|
|
471
|
+
sandboxPool = /* @__PURE__ */ new Map();
|
|
472
|
+
cleanupInterval = null;
|
|
471
473
|
constructor(config) {
|
|
472
|
-
__publicField(this, "config");
|
|
473
|
-
__publicField(this, "sandboxPool", /* @__PURE__ */ new Map());
|
|
474
|
-
__publicField(this, "cleanupInterval", null);
|
|
475
474
|
this.config = config;
|
|
476
475
|
logger2.info(
|
|
477
476
|
{
|
|
@@ -856,15 +855,14 @@ var _VercelSandboxExecutor = class _VercelSandboxExecutor {
|
|
|
856
855
|
}
|
|
857
856
|
}
|
|
858
857
|
};
|
|
859
|
-
__publicField(_VercelSandboxExecutor, "instance");
|
|
860
|
-
var VercelSandboxExecutor = _VercelSandboxExecutor;
|
|
861
858
|
|
|
862
859
|
// src/tools/SandboxExecutorFactory.ts
|
|
863
860
|
var logger3 = getLogger("SandboxExecutorFactory");
|
|
864
|
-
var
|
|
861
|
+
var SandboxExecutorFactory = class _SandboxExecutorFactory {
|
|
862
|
+
static instance;
|
|
863
|
+
nativeExecutor = null;
|
|
864
|
+
vercelExecutors = /* @__PURE__ */ new Map();
|
|
865
865
|
constructor() {
|
|
866
|
-
__publicField(this, "nativeExecutor", null);
|
|
867
|
-
__publicField(this, "vercelExecutors", /* @__PURE__ */ new Map());
|
|
868
866
|
logger3.info({}, "SandboxExecutorFactory initialized");
|
|
869
867
|
}
|
|
870
868
|
/**
|
|
@@ -942,7 +940,5 @@ var _SandboxExecutorFactory = class _SandboxExecutorFactory {
|
|
|
942
940
|
logger3.info({}, "Sandbox executor cleanup completed");
|
|
943
941
|
}
|
|
944
942
|
};
|
|
945
|
-
__publicField(_SandboxExecutorFactory, "instance");
|
|
946
|
-
var SandboxExecutorFactory = _SandboxExecutorFactory;
|
|
947
943
|
|
|
948
944
|
export { SandboxExecutorFactory };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dbClient_default } from './chunk-
|
|
1
|
+
import { dbClient_default } from './chunk-CWFQPSTI.js';
|
|
2
2
|
import { CONVERSATION_HISTORY_DEFAULT_LIMIT } from './chunk-IVALDC72.js';
|
|
3
3
|
import { CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, createMessage, generateId, getConversationHistory } from '@inkeep/agents-core';
|
|
4
4
|
|
|
@@ -208,7 +208,7 @@ async function getConversationScopedArtifacts(params) {
|
|
|
208
208
|
return [];
|
|
209
209
|
}
|
|
210
210
|
const { getLedgerArtifacts } = await import('@inkeep/agents-core');
|
|
211
|
-
const dbClient = (await import('./dbClient-
|
|
211
|
+
const dbClient = (await import('./dbClient-XO7KFTE7.js')).default;
|
|
212
212
|
const visibleTaskIds = visibleMessages.map((msg) => msg.taskId).filter((taskId) => Boolean(taskId));
|
|
213
213
|
const referenceArtifacts = [];
|
|
214
214
|
for (const taskId of visibleTaskIds) {
|
|
@@ -218,7 +218,7 @@ async function getConversationScopedArtifacts(params) {
|
|
|
218
218
|
});
|
|
219
219
|
referenceArtifacts.push(...artifacts);
|
|
220
220
|
}
|
|
221
|
-
const logger = (await import('./logger-
|
|
221
|
+
const logger = (await import('./logger-3EE6BUSU.js')).getLogger("conversations");
|
|
222
222
|
logger.debug(
|
|
223
223
|
{
|
|
224
224
|
conversationId,
|
|
@@ -231,7 +231,7 @@ async function getConversationScopedArtifacts(params) {
|
|
|
231
231
|
);
|
|
232
232
|
return referenceArtifacts;
|
|
233
233
|
} catch (error) {
|
|
234
|
-
const logger = (await import('./logger-
|
|
234
|
+
const logger = (await import('./logger-3EE6BUSU.js')).getLogger("conversations");
|
|
235
235
|
logger.error(
|
|
236
236
|
{
|
|
237
237
|
error: error instanceof Error ? error.message : "Unknown error",
|