@inkeep/agents-run-api 0.8.0 → 0.8.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.
|
@@ -8,6 +8,8 @@ var envSchema = z.object({
|
|
|
8
8
|
NODE_ENV: z.enum(["development", "production", "test"]).optional(),
|
|
9
9
|
ENVIRONMENT: z.enum(["development", "production", "pentest", "test"]).optional().default("development"),
|
|
10
10
|
DB_FILE_NAME: z.string(),
|
|
11
|
+
TURSO_DATABASE_URL: z.string().optional(),
|
|
12
|
+
TURSO_AUTH_TOKEN: z.string().optional(),
|
|
11
13
|
AGENTS_RUN_API_URL: z.string().optional().default("http://localhost:3003"),
|
|
12
14
|
LOG_LEVEL: z.enum(["trace", "debug", "info", "warn", "error"]).optional().default("debug"),
|
|
13
15
|
NANGO_SECRET_KEY: z.string().optional(),
|
|
@@ -33,13 +35,21 @@ ${error.message}`
|
|
|
33
35
|
var env = parseEnv();
|
|
34
36
|
|
|
35
37
|
// src/data/db/dbClient.ts
|
|
36
|
-
var
|
|
38
|
+
var getDbConfig = () => {
|
|
37
39
|
if (env.ENVIRONMENT === "test") {
|
|
38
|
-
return ":memory:";
|
|
40
|
+
return { url: ":memory:" };
|
|
39
41
|
}
|
|
40
|
-
|
|
42
|
+
if (env.TURSO_DATABASE_URL && env.TURSO_AUTH_TOKEN) {
|
|
43
|
+
return {
|
|
44
|
+
url: env.TURSO_DATABASE_URL,
|
|
45
|
+
authToken: env.TURSO_AUTH_TOKEN
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
url: env.DB_FILE_NAME
|
|
50
|
+
};
|
|
41
51
|
};
|
|
42
|
-
var dbClient = createDatabaseClient(
|
|
52
|
+
var dbClient = createDatabaseClient(getDbConfig());
|
|
43
53
|
var dbClient_default = dbClient;
|
|
44
54
|
|
|
45
55
|
// src/data/conversations.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultConversationHistoryConfig, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-
|
|
1
|
+
export { createDefaultConversationHistoryConfig, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-ETRXGI47.js';
|
package/dist/index.cjs
CHANGED
|
@@ -64,6 +64,8 @@ var init_env = __esm({
|
|
|
64
64
|
NODE_ENV: z5.z.enum(["development", "production", "test"]).optional(),
|
|
65
65
|
ENVIRONMENT: z5.z.enum(["development", "production", "pentest", "test"]).optional().default("development"),
|
|
66
66
|
DB_FILE_NAME: z5.z.string(),
|
|
67
|
+
TURSO_DATABASE_URL: z5.z.string().optional(),
|
|
68
|
+
TURSO_AUTH_TOKEN: z5.z.string().optional(),
|
|
67
69
|
AGENTS_RUN_API_URL: z5.z.string().optional().default("http://localhost:3003"),
|
|
68
70
|
LOG_LEVEL: z5.z.enum(["trace", "debug", "info", "warn", "error"]).optional().default("debug"),
|
|
69
71
|
NANGO_SECRET_KEY: z5.z.string().optional(),
|
|
@@ -89,17 +91,25 @@ ${error.message}`
|
|
|
89
91
|
env = parseEnv();
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
|
-
var
|
|
94
|
+
var getDbConfig, dbClient, dbClient_default;
|
|
93
95
|
var init_dbClient = __esm({
|
|
94
96
|
"src/data/db/dbClient.ts"() {
|
|
95
97
|
init_env();
|
|
96
|
-
|
|
98
|
+
getDbConfig = () => {
|
|
97
99
|
if (env.ENVIRONMENT === "test") {
|
|
98
|
-
return ":memory:";
|
|
100
|
+
return { url: ":memory:" };
|
|
99
101
|
}
|
|
100
|
-
|
|
102
|
+
if (env.TURSO_DATABASE_URL && env.TURSO_AUTH_TOKEN) {
|
|
103
|
+
return {
|
|
104
|
+
url: env.TURSO_DATABASE_URL,
|
|
105
|
+
authToken: env.TURSO_AUTH_TOKEN
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
url: env.DB_FILE_NAME
|
|
110
|
+
};
|
|
101
111
|
};
|
|
102
|
-
dbClient = agentsCore.createDatabaseClient(
|
|
112
|
+
dbClient = agentsCore.createDatabaseClient(getDbConfig());
|
|
103
113
|
dbClient_default = dbClient;
|
|
104
114
|
}
|
|
105
115
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultBatchProcessor } from './chunk-5RGAMXUL.js';
|
|
2
|
-
import { dbClient_default, getFormattedConversationHistory, env, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-
|
|
2
|
+
import { dbClient_default, getFormattedConversationHistory, env, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-ETRXGI47.js';
|
|
3
3
|
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
4
4
|
import { getLogger, getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentGraphWithDefaultAgent, contextValidationMiddleware, getFullGraph, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getAgentById, handleContextResolution, createMessage, commonGetErrorResponses, loggerFactory, createDefaultCredentialStores, CredentialStoreRegistry, listTaskIdsByContextId, getTask, getLedgerArtifacts, getAgentGraphById, createTask, updateTask, setSpanWithError, updateConversation, handleApiError, TaskState, setActiveAgentForThread, getConversation, getRelatedAgentsForGraph, getToolsForAgent, getDataComponentsForAgent, getArtifactComponentsForAgent, dbResultToMcpTool, validateAndGetApiKey, getProject, ContextResolver, CredentialStuffer, MCPServerType, getCredentialReference, McpClient, getContextConfigById, getFullGraphDefinition, TemplateEngine, graphHasArtifactComponents, MCPTransportType, getExternalAgent } from '@inkeep/agents-core';
|
|
5
5
|
import { otel } from '@hono/otel';
|
|
@@ -2087,7 +2087,7 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
|
|
|
2087
2087
|
);
|
|
2088
2088
|
}
|
|
2089
2089
|
span.setAttributes({ "validation.passed": true });
|
|
2090
|
-
const { getFormattedConversationHistory: getFormattedConversationHistory2 } = await import('./conversations-
|
|
2090
|
+
const { getFormattedConversationHistory: getFormattedConversationHistory2 } = await import('./conversations-I6KHD42D.js');
|
|
2091
2091
|
const conversationHistory = await getFormattedConversationHistory2({
|
|
2092
2092
|
tenantId: artifactData.tenantId,
|
|
2093
2093
|
projectId: artifactData.projectId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"traverse": "^0.6.11",
|
|
53
53
|
"ts-pattern": "^5.7.1",
|
|
54
54
|
"zod": "^4.1.5",
|
|
55
|
-
"@inkeep/agents-core": "^0.8.
|
|
55
|
+
"@inkeep/agents-core": "^0.8.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@hono/vite-dev-server": "^0.20.1",
|