@inkeep/agents-run-api 0.0.0-dev-20250911175803 → 0.0.0-dev-20250911195722
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/index.cjs +27 -13
- package/dist/index.js +27 -13
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -406,23 +406,28 @@ init_instrumentation();
|
|
|
406
406
|
|
|
407
407
|
// src/logger.ts
|
|
408
408
|
init_env();
|
|
409
|
-
var
|
|
409
|
+
var isDevelopment = env.ENVIRONMENT === "development";
|
|
410
|
+
var loggerConfig = {
|
|
410
411
|
level: env.LOG_LEVEL,
|
|
411
412
|
serializers: {
|
|
412
413
|
obj: (value) => ({ ...value })
|
|
413
414
|
},
|
|
414
415
|
redact: ["req.headers.authorization", 'req.headers["x-inkeep-admin-authentication"]'],
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
416
|
+
// Only use pino-pretty in development
|
|
417
|
+
...isDevelopment && {
|
|
418
|
+
transport: {
|
|
419
|
+
target: "pino-pretty",
|
|
420
|
+
options: {
|
|
421
|
+
sync: true,
|
|
422
|
+
destination: 1,
|
|
423
|
+
// stdout
|
|
424
|
+
colorize: true,
|
|
425
|
+
translateTime: "SYS:standard"
|
|
426
|
+
}
|
|
423
427
|
}
|
|
424
428
|
}
|
|
425
|
-
}
|
|
429
|
+
};
|
|
430
|
+
var logger = pino.pino(loggerConfig);
|
|
426
431
|
var asyncLocalStorage = new async_hooks.AsyncLocalStorage();
|
|
427
432
|
function getLogger(name) {
|
|
428
433
|
const store = asyncLocalStorage.getStore();
|
|
@@ -5511,6 +5516,11 @@ var Agent = class {
|
|
|
5511
5516
|
}
|
|
5512
5517
|
async getMcpTool(tool4) {
|
|
5513
5518
|
const credentialReferenceId = tool4.credentialReferenceId;
|
|
5519
|
+
const toolsForAgent = await agentsCore.getToolsForAgent(dbClient_default)({
|
|
5520
|
+
scopes: { tenantId: this.config.tenantId, projectId: this.config.projectId },
|
|
5521
|
+
agentId: this.config.id
|
|
5522
|
+
});
|
|
5523
|
+
const selectedTools = toolsForAgent.data.find((t) => t.toolId === tool4.id)?.selectedTools || void 0;
|
|
5514
5524
|
let serverConfig;
|
|
5515
5525
|
if (credentialReferenceId && this.credentialStuffer) {
|
|
5516
5526
|
const credentialReference = await agentsCore.getCredentialReference(dbClient_default)({
|
|
@@ -5535,7 +5545,8 @@ var Agent = class {
|
|
|
5535
5545
|
conversationId: this.conversationId || void 0
|
|
5536
5546
|
},
|
|
5537
5547
|
this.convertToMCPToolConfig(tool4),
|
|
5538
|
-
storeReference
|
|
5548
|
+
storeReference,
|
|
5549
|
+
selectedTools
|
|
5539
5550
|
);
|
|
5540
5551
|
} else if (tool4.headers && this.credentialStuffer) {
|
|
5541
5552
|
serverConfig = await this.credentialStuffer.buildMcpServerConfig(
|
|
@@ -5545,13 +5556,16 @@ var Agent = class {
|
|
|
5545
5556
|
contextConfigId: this.config.contextConfigId || void 0,
|
|
5546
5557
|
conversationId: this.conversationId || void 0
|
|
5547
5558
|
},
|
|
5548
|
-
this.convertToMCPToolConfig(tool4)
|
|
5559
|
+
this.convertToMCPToolConfig(tool4),
|
|
5560
|
+
void 0,
|
|
5561
|
+
selectedTools
|
|
5549
5562
|
);
|
|
5550
5563
|
} else {
|
|
5551
5564
|
serverConfig = {
|
|
5552
5565
|
type: tool4.config.mcp.transport?.type || agentsCore.MCPTransportType.streamableHttp,
|
|
5553
5566
|
url: tool4.config.mcp.server.url,
|
|
5554
|
-
activeTools: tool4.config.mcp.activeTools
|
|
5567
|
+
activeTools: tool4.config.mcp.activeTools,
|
|
5568
|
+
selectedTools
|
|
5555
5569
|
};
|
|
5556
5570
|
}
|
|
5557
5571
|
logger16.info(
|
package/dist/index.js
CHANGED
|
@@ -29,23 +29,28 @@ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/
|
|
|
29
29
|
import { z as z$2 } from 'zod/v3';
|
|
30
30
|
import { toReqRes, toFetchResponse } from 'fetch-to-node';
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var isDevelopment = env.ENVIRONMENT === "development";
|
|
33
|
+
var loggerConfig = {
|
|
33
34
|
level: env.LOG_LEVEL,
|
|
34
35
|
serializers: {
|
|
35
36
|
obj: (value) => ({ ...value })
|
|
36
37
|
},
|
|
37
38
|
redact: ["req.headers.authorization", 'req.headers["x-inkeep-admin-authentication"]'],
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
// Only use pino-pretty in development
|
|
40
|
+
...isDevelopment && {
|
|
41
|
+
transport: {
|
|
42
|
+
target: "pino-pretty",
|
|
43
|
+
options: {
|
|
44
|
+
sync: true,
|
|
45
|
+
destination: 1,
|
|
46
|
+
// stdout
|
|
47
|
+
colorize: true,
|
|
48
|
+
translateTime: "SYS:standard"
|
|
49
|
+
}
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
|
-
}
|
|
52
|
+
};
|
|
53
|
+
var logger = pino(loggerConfig);
|
|
49
54
|
var asyncLocalStorage = new AsyncLocalStorage();
|
|
50
55
|
function getLogger(name) {
|
|
51
56
|
const store = asyncLocalStorage.getStore();
|
|
@@ -5105,6 +5110,11 @@ var Agent = class {
|
|
|
5105
5110
|
}
|
|
5106
5111
|
async getMcpTool(tool4) {
|
|
5107
5112
|
const credentialReferenceId = tool4.credentialReferenceId;
|
|
5113
|
+
const toolsForAgent = await getToolsForAgent(dbClient_default)({
|
|
5114
|
+
scopes: { tenantId: this.config.tenantId, projectId: this.config.projectId },
|
|
5115
|
+
agentId: this.config.id
|
|
5116
|
+
});
|
|
5117
|
+
const selectedTools = toolsForAgent.data.find((t) => t.toolId === tool4.id)?.selectedTools || void 0;
|
|
5108
5118
|
let serverConfig;
|
|
5109
5119
|
if (credentialReferenceId && this.credentialStuffer) {
|
|
5110
5120
|
const credentialReference = await getCredentialReference(dbClient_default)({
|
|
@@ -5129,7 +5139,8 @@ var Agent = class {
|
|
|
5129
5139
|
conversationId: this.conversationId || void 0
|
|
5130
5140
|
},
|
|
5131
5141
|
this.convertToMCPToolConfig(tool4),
|
|
5132
|
-
storeReference
|
|
5142
|
+
storeReference,
|
|
5143
|
+
selectedTools
|
|
5133
5144
|
);
|
|
5134
5145
|
} else if (tool4.headers && this.credentialStuffer) {
|
|
5135
5146
|
serverConfig = await this.credentialStuffer.buildMcpServerConfig(
|
|
@@ -5139,13 +5150,16 @@ var Agent = class {
|
|
|
5139
5150
|
contextConfigId: this.config.contextConfigId || void 0,
|
|
5140
5151
|
conversationId: this.conversationId || void 0
|
|
5141
5152
|
},
|
|
5142
|
-
this.convertToMCPToolConfig(tool4)
|
|
5153
|
+
this.convertToMCPToolConfig(tool4),
|
|
5154
|
+
void 0,
|
|
5155
|
+
selectedTools
|
|
5143
5156
|
);
|
|
5144
5157
|
} else {
|
|
5145
5158
|
serverConfig = {
|
|
5146
5159
|
type: tool4.config.mcp.transport?.type || MCPTransportType.streamableHttp,
|
|
5147
5160
|
url: tool4.config.mcp.server.url,
|
|
5148
|
-
activeTools: tool4.config.mcp.activeTools
|
|
5161
|
+
activeTools: tool4.config.mcp.activeTools,
|
|
5162
|
+
selectedTools
|
|
5149
5163
|
};
|
|
5150
5164
|
}
|
|
5151
5165
|
logger16.info(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250911195722",
|
|
4
4
|
"description": "Execution API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,11 +41,10 @@
|
|
|
41
41
|
"jmespath": "^0.16.0",
|
|
42
42
|
"nanoid": "^5.1.5",
|
|
43
43
|
"pino": "^9.7.0",
|
|
44
|
-
"pino-pretty": "^13.0.0",
|
|
45
44
|
"traverse": "^0.6.11",
|
|
46
45
|
"ts-pattern": "^5.7.1",
|
|
47
46
|
"zod": "^4.1.5",
|
|
48
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
47
|
+
"@inkeep/agents-core": "^0.0.0-dev-20250911195722"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"@hono/vite-dev-server": "^0.20.1",
|
|
@@ -55,6 +54,7 @@
|
|
|
55
54
|
"@types/traverse": "^0.6.37",
|
|
56
55
|
"@vitest/coverage-v8": "^2.0.0",
|
|
57
56
|
"nodemon": "^3.1.0",
|
|
57
|
+
"pino-pretty": "^13.1.1",
|
|
58
58
|
"tsx": "^4.7.1",
|
|
59
59
|
"typescript": "^5.3.3",
|
|
60
60
|
"vite": "^7.1.4",
|