@inkeep/agents-api 0.0.0-dev-20260327195114 → 0.0.0-dev-20260328075633
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/.well-known/workflow/v1/manifest.json +123 -123
- package/dist/createApp.d.ts +2 -2
- package/dist/data/db/manageDbClient.d.ts +2 -2
- package/dist/data-reconciliation/handlers/agent.d.ts +2 -2
- package/dist/data-reconciliation/handlers/context-configs.d.ts +2 -2
- package/dist/data-reconciliation/handlers/sub-agents.d.ts +2 -2
- package/dist/data-reconciliation/handlers/tools.d.ts +2 -2
- package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
- package/dist/domains/evals/routes/index.d.ts +2 -2
- package/dist/domains/evals/workflow/routes.d.ts +2 -2
- package/dist/domains/manage/routes/authLookup.d.ts +2 -2
- package/dist/domains/manage/routes/conversations.d.ts +2 -2
- package/dist/domains/manage/routes/index.d.ts +2 -2
- package/dist/domains/manage/routes/invitations.d.ts +2 -2
- package/dist/domains/manage/routes/passwordResetLinks.d.ts +2 -2
- package/dist/domains/manage/routes/signoz.d.ts +2 -2
- package/dist/domains/manage/routes/users.d.ts +2 -2
- package/dist/domains/mcp/routes/mcp.d.ts +2 -2
- package/dist/domains/run/tools/distill-conversation-history-tool.d.ts +1 -1
- package/dist/domains/run/types/chat.d.ts +16 -16
- package/dist/domains/run/workflow/steps/scheduledTriggerSteps.d.ts +6 -6
- package/dist/env.d.ts +2 -2
- package/dist/factory.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/middleware/projectConfig.d.ts +3 -3
- package/dist/middleware/requirePermission.d.ts +2 -2
- package/dist/middleware/runAuth.d.ts +4 -4
- package/dist/middleware/sessionAuth.d.ts +3 -3
- package/dist/middleware/tenantAccess.d.ts +2 -2
- package/dist/middleware/tracing.d.ts +3 -3
- package/dist/startup/playground-app.d.ts +2 -2
- package/dist/startup/playground-app.js +94 -41
- package/package.json +5 -5
|
@@ -1,34 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"steps": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"stepId": "
|
|
7
|
-
},
|
|
8
|
-
"__builtin_response_json": {
|
|
9
|
-
"stepId": "__builtin_response_json"
|
|
10
|
-
},
|
|
11
|
-
"__builtin_response_text": {
|
|
12
|
-
"stepId": "__builtin_response_text"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"src/domains/evals/workflow/functions/evaluateConversation.ts": {
|
|
16
|
-
"executeEvaluatorStep": {
|
|
17
|
-
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//executeEvaluatorStep"
|
|
18
|
-
},
|
|
19
|
-
"getConversationStep": {
|
|
20
|
-
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//getConversationStep"
|
|
21
|
-
},
|
|
22
|
-
"getEvaluatorsStep": {
|
|
23
|
-
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//getEvaluatorsStep"
|
|
24
|
-
},
|
|
25
|
-
"logStep": {
|
|
26
|
-
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//logStep"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"node_modules/.pnpm/workflow@4.2.0-beta.67_@nestjs+common@11.1.13_reflect-metadata@0.2.2_rxjs@7.8.2__@nestj_59326db5a7501857789e302437f4195e/node_modules/workflow/dist/stdlib.js": {
|
|
30
|
-
"fetch": {
|
|
31
|
-
"stepId": "step//workflow@4.2.0-beta.67//fetch"
|
|
4
|
+
"src/domains/run/workflow/functions/scheduledTriggerRunner.ts": {
|
|
5
|
+
"startNextIterationStep": {
|
|
6
|
+
"stepId": "step//./src/domains/run/workflow/functions/scheduledTriggerRunner//startNextIterationStep"
|
|
32
7
|
}
|
|
33
8
|
},
|
|
34
9
|
"src/domains/evals/workflow/functions/runDatasetItem.ts": {
|
|
@@ -45,37 +20,6 @@
|
|
|
45
20
|
"stepId": "step//./src/domains/evals/workflow/functions/runDatasetItem//logStep"
|
|
46
21
|
}
|
|
47
22
|
},
|
|
48
|
-
"src/domains/run/workflow/functions/scheduledTriggerRunner.ts": {
|
|
49
|
-
"startNextIterationStep": {
|
|
50
|
-
"stepId": "step//./src/domains/run/workflow/functions/scheduledTriggerRunner//startNextIterationStep"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"src/domains/run/workflow/steps/agentExecutionSteps.ts": {
|
|
54
|
-
"callLlmStep": {
|
|
55
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//callLlmStep"
|
|
56
|
-
},
|
|
57
|
-
"executeToolStep": {
|
|
58
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//executeToolStep"
|
|
59
|
-
},
|
|
60
|
-
"initializeTaskStep": {
|
|
61
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//initializeTaskStep"
|
|
62
|
-
},
|
|
63
|
-
"markWorkflowCompleteStep": {
|
|
64
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowCompleteStep"
|
|
65
|
-
},
|
|
66
|
-
"markWorkflowFailedStep": {
|
|
67
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowFailedStep"
|
|
68
|
-
},
|
|
69
|
-
"markWorkflowResumingStep": {
|
|
70
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowResumingStep"
|
|
71
|
-
},
|
|
72
|
-
"markWorkflowRunningStep": {
|
|
73
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowRunningStep"
|
|
74
|
-
},
|
|
75
|
-
"markWorkflowSuspendedStep": {
|
|
76
|
-
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowSuspendedStep"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
23
|
"src/domains/run/workflow/steps/scheduledTriggerSteps.ts": {
|
|
80
24
|
"addConversationIdStep": {
|
|
81
25
|
"stepId": "step//./src/domains/run/workflow/steps/scheduledTriggerSteps//addConversationIdStep"
|
|
@@ -122,75 +66,65 @@
|
|
|
122
66
|
"resetInvocationToPendingStep": {
|
|
123
67
|
"stepId": "step//./src/domains/run/workflow/steps/scheduledTriggerSteps//resetInvocationToPendingStep"
|
|
124
68
|
}
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"workflows": {
|
|
69
|
+
},
|
|
128
70
|
"src/domains/evals/workflow/functions/evaluateConversation.ts": {
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"id": "end",
|
|
143
|
-
"type": "workflowEnd",
|
|
144
|
-
"data": {
|
|
145
|
-
"label": "Return",
|
|
146
|
-
"nodeKind": "workflow_end"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
"edges": [
|
|
151
|
-
{
|
|
152
|
-
"id": "e_start_end",
|
|
153
|
-
"source": "start",
|
|
154
|
-
"target": "end",
|
|
155
|
-
"type": "default"
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
}
|
|
71
|
+
"executeEvaluatorStep": {
|
|
72
|
+
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//executeEvaluatorStep"
|
|
73
|
+
},
|
|
74
|
+
"getConversationStep": {
|
|
75
|
+
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//getConversationStep"
|
|
76
|
+
},
|
|
77
|
+
"getEvaluatorsStep": {
|
|
78
|
+
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//getEvaluatorsStep"
|
|
79
|
+
},
|
|
80
|
+
"logStep": {
|
|
81
|
+
"stepId": "step//./src/domains/evals/workflow/functions/evaluateConversation//logStep"
|
|
159
82
|
}
|
|
160
83
|
},
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"graph": {
|
|
165
|
-
"nodes": [
|
|
166
|
-
{
|
|
167
|
-
"id": "start",
|
|
168
|
-
"type": "workflowStart",
|
|
169
|
-
"data": {
|
|
170
|
-
"label": "Start: _runDatasetItemWorkflow",
|
|
171
|
-
"nodeKind": "workflow_start"
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"id": "end",
|
|
176
|
-
"type": "workflowEnd",
|
|
177
|
-
"data": {
|
|
178
|
-
"label": "Return",
|
|
179
|
-
"nodeKind": "workflow_end"
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
],
|
|
183
|
-
"edges": [
|
|
184
|
-
{
|
|
185
|
-
"id": "e_start_end",
|
|
186
|
-
"source": "start",
|
|
187
|
-
"target": "end",
|
|
188
|
-
"type": "default"
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
}
|
|
84
|
+
"node_modules/.pnpm/workflow@4.2.0-beta.67_@nestjs+common@11.1.13_reflect-metadata@0.2.2_rxjs@7.8.2__@nestj_59326db5a7501857789e302437f4195e/node_modules/workflow/dist/stdlib.js": {
|
|
85
|
+
"fetch": {
|
|
86
|
+
"stepId": "step//workflow@4.2.0-beta.67//fetch"
|
|
192
87
|
}
|
|
193
88
|
},
|
|
89
|
+
"node_modules/.pnpm/workflow@4.2.0-beta.67_@nestjs+common@11.1.13_reflect-metadata@0.2.2_rxjs@7.8.2__@nestj_59326db5a7501857789e302437f4195e/node_modules/workflow/dist/internal/builtins.js": {
|
|
90
|
+
"__builtin_response_array_buffer": {
|
|
91
|
+
"stepId": "__builtin_response_array_buffer"
|
|
92
|
+
},
|
|
93
|
+
"__builtin_response_json": {
|
|
94
|
+
"stepId": "__builtin_response_json"
|
|
95
|
+
},
|
|
96
|
+
"__builtin_response_text": {
|
|
97
|
+
"stepId": "__builtin_response_text"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"src/domains/run/workflow/steps/agentExecutionSteps.ts": {
|
|
101
|
+
"callLlmStep": {
|
|
102
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//callLlmStep"
|
|
103
|
+
},
|
|
104
|
+
"executeToolStep": {
|
|
105
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//executeToolStep"
|
|
106
|
+
},
|
|
107
|
+
"initializeTaskStep": {
|
|
108
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//initializeTaskStep"
|
|
109
|
+
},
|
|
110
|
+
"markWorkflowCompleteStep": {
|
|
111
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowCompleteStep"
|
|
112
|
+
},
|
|
113
|
+
"markWorkflowFailedStep": {
|
|
114
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowFailedStep"
|
|
115
|
+
},
|
|
116
|
+
"markWorkflowResumingStep": {
|
|
117
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowResumingStep"
|
|
118
|
+
},
|
|
119
|
+
"markWorkflowRunningStep": {
|
|
120
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowRunningStep"
|
|
121
|
+
},
|
|
122
|
+
"markWorkflowSuspendedStep": {
|
|
123
|
+
"stepId": "step//./src/domains/run/workflow/steps/agentExecutionSteps//markWorkflowSuspendedStep"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"workflows": {
|
|
194
128
|
"src/domains/run/workflow/functions/scheduledTriggerRunner.ts": {
|
|
195
129
|
"_scheduledTriggerRunnerWorkflow": {
|
|
196
130
|
"workflowId": "workflow//./src/domains/run/workflow/functions/scheduledTriggerRunner//_scheduledTriggerRunnerWorkflow",
|
|
@@ -281,6 +215,72 @@
|
|
|
281
215
|
}
|
|
282
216
|
}
|
|
283
217
|
},
|
|
218
|
+
"src/domains/evals/workflow/functions/runDatasetItem.ts": {
|
|
219
|
+
"_runDatasetItemWorkflow": {
|
|
220
|
+
"workflowId": "workflow//./src/domains/evals/workflow/functions/runDatasetItem//_runDatasetItemWorkflow",
|
|
221
|
+
"graph": {
|
|
222
|
+
"nodes": [
|
|
223
|
+
{
|
|
224
|
+
"id": "start",
|
|
225
|
+
"type": "workflowStart",
|
|
226
|
+
"data": {
|
|
227
|
+
"label": "Start: _runDatasetItemWorkflow",
|
|
228
|
+
"nodeKind": "workflow_start"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "end",
|
|
233
|
+
"type": "workflowEnd",
|
|
234
|
+
"data": {
|
|
235
|
+
"label": "Return",
|
|
236
|
+
"nodeKind": "workflow_end"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"edges": [
|
|
241
|
+
{
|
|
242
|
+
"id": "e_start_end",
|
|
243
|
+
"source": "start",
|
|
244
|
+
"target": "end",
|
|
245
|
+
"type": "default"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"src/domains/evals/workflow/functions/evaluateConversation.ts": {
|
|
252
|
+
"_evaluateConversationWorkflow": {
|
|
253
|
+
"workflowId": "workflow//./src/domains/evals/workflow/functions/evaluateConversation//_evaluateConversationWorkflow",
|
|
254
|
+
"graph": {
|
|
255
|
+
"nodes": [
|
|
256
|
+
{
|
|
257
|
+
"id": "start",
|
|
258
|
+
"type": "workflowStart",
|
|
259
|
+
"data": {
|
|
260
|
+
"label": "Start: _evaluateConversationWorkflow",
|
|
261
|
+
"nodeKind": "workflow_start"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "end",
|
|
266
|
+
"type": "workflowEnd",
|
|
267
|
+
"data": {
|
|
268
|
+
"label": "Return",
|
|
269
|
+
"nodeKind": "workflow_end"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"edges": [
|
|
274
|
+
{
|
|
275
|
+
"id": "e_start_end",
|
|
276
|
+
"source": "start",
|
|
277
|
+
"target": "end",
|
|
278
|
+
"type": "default"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
284
|
"src/domains/run/workflow/functions/agentExecution.ts": {
|
|
285
285
|
"_agentExecutionWorkflow": {
|
|
286
286
|
"workflowId": "workflow//./src/domains/run/workflow/functions/agentExecution//_agentExecutionWorkflow",
|
package/dist/createApp.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AppConfig } from "./types/app.js";
|
|
2
2
|
import "./types/index.js";
|
|
3
3
|
import { Hono } from "hono";
|
|
4
|
-
import * as
|
|
4
|
+
import * as hono_types5 from "hono/types";
|
|
5
5
|
|
|
6
6
|
//#region src/createApp.d.ts
|
|
7
7
|
declare const isWebhookRoute: (path: string) => boolean;
|
|
8
|
-
declare function createAgentsHono(config: AppConfig): Hono<
|
|
8
|
+
declare function createAgentsHono(config: AppConfig): Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { createAgentsHono, isWebhookRoute };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core5 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data/db/manageDbClient.d.ts
|
|
4
|
-
declare const manageDbClient:
|
|
4
|
+
declare const manageDbClient: _inkeep_agents_core5.AgentsManageDatabaseClient;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { manageDbClient as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core4 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data-reconciliation/handlers/agent.d.ts
|
|
4
|
-
declare const agentHandlers:
|
|
4
|
+
declare const agentHandlers: _inkeep_agents_core4.EntityEffectHandlers<"agent">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { agentHandlers };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core0 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data-reconciliation/handlers/context-configs.d.ts
|
|
4
|
-
declare const contextConfigsHandlers:
|
|
4
|
+
declare const contextConfigsHandlers: _inkeep_agents_core0.EntityEffectHandlers<"context_configs">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { contextConfigsHandlers };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core2 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data-reconciliation/handlers/sub-agents.d.ts
|
|
4
|
-
declare const subAgentsHandlers:
|
|
4
|
+
declare const subAgentsHandlers: _inkeep_agents_core2.EntityEffectHandlers<"sub_agents">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { subAgentsHandlers };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core3 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data-reconciliation/handlers/tools.d.ts
|
|
4
|
-
declare const toolsHandlers:
|
|
4
|
+
declare const toolsHandlers: _inkeep_agents_core3.EntityEffectHandlers<"tools">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { toolsHandlers };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono8 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/datasetTriggers.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono8.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono10 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono10.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types12 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/workflow/routes.d.ts
|
|
5
|
-
declare const workflowRoutes: Hono<
|
|
5
|
+
declare const workflowRoutes: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { workflowRoutes };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../../../types/app.js";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono_types1 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/authLookup.d.ts
|
|
6
6
|
declare const authLookupRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types1.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { authLookupRoutes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono17 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/conversations.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono17.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono9 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono9.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../../../types/app.js";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono_types0 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/invitations.d.ts
|
|
6
6
|
declare const invitationsRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types0.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { invitationsRoutes as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../../../types/app.js";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono_types0 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/passwordResetLinks.d.ts
|
|
6
6
|
declare const passwordResetLinksRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types0.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { passwordResetLinksRoutes as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../../../types/app.js";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono_types2 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/signoz.d.ts
|
|
6
6
|
declare const app: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types2.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { app as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../../../types/app.js";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono_types9 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/users.d.ts
|
|
6
6
|
declare const usersRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types9.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { usersRoutes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types7 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/mcp/routes/mcp.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -29,9 +29,9 @@ declare const ConversationHistorySummarySchema: z.ZodObject<{
|
|
|
29
29
|
tool_call_id: z.ZodString;
|
|
30
30
|
content_summary: z.ZodString;
|
|
31
31
|
relevance: z.ZodEnum<{
|
|
32
|
+
low: "low";
|
|
32
33
|
high: "high";
|
|
33
34
|
medium: "medium";
|
|
34
|
-
low: "low";
|
|
35
35
|
}>;
|
|
36
36
|
}, z.core.$strip>>>;
|
|
37
37
|
conversation_flow: z.ZodObject<{
|
|
@@ -7,9 +7,9 @@ declare const InlineDocumentDataSchema: z.ZodUnion<readonly [z.ZodUnion<readonly
|
|
|
7
7
|
/** OpenAI-specific image detail level. Has no effect on other providers. */
|
|
8
8
|
declare const ImageDetailEnum: readonly ["auto", "low", "high"];
|
|
9
9
|
declare const ImageDetailSchema: z.ZodEnum<{
|
|
10
|
-
high: "high";
|
|
11
|
-
low: "low";
|
|
12
10
|
auto: "auto";
|
|
11
|
+
low: "low";
|
|
12
|
+
high: "high";
|
|
13
13
|
}>;
|
|
14
14
|
type ImageDetail = z.infer<typeof ImageDetailSchema>;
|
|
15
15
|
declare const ImageContentItemSchema: z.ZodObject<{
|
|
@@ -17,9 +17,9 @@ declare const ImageContentItemSchema: z.ZodObject<{
|
|
|
17
17
|
image_url: z.ZodObject<{
|
|
18
18
|
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
19
19
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
20
|
-
high: "high";
|
|
21
|
-
low: "low";
|
|
22
20
|
auto: "auto";
|
|
21
|
+
low: "low";
|
|
22
|
+
high: "high";
|
|
23
23
|
}>>;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
}, z.core.$strip>;
|
|
@@ -102,10 +102,10 @@ declare const VercelMessagePartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
102
102
|
declare const VercelMessageSchema: z.ZodObject<{
|
|
103
103
|
role: z.ZodEnum<{
|
|
104
104
|
function: "function";
|
|
105
|
-
system: "system";
|
|
106
105
|
user: "user";
|
|
107
|
-
assistant: "assistant";
|
|
108
106
|
tool: "tool";
|
|
107
|
+
system: "system";
|
|
108
|
+
assistant: "assistant";
|
|
109
109
|
}>;
|
|
110
110
|
content: z.ZodAny;
|
|
111
111
|
parts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -160,9 +160,9 @@ declare const ContentItemSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
160
160
|
image_url: z.ZodObject<{
|
|
161
161
|
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
162
162
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
163
|
-
high: "high";
|
|
164
|
-
low: "low";
|
|
165
163
|
auto: "auto";
|
|
164
|
+
low: "low";
|
|
165
|
+
high: "high";
|
|
166
166
|
}>>;
|
|
167
167
|
}, z.core.$strip>;
|
|
168
168
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -177,10 +177,10 @@ type ContentItem = z.infer<typeof ContentItemSchema>;
|
|
|
177
177
|
declare const MessageSchema: z.ZodObject<{
|
|
178
178
|
role: z.ZodEnum<{
|
|
179
179
|
function: "function";
|
|
180
|
-
system: "system";
|
|
181
180
|
user: "user";
|
|
182
|
-
assistant: "assistant";
|
|
183
181
|
tool: "tool";
|
|
182
|
+
system: "system";
|
|
183
|
+
assistant: "assistant";
|
|
184
184
|
}>;
|
|
185
185
|
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
186
186
|
type: z.ZodLiteral<"text">;
|
|
@@ -190,9 +190,9 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
190
190
|
image_url: z.ZodObject<{
|
|
191
191
|
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
192
192
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
193
|
-
high: "high";
|
|
194
|
-
low: "low";
|
|
195
193
|
auto: "auto";
|
|
194
|
+
low: "low";
|
|
195
|
+
high: "high";
|
|
196
196
|
}>>;
|
|
197
197
|
}, z.core.$strip>;
|
|
198
198
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -210,10 +210,10 @@ declare const ChatCompletionRequestSchema: z.ZodObject<{
|
|
|
210
210
|
messages: z.ZodArray<z.ZodObject<{
|
|
211
211
|
role: z.ZodEnum<{
|
|
212
212
|
function: "function";
|
|
213
|
-
system: "system";
|
|
214
213
|
user: "user";
|
|
215
|
-
assistant: "assistant";
|
|
216
214
|
tool: "tool";
|
|
215
|
+
system: "system";
|
|
216
|
+
assistant: "assistant";
|
|
217
217
|
}>;
|
|
218
218
|
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
219
219
|
type: z.ZodLiteral<"text">;
|
|
@@ -223,9 +223,9 @@ declare const ChatCompletionRequestSchema: z.ZodObject<{
|
|
|
223
223
|
image_url: z.ZodObject<{
|
|
224
224
|
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
225
225
|
detail: z.ZodOptional<z.ZodEnum<{
|
|
226
|
-
high: "high";
|
|
227
|
-
low: "low";
|
|
228
226
|
auto: "auto";
|
|
227
|
+
low: "low";
|
|
228
|
+
high: "high";
|
|
229
229
|
}>>;
|
|
230
230
|
}, z.core.$strip>;
|
|
231
231
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -108,7 +108,7 @@ declare function createInvocationIdempotentStep(params: {
|
|
|
108
108
|
projectId: string;
|
|
109
109
|
tenantId: string;
|
|
110
110
|
id: string;
|
|
111
|
-
status: "
|
|
111
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
112
112
|
ref?: {
|
|
113
113
|
type: "commit" | "tag" | "branch";
|
|
114
114
|
name: string;
|
|
@@ -153,7 +153,7 @@ declare function markRunningStep(params: {
|
|
|
153
153
|
projectId: string;
|
|
154
154
|
tenantId: string;
|
|
155
155
|
id: string;
|
|
156
|
-
status: "
|
|
156
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
157
157
|
ref?: {
|
|
158
158
|
type: "commit" | "tag" | "branch";
|
|
159
159
|
name: string;
|
|
@@ -185,7 +185,7 @@ declare function addConversationIdStep(params: {
|
|
|
185
185
|
projectId: string;
|
|
186
186
|
tenantId: string;
|
|
187
187
|
id: string;
|
|
188
|
-
status: "
|
|
188
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
189
189
|
ref?: {
|
|
190
190
|
type: "commit" | "tag" | "branch";
|
|
191
191
|
name: string;
|
|
@@ -215,7 +215,7 @@ declare function markCompletedStep(params: {
|
|
|
215
215
|
projectId: string;
|
|
216
216
|
tenantId: string;
|
|
217
217
|
id: string;
|
|
218
|
-
status: "
|
|
218
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
219
219
|
ref?: {
|
|
220
220
|
type: "commit" | "tag" | "branch";
|
|
221
221
|
name: string;
|
|
@@ -245,7 +245,7 @@ declare function markFailedStep(params: {
|
|
|
245
245
|
projectId: string;
|
|
246
246
|
tenantId: string;
|
|
247
247
|
id: string;
|
|
248
|
-
status: "
|
|
248
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
249
249
|
ref?: {
|
|
250
250
|
type: "commit" | "tag" | "branch";
|
|
251
251
|
name: string;
|
|
@@ -288,7 +288,7 @@ declare function resetInvocationToPendingStep(params: {
|
|
|
288
288
|
projectId: string;
|
|
289
289
|
tenantId: string;
|
|
290
290
|
id: string;
|
|
291
|
-
status: "
|
|
291
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
292
292
|
ref?: {
|
|
293
293
|
type: "commit" | "tag" | "branch";
|
|
294
294
|
name: string;
|
package/dist/env.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ declare const envSchema: z.ZodObject<{
|
|
|
14
14
|
pentest: "pentest";
|
|
15
15
|
}>>;
|
|
16
16
|
LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
error: "error";
|
|
17
18
|
trace: "trace";
|
|
18
19
|
debug: "debug";
|
|
19
20
|
info: "info";
|
|
20
21
|
warn: "warn";
|
|
21
|
-
error: "error";
|
|
22
22
|
}>>;
|
|
23
23
|
INKEEP_AGENTS_MANAGE_DATABASE_URL: z.ZodString;
|
|
24
24
|
INKEEP_AGENTS_RUN_DATABASE_URL: z.ZodString;
|
|
@@ -79,7 +79,7 @@ declare const envSchema: z.ZodObject<{
|
|
|
79
79
|
declare const env: {
|
|
80
80
|
NODE_ENV: "development" | "production" | "test";
|
|
81
81
|
ENVIRONMENT: "development" | "production" | "test" | "pentest";
|
|
82
|
-
LOG_LEVEL: "
|
|
82
|
+
LOG_LEVEL: "error" | "trace" | "debug" | "info" | "warn";
|
|
83
83
|
INKEEP_AGENTS_MANAGE_DATABASE_URL: string;
|
|
84
84
|
INKEEP_AGENTS_RUN_DATABASE_URL: string;
|
|
85
85
|
INKEEP_AGENTS_API_URL: string;
|
package/dist/factory.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { CredentialStore, ServerConfig } from "@inkeep/agents-core";
|
|
|
5
5
|
import * as hono19 from "hono";
|
|
6
6
|
import * as zod32 from "zod";
|
|
7
7
|
import { EmailServiceConfig, SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
|
|
8
|
-
import * as
|
|
8
|
+
import * as hono_types10 from "hono/types";
|
|
9
9
|
import * as better_auth43 from "better-auth";
|
|
10
10
|
import * as better_auth_plugins4 from "better-auth/plugins";
|
|
11
11
|
|
|
@@ -479,6 +479,6 @@ declare function createAgentsApp(config?: {
|
|
|
479
479
|
auth?: UserAuthConfig;
|
|
480
480
|
sandboxConfig?: SandboxConfig;
|
|
481
481
|
emailService?: EmailServiceConfig;
|
|
482
|
-
}): hono19.Hono<
|
|
482
|
+
}): hono19.Hono<hono_types10.BlankEnv, hono_types10.BlankSchema, "/">;
|
|
483
483
|
//#endregion
|
|
484
484
|
export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { SSOProviderConfig, UserAuthConfig, createAgentsApp } from "./factory.js
|
|
|
6
6
|
import "./sentry.js";
|
|
7
7
|
import { Hono } from "hono";
|
|
8
8
|
import * as zod0 from "zod";
|
|
9
|
-
import * as
|
|
9
|
+
import * as hono_types3 from "hono/types";
|
|
10
10
|
import * as better_auth0 from "better-auth";
|
|
11
11
|
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
12
12
|
|
|
@@ -474,6 +474,6 @@ declare const auth: better_auth0.Auth<{
|
|
|
474
474
|
}>;
|
|
475
475
|
}];
|
|
476
476
|
}>;
|
|
477
|
-
declare const app: Hono<
|
|
477
|
+
declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
|
|
478
478
|
//#endregion
|
|
479
479
|
export { type AppConfig, type AppVariables, Hono, type NativeSandboxConfig, type SSOProviderConfig, type SandboxConfig, type UserAuthConfig, type VercelSandboxConfig, auth, createAgentsApp, createAgentsHono, app as default };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import "./sentry.js";
|
|
|
5
5
|
import { startOpenTelemetrySDK } from "./instrumentation.js";
|
|
6
6
|
import { createAgentsHono } from "./createApp.js";
|
|
7
7
|
import { createAgentsApp, createAgentsAuth } from "./factory.js";
|
|
8
|
-
import {
|
|
8
|
+
import { ensurePlaygroundAppConfig } from "./startup/playground-app.js";
|
|
9
9
|
import { CredentialStoreRegistry, createDefaultCredentialStores } from "@inkeep/agents-core";
|
|
10
10
|
import { Hono } from "hono";
|
|
11
11
|
import { createEmailService } from "@inkeep/agents-email";
|
|
@@ -51,9 +51,9 @@ const app = createAgentsHono({
|
|
|
51
51
|
});
|
|
52
52
|
setTimeout(async () => {
|
|
53
53
|
try {
|
|
54
|
-
await
|
|
54
|
+
await ensurePlaygroundAppConfig();
|
|
55
55
|
} catch (err) {
|
|
56
|
-
logger.error({ error: err }, "Failed to
|
|
56
|
+
logger.error({ error: err }, "Failed to configure playground app");
|
|
57
57
|
}
|
|
58
58
|
}, 3e3);
|
|
59
59
|
const workflowWorld = process.env.WORKFLOW_TARGET_WORLD || "local";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaseExecutionContext, ResolvedRef } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono3 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/projectConfig.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Middleware that fetches the full project definition from the Management API
|
|
7
7
|
*/
|
|
8
|
-
declare const projectConfigMiddleware:
|
|
8
|
+
declare const projectConfigMiddleware: hono3.MiddlewareHandler<{
|
|
9
9
|
Variables: {
|
|
10
10
|
executionContext: BaseExecutionContext;
|
|
11
11
|
resolvedRef: ResolvedRef;
|
|
@@ -15,7 +15,7 @@ declare const projectConfigMiddleware: hono7.MiddlewareHandler<{
|
|
|
15
15
|
* Creates a middleware that applies project config fetching except for specified route patterns
|
|
16
16
|
* @param skipRouteCheck - Function that returns true if the route should skip the middleware
|
|
17
17
|
*/
|
|
18
|
-
declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) =>
|
|
18
|
+
declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) => hono3.MiddlewareHandler<{
|
|
19
19
|
Variables: {
|
|
20
20
|
executionContext: BaseExecutionContext;
|
|
21
21
|
resolvedRef: ResolvedRef;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../types/app.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono2 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/requirePermission.d.ts
|
|
5
5
|
type Permission = {
|
|
@@ -9,6 +9,6 @@ declare const requirePermission: <Env$1 extends {
|
|
|
9
9
|
Variables: ManageAppVariables;
|
|
10
10
|
} = {
|
|
11
11
|
Variables: ManageAppVariables;
|
|
12
|
-
}>(permissions: Permission) =>
|
|
12
|
+
}>(permissions: Permission) => hono2.MiddlewareHandler<Env$1, string, {}, Response>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { requirePermission };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseExecutionContext } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono5 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/runAuth.d.ts
|
|
5
|
-
declare const runApiKeyAuth: () =>
|
|
5
|
+
declare const runApiKeyAuth: () => hono5.MiddlewareHandler<{
|
|
6
6
|
Variables: {
|
|
7
7
|
executionContext: BaseExecutionContext;
|
|
8
8
|
};
|
|
@@ -11,7 +11,7 @@ declare const runApiKeyAuth: () => hono14.MiddlewareHandler<{
|
|
|
11
11
|
* Creates a middleware that applies API key authentication except for specified route patterns
|
|
12
12
|
* @param skipRouteCheck - Function that returns true if the route should skip authentication
|
|
13
13
|
*/
|
|
14
|
-
declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) =>
|
|
14
|
+
declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono5.MiddlewareHandler<{
|
|
15
15
|
Variables: {
|
|
16
16
|
executionContext: BaseExecutionContext;
|
|
17
17
|
};
|
|
@@ -20,7 +20,7 @@ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) =
|
|
|
20
20
|
* Helper middleware for endpoints that optionally support API key authentication
|
|
21
21
|
* If no auth header is present, it continues without setting the executionContext
|
|
22
22
|
*/
|
|
23
|
-
declare const runOptionalAuth: () =>
|
|
23
|
+
declare const runOptionalAuth: () => hono5.MiddlewareHandler<{
|
|
24
24
|
Variables: {
|
|
25
25
|
executionContext?: BaseExecutionContext;
|
|
26
26
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppVariables } from "../types/app.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono15 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/sessionAuth.d.ts
|
|
5
5
|
|
|
@@ -8,12 +8,12 @@ import * as hono2 from "hono";
|
|
|
8
8
|
* Requires that a user has already been authenticated via Better Auth session.
|
|
9
9
|
* Used primarily for manage routes that require an active user session.
|
|
10
10
|
*/
|
|
11
|
-
declare const sessionAuth: () =>
|
|
11
|
+
declare const sessionAuth: () => hono15.MiddlewareHandler<any, string, {}, Response>;
|
|
12
12
|
/**
|
|
13
13
|
* Global session middleware - sets user and session in context for all routes
|
|
14
14
|
* Used for all routes that require an active user session.
|
|
15
15
|
*/
|
|
16
|
-
declare const sessionContext: () =>
|
|
16
|
+
declare const sessionContext: () => hono15.MiddlewareHandler<{
|
|
17
17
|
Variables: AppVariables;
|
|
18
18
|
}, string, {}, Response>;
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono12 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/middleware/tenantAccess.d.ts
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ import * as hono4 from "hono";
|
|
|
12
12
|
* - API key user: Access only to the tenant associated with the API key
|
|
13
13
|
* - Session user: Access based on organization membership
|
|
14
14
|
*/
|
|
15
|
-
declare const requireTenantAccess: () =>
|
|
15
|
+
declare const requireTenantAccess: () => hono12.MiddlewareHandler<{
|
|
16
16
|
Variables: {
|
|
17
17
|
userId: string;
|
|
18
18
|
tenantId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono13 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/middleware/tracing.d.ts
|
|
4
|
-
declare const otelBaggageMiddleware: () =>
|
|
5
|
-
declare const executionBaggageMiddleware: () =>
|
|
4
|
+
declare const otelBaggageMiddleware: () => hono13.MiddlewareHandler<any, string, {}, Response>;
|
|
5
|
+
declare const executionBaggageMiddleware: () => hono13.MiddlewareHandler<any, string, {}, Response>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { executionBaggageMiddleware, otelBaggageMiddleware };
|
|
@@ -5,61 +5,114 @@ import { derivePlaygroundKid, getAppById, updateApp } from "@inkeep/agents-core"
|
|
|
5
5
|
|
|
6
6
|
//#region src/startup/playground-app.ts
|
|
7
7
|
const logger = getLogger$1("playground-app");
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
return;
|
|
8
|
+
function derivePlaygroundDomains() {
|
|
9
|
+
const manageUiUrl = env.INKEEP_AGENTS_MANAGE_UI_URL;
|
|
10
|
+
if (manageUiUrl) try {
|
|
11
|
+
const url = new URL(manageUiUrl);
|
|
12
|
+
if (url.hostname === "localhost" || url.hostname === "127.0.0.1") return ["localhost", "127.0.0.1"];
|
|
13
|
+
return [url.hostname];
|
|
14
|
+
} catch {
|
|
15
|
+
logger.warn({ manageUiUrl }, "Invalid INKEEP_AGENTS_MANAGE_UI_URL, falling back to environment defaults");
|
|
16
|
+
}
|
|
17
|
+
if (env.ENVIRONMENT === "production") {
|
|
18
|
+
logger.error({}, "INKEEP_AGENTS_MANAGE_UI_URL not set in production — cannot derive playground allowed domains");
|
|
19
|
+
return [];
|
|
13
20
|
}
|
|
21
|
+
return ["localhost", "127.0.0.1"];
|
|
22
|
+
}
|
|
23
|
+
async function ensurePlaygroundAppConfig() {
|
|
14
24
|
const appId = env.INKEEP_PLAYGROUND_APP_ID || "app_playground";
|
|
15
|
-
logger.info({ appId }, "
|
|
25
|
+
logger.info({ appId }, "Checking playground app configuration");
|
|
16
26
|
const app = await getAppById(runDbClient_default)(appId);
|
|
17
27
|
if (!app) {
|
|
18
|
-
logger.info({ appId }, "Playground app not found, skipping
|
|
28
|
+
logger.info({ appId }, "Playground app not found, skipping configuration");
|
|
19
29
|
return;
|
|
20
30
|
}
|
|
21
31
|
if (app.config.type !== "web_client") {
|
|
22
|
-
logger.warn({
|
|
32
|
+
logger.warn({
|
|
33
|
+
appId,
|
|
34
|
+
type: app.config.type
|
|
35
|
+
}, "Playground app is not a web_client app");
|
|
23
36
|
return;
|
|
24
37
|
}
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
38
|
+
const webClient = { ...app.config.webClient };
|
|
39
|
+
const auth = { ...webClient.auth ?? {} };
|
|
40
|
+
let configChanged = false;
|
|
41
|
+
const derivedDomains = derivePlaygroundDomains();
|
|
42
|
+
const currentDomains = webClient.allowedDomains ?? [];
|
|
43
|
+
const hasWildcard = currentDomains.includes("*");
|
|
44
|
+
const specificDomains = currentDomains.filter((d) => d !== "*");
|
|
45
|
+
const newDomains = derivedDomains.filter((d) => !specificDomains.includes(d));
|
|
46
|
+
if (hasWildcard && derivedDomains.length > 0) {
|
|
47
|
+
const mergedDomains = [...specificDomains, ...newDomains];
|
|
31
48
|
logger.info({
|
|
49
|
+
appId,
|
|
50
|
+
previousDomains: currentDomains,
|
|
51
|
+
removedWildcard: true,
|
|
52
|
+
mergedDomains
|
|
53
|
+
}, "Replacing wildcard with explicit domains on playground app");
|
|
54
|
+
webClient.allowedDomains = mergedDomains;
|
|
55
|
+
configChanged = true;
|
|
56
|
+
} else if (newDomains.length > 0) {
|
|
57
|
+
const mergedDomains = [...currentDomains, ...newDomains];
|
|
58
|
+
logger.info({
|
|
59
|
+
appId,
|
|
60
|
+
currentDomains,
|
|
61
|
+
addedDomains: newDomains,
|
|
62
|
+
mergedDomains
|
|
63
|
+
}, "Adding new domains to playground app allowed domains");
|
|
64
|
+
webClient.allowedDomains = mergedDomains;
|
|
65
|
+
configChanged = true;
|
|
66
|
+
} else if (derivedDomains.length === 0) logger.warn({
|
|
67
|
+
appId,
|
|
68
|
+
currentDomains
|
|
69
|
+
}, "No playground domains could be derived — allowedDomains not updated");
|
|
70
|
+
else logger.info({
|
|
71
|
+
appId,
|
|
72
|
+
domains: currentDomains
|
|
73
|
+
}, "Playground app domains are up to date");
|
|
74
|
+
const publicKeyB64 = env.INKEEP_AGENTS_TEMP_JWT_PUBLIC_KEY;
|
|
75
|
+
if (publicKeyB64) {
|
|
76
|
+
const publicKeyPem = Buffer.from(publicKeyB64, "base64").toString("utf-8");
|
|
77
|
+
const kid = await derivePlaygroundKid(publicKeyPem);
|
|
78
|
+
const existingKeys = auth.publicKeys ?? [];
|
|
79
|
+
if (!existingKeys.some((k) => k.kid === kid)) {
|
|
80
|
+
const newKey = {
|
|
81
|
+
kid,
|
|
82
|
+
publicKey: publicKeyPem,
|
|
83
|
+
algorithm: "RS256",
|
|
84
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
85
|
+
};
|
|
86
|
+
const updatedKeys = [...existingKeys, newKey];
|
|
87
|
+
webClient.auth = {
|
|
88
|
+
...auth,
|
|
89
|
+
publicKeys: updatedKeys
|
|
90
|
+
};
|
|
91
|
+
configChanged = true;
|
|
92
|
+
logger.info({
|
|
93
|
+
appId,
|
|
94
|
+
kid
|
|
95
|
+
}, "Registering playground public key");
|
|
96
|
+
} else logger.info({
|
|
32
97
|
appId,
|
|
33
98
|
kid
|
|
34
99
|
}, "Playground key already registered");
|
|
35
|
-
return;
|
|
36
100
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
await updateApp(runDbClient_default)({
|
|
55
|
-
id: appId,
|
|
56
|
-
data: { config: updatedConfig }
|
|
57
|
-
});
|
|
58
|
-
logger.info({
|
|
59
|
-
appId,
|
|
60
|
-
kid
|
|
61
|
-
}, "Registered playground public key");
|
|
101
|
+
if (configChanged) {
|
|
102
|
+
const updatedConfig = {
|
|
103
|
+
type: "web_client",
|
|
104
|
+
webClient
|
|
105
|
+
};
|
|
106
|
+
await updateApp(runDbClient_default)({
|
|
107
|
+
id: appId,
|
|
108
|
+
data: { config: updatedConfig }
|
|
109
|
+
});
|
|
110
|
+
logger.info({
|
|
111
|
+
appId,
|
|
112
|
+
allowedDomains: updatedConfig.webClient.allowedDomains
|
|
113
|
+
}, "Playground app configuration updated");
|
|
114
|
+
}
|
|
62
115
|
}
|
|
63
116
|
|
|
64
117
|
//#endregion
|
|
65
|
-
export {
|
|
118
|
+
export { ensurePlaygroundAppConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-api",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260328075633",
|
|
4
4
|
"description": "Unified Inkeep Agents API - combines management, runtime, and evaluation capabilities",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"pg": "^8.16.3",
|
|
74
74
|
"undici": "^7.22.0",
|
|
75
75
|
"workflow": "4.2.0-beta.67",
|
|
76
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
77
|
-
"@inkeep/agents-email": "^0.0.0-dev-
|
|
78
|
-
"@inkeep/agents-mcp": "^0.0.0-dev-
|
|
79
|
-
"@inkeep/agents-work-apps": "^0.0.0-dev-
|
|
76
|
+
"@inkeep/agents-core": "^0.0.0-dev-20260328075633",
|
|
77
|
+
"@inkeep/agents-email": "^0.0.0-dev-20260328075633",
|
|
78
|
+
"@inkeep/agents-mcp": "^0.0.0-dev-20260328075633",
|
|
79
|
+
"@inkeep/agents-work-apps": "^0.0.0-dev-20260328075633"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@hono/zod-openapi": "^1.1.5",
|