@inkeep/agents-manage-api 0.1.0 → 0.1.2

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/LICENSE.md ADDED
@@ -0,0 +1,49 @@
1
+ # Inkeep SDK – Elastic License 2.0 with Supplemental Terms
2
+
3
+ NOTE: The Inkeep SDK is licensed under the Elastic License 2.0 (ELv2), subject to Supplemental Terms included in [SUPPLEMENTAL_TERMS.md](SUPPLEMENTAL_TERMS.md). In the event of conflict, the Supplemental Terms control.
4
+
5
+ # Elastic License 2.0
6
+
7
+ ## Acceptance
8
+ By using the software, you agree to all of the terms and conditions below.
9
+
10
+ ## Copyright License
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below.
12
+
13
+ ## Limitations
14
+ You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
15
+
16
+ You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
17
+
18
+ You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
19
+
20
+ ## Patents
21
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
22
+
23
+ ## Notices
24
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
25
+
26
+ If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
27
+
28
+ ## No Other Rights
29
+ These terms do not imply any licenses other than those expressly granted in these terms.
30
+
31
+ ## Termination
32
+ If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
33
+
34
+ ## No Liability
35
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
36
+
37
+ ## Definitions
38
+ The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it.
39
+
40
+ **you** refers to the individual or entity agreeing to these terms.
41
+
42
+ **your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
43
+
44
+ **your licenses** are all the licenses granted to you for the software under these terms.
45
+
46
+ **use** means anything you do with the software requiring one of your licenses.
47
+
48
+ **trademark** means trademarks, service marks, and similar rights.
49
+
@@ -1,4 +1,4 @@
1
- import app from '../../app.js';
1
+ import app from '../../index.js';
2
2
  // Helper function to make requests with JSON headers
3
3
  export const makeRequest = async (url, options = {}) => {
4
4
  return app.request(url, {
package/dist/app.d.ts CHANGED
@@ -1,4 +1,11 @@
1
- import { OpenApiHonoWithExecutionContext } from '@inkeep/agents-core';
2
- declare const app: OpenApiHonoWithExecutionContext;
3
- export default app;
1
+ import { OpenAPIHono } from '@hono/zod-openapi';
2
+ import type { ServerConfig, CredentialStoreRegistry } from '@inkeep/agents-core';
3
+ type AppVariables = {
4
+ serverConfig: ServerConfig;
5
+ credentialStores: CredentialStoreRegistry;
6
+ };
7
+ declare function createManagementHono(serverConfig: ServerConfig, credentialStores: CredentialStoreRegistry): OpenAPIHono<{
8
+ Variables: AppVariables;
9
+ }, {}, "/">;
10
+ export { createManagementHono };
4
11
  //# sourceMappingURL=app.d.ts.map
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAatE,QAAA,MAAM,GAAG,iCAAwC,CAAC;AAwJlD,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAajF,KAAK,YAAY,GAAG;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,iBAAS,oBAAoB,CAC3B,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,uBAAuB;eAEA,YAAY;YAgKtD;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
package/dist/app.js CHANGED
@@ -1,5 +1,4 @@
1
- import { createRoute } from '@hono/zod-openapi';
2
- import { OpenApiHonoWithExecutionContext } from '@inkeep/agents-core';
1
+ import { createRoute, OpenAPIHono } from '@hono/zod-openapi';
3
2
  import { cors } from 'hono/cors';
4
3
  import { HTTPException } from 'hono/http-exception';
5
4
  import { requestId } from 'hono/request-id';
@@ -10,131 +9,140 @@ import crudRoutes from './routes/index.js';
10
9
  import { apiKeyAuth } from './middleware/auth.js';
11
10
  import oauthRoutes from './routes/oauth.js';
12
11
  import { setupOpenAPIRoutes } from './openapi.js';
13
- const app = new OpenApiHonoWithExecutionContext();
14
- // Request ID middleware
15
- app.use('*', requestId());
16
- // Logging middleware
17
- app.use(pinoLogger({
18
- pino: getLogger(),
19
- http: {
20
- onResLevel(c) {
21
- if (c.res.status >= 500) {
22
- return 'error';
23
- }
24
- return 'info';
12
+ function createManagementHono(serverConfig, credentialStores) {
13
+ const app = new OpenAPIHono();
14
+ // Request ID middleware
15
+ app.use('*', requestId());
16
+ // Server config and credential stores middleware
17
+ app.use('*', async (c, next) => {
18
+ c.set('serverConfig', serverConfig);
19
+ c.set('credentialStores', credentialStores);
20
+ return next();
21
+ });
22
+ // Logging middleware
23
+ app.use(pinoLogger({
24
+ pino: getLogger(),
25
+ http: {
26
+ onResLevel(c) {
27
+ if (c.res.status >= 500) {
28
+ return 'error';
29
+ }
30
+ return 'info';
31
+ },
25
32
  },
26
- },
27
- }));
28
- // Error handling
29
- app.onError(async (err, c) => {
30
- const isExpectedError = err instanceof HTTPException;
31
- const status = isExpectedError ? err.status : 500;
32
- const requestId = c.get('requestId') || 'unknown';
33
- // Zod validation error detection
34
- let zodIssues;
35
- if (err && typeof err === 'object') {
36
- if (err.cause && Array.isArray(err.cause.issues)) {
37
- zodIssues = err.cause.issues;
33
+ }));
34
+ // Error handling
35
+ app.onError(async (err, c) => {
36
+ const isExpectedError = err instanceof HTTPException;
37
+ const status = isExpectedError ? err.status : 500;
38
+ const requestId = c.get('requestId') || 'unknown';
39
+ // Zod validation error detection
40
+ let zodIssues;
41
+ if (err && typeof err === 'object') {
42
+ if (err.cause && Array.isArray(err.cause.issues)) {
43
+ zodIssues = err.cause.issues;
44
+ }
45
+ else if (Array.isArray(err.issues)) {
46
+ zodIssues = err.issues;
47
+ }
48
+ }
49
+ if (status === 400 && Array.isArray(zodIssues)) {
50
+ c.status(400);
51
+ c.header('Content-Type', 'application/problem+json');
52
+ c.header('X-Content-Type-Options', 'nosniff');
53
+ return c.json({
54
+ type: 'https://docs.inkeep.com/agents-api/errors#bad_request',
55
+ title: 'Validation Failed',
56
+ status: 400,
57
+ detail: 'Request validation failed',
58
+ errors: zodIssues.map((issue) => ({
59
+ detail: issue.message,
60
+ pointer: issue.path ? `/${issue.path.join('/')}` : undefined,
61
+ name: issue.path ? issue.path.join('.') : undefined,
62
+ reason: issue.message,
63
+ })),
64
+ });
65
+ }
66
+ if (status >= 500) {
67
+ if (!isExpectedError) {
68
+ const errorMessage = err instanceof Error ? err.message : String(err);
69
+ const errorStack = err instanceof Error ? err.stack : undefined;
70
+ getLogger().error({
71
+ error: err,
72
+ message: errorMessage,
73
+ stack: errorStack,
74
+ path: c.req.path,
75
+ requestId,
76
+ }, 'Unexpected server error occurred');
77
+ }
78
+ else {
79
+ getLogger().error({
80
+ error: err,
81
+ path: c.req.path,
82
+ requestId,
83
+ status,
84
+ }, 'Server error occurred');
85
+ }
38
86
  }
39
- else if (Array.isArray(err.issues)) {
40
- zodIssues = err.issues;
87
+ if (isExpectedError) {
88
+ try {
89
+ const response = err.getResponse();
90
+ return response;
91
+ }
92
+ catch (responseError) {
93
+ getLogger().error({ error: responseError }, 'Error while handling HTTPException response');
94
+ }
41
95
  }
42
- }
43
- if (status === 400 && Array.isArray(zodIssues)) {
44
- c.status(400);
96
+ const { status: respStatus, title, detail, instance } = await handleApiError(err, requestId);
97
+ c.status(respStatus);
45
98
  c.header('Content-Type', 'application/problem+json');
46
99
  c.header('X-Content-Type-Options', 'nosniff');
47
100
  return c.json({
48
- type: 'https://docs.inkeep.com/agents-api/errors#bad_request',
49
- title: 'Validation Failed',
50
- status: 400,
51
- detail: 'Request validation failed',
52
- errors: zodIssues.map((issue) => ({
53
- detail: issue.message,
54
- pointer: issue.path ? `/${issue.path.join('/')}` : undefined,
55
- name: issue.path ? issue.path.join('.') : undefined,
56
- reason: issue.message,
57
- })),
101
+ type: 'https://docs.inkeep.com/agents-api/errors#internal_server_error',
102
+ title,
103
+ status: respStatus,
104
+ detail,
105
+ ...(instance && { instance }),
58
106
  });
59
- }
60
- if (status >= 500) {
61
- if (!isExpectedError) {
62
- const errorMessage = err instanceof Error ? err.message : String(err);
63
- const errorStack = err instanceof Error ? err.stack : undefined;
64
- getLogger().error({
65
- error: err,
66
- message: errorMessage,
67
- stack: errorStack,
68
- path: c.req.path,
69
- requestId,
70
- }, 'Unexpected server error occurred');
71
- }
72
- else {
73
- getLogger().error({
74
- error: err,
75
- path: c.req.path,
76
- requestId,
77
- status,
78
- }, 'Server error occurred');
79
- }
80
- }
81
- if (isExpectedError) {
82
- try {
83
- const response = err.getResponse();
84
- return response;
85
- }
86
- catch (responseError) {
87
- getLogger().error({ error: responseError }, 'Error while handling HTTPException response');
88
- }
89
- }
90
- const { status: respStatus, title, detail, instance } = await handleApiError(err, requestId);
91
- c.status(respStatus);
92
- c.header('Content-Type', 'application/problem+json');
93
- c.header('X-Content-Type-Options', 'nosniff');
94
- return c.json({
95
- type: 'https://docs.inkeep.com/agents-api/errors#internal_server_error',
96
- title,
97
- status: respStatus,
98
- detail,
99
- ...(instance && { instance }),
100
107
  });
101
- });
102
- // CORS middleware
103
- app.use('*', cors({
104
- origin: (origin) => {
105
- if (!origin)
106
- return origin;
107
- return origin.startsWith('http://localhost:') || origin.startsWith('https://localhost:')
108
- ? origin
109
- : null;
110
- },
111
- allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'],
112
- allowHeaders: ['*'],
113
- exposeHeaders: ['Content-Length'],
114
- maxAge: 86400,
115
- credentials: true,
116
- }));
117
- // Health check endpoint
118
- app.openapi(createRoute({
119
- method: 'get',
120
- path: '/health',
121
- tags: ['health'],
122
- summary: 'Health check',
123
- description: 'Check if the management service is healthy',
124
- responses: {
125
- 204: {
126
- description: 'Service is healthy',
108
+ // CORS middleware
109
+ app.use('*', cors({
110
+ origin: (origin) => {
111
+ if (!origin)
112
+ return origin;
113
+ return origin.startsWith('http://localhost:') || origin.startsWith('https://localhost:')
114
+ ? origin
115
+ : null;
127
116
  },
128
- },
129
- }), (c) => {
130
- return c.body(null, 204);
131
- });
132
- // API Key authentication middleware for protected routes
133
- app.use('/tenants/*', apiKeyAuth());
134
- // Mount CRUD routes for all entities
135
- app.route('/tenants/:tenantId/crud', crudRoutes);
136
- // Mount OAuth routes - global OAuth callback endpoint
137
- app.route('/oauth', oauthRoutes);
138
- // Setup OpenAPI documentation endpoints (/openapi.json and /docs)
139
- setupOpenAPIRoutes(app);
140
- export default app;
117
+ allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'],
118
+ allowHeaders: ['*'],
119
+ exposeHeaders: ['Content-Length'],
120
+ maxAge: 86400,
121
+ credentials: true,
122
+ }));
123
+ // Health check endpoint
124
+ app.openapi(createRoute({
125
+ method: 'get',
126
+ path: '/health',
127
+ tags: ['health'],
128
+ summary: 'Health check',
129
+ description: 'Check if the management service is healthy',
130
+ responses: {
131
+ 204: {
132
+ description: 'Service is healthy',
133
+ },
134
+ },
135
+ }), (c) => {
136
+ return c.body(null, 204);
137
+ });
138
+ // API Key authentication middleware for protected routes
139
+ app.use('/tenants/*', apiKeyAuth());
140
+ // Mount CRUD routes for all entities
141
+ app.route('/tenants/:tenantId/crud', crudRoutes);
142
+ // Mount OAuth routes - global OAuth callback endpoint
143
+ app.route('/oauth', oauthRoutes);
144
+ // Setup OpenAPI documentation endpoints (/openapi.json and /docs)
145
+ setupOpenAPIRoutes(app);
146
+ return app;
147
+ }
148
+ export { createManagementHono };
@@ -1,4 +1,4 @@
1
- import { type McpServerCapabilities, type McpTool, type McpToolDefinition, type McpToolStatus } from '@inkeep/agents-core';
1
+ import { type McpServerCapabilities, type McpTool, type McpToolDefinition, type McpToolStatus, type CredentialStoreRegistry } from '@inkeep/agents-core';
2
2
  export declare const updateToolHealth: ({ tenantId, projectId, toolId, status, error, }: {
3
3
  tenantId: string;
4
4
  projectId: string;
@@ -10,72 +10,73 @@ export declare const updateToolHealth: ({ tenantId, projectId, toolId, status, e
10
10
  projectId: string;
11
11
  id: string;
12
12
  name: string;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ status: string;
13
16
  config: {
14
17
  type: "mcp";
15
18
  mcp: import("@inkeep/agents-core").ToolMcpConfig;
16
19
  };
17
20
  credentialReferenceId: string | null;
18
- createdAt: string;
19
- updatedAt: string;
20
- status: string;
21
21
  headers: Record<string, string> | null;
22
22
  imageUrl: string | null;
23
23
  capabilities: import("@inkeep/agents-core").ToolServerCapabilities | null;
24
24
  lastHealthCheck: string | null;
25
25
  lastError: string | null;
26
- availableTools: import("@inkeep/agents-core").McpToolDefinition[] | null;
26
+ availableTools: McpToolDefinition[] | null;
27
27
  lastToolsSync: string | null;
28
28
  }>;
29
- export declare const checkToolHealth: (tool: McpTool) => Promise<{
29
+ export declare const checkToolHealth: (tool: McpTool, credentialStoreRegistry?: CredentialStoreRegistry) => Promise<{
30
30
  status: McpToolStatus;
31
31
  error?: string;
32
32
  capabilities?: McpServerCapabilities;
33
33
  }>;
34
- export declare const discoverToolsFromServer: (tool: McpTool) => Promise<McpToolDefinition[]>;
35
- export declare const syncToolDefinitions: ({ tenantId, projectId, toolId, }: {
34
+ export declare const discoverToolsFromServer: (tool: McpTool, credentialStoreRegistry?: CredentialStoreRegistry) => Promise<McpToolDefinition[]>;
35
+ export declare const syncToolDefinitions: ({ tenantId, projectId, toolId, credentialStoreRegistry, }: {
36
36
  tenantId: string;
37
37
  projectId: string;
38
38
  toolId: string;
39
+ credentialStoreRegistry?: CredentialStoreRegistry;
39
40
  }) => Promise<{
40
41
  tenantId: string;
41
42
  projectId: string;
42
43
  id: string;
43
44
  name: string;
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ status: string;
44
48
  config: {
45
49
  type: "mcp";
46
50
  mcp: import("@inkeep/agents-core").ToolMcpConfig;
47
51
  };
48
52
  credentialReferenceId: string | null;
49
- createdAt: string;
50
- updatedAt: string;
51
- status: string;
52
53
  headers: Record<string, string> | null;
53
54
  imageUrl: string | null;
54
55
  capabilities: import("@inkeep/agents-core").ToolServerCapabilities | null;
55
56
  lastHealthCheck: string | null;
56
57
  lastError: string | null;
57
- availableTools: import("@inkeep/agents-core").McpToolDefinition[] | null;
58
+ availableTools: McpToolDefinition[] | null;
58
59
  lastToolsSync: string | null;
59
60
  }>;
60
- export declare const checkAllToolsHealth: (tenantId: string, projectId: string) => Promise<PromiseSettledResult<{
61
+ export declare const checkAllToolsHealth: (tenantId: string, projectId: string, credentialStoreRegistry?: CredentialStoreRegistry) => Promise<PromiseSettledResult<{
61
62
  tenantId: string;
62
63
  projectId: string;
63
64
  id: string;
64
65
  name: string;
66
+ createdAt: string;
67
+ updatedAt: string;
68
+ status: string;
65
69
  config: {
66
70
  type: "mcp";
67
71
  mcp: import("@inkeep/agents-core").ToolMcpConfig;
68
72
  };
69
73
  credentialReferenceId: string | null;
70
- createdAt: string;
71
- updatedAt: string;
72
- status: string;
73
74
  headers: Record<string, string> | null;
74
75
  imageUrl: string | null;
75
76
  capabilities: import("@inkeep/agents-core").ToolServerCapabilities | null;
76
77
  lastHealthCheck: string | null;
77
78
  lastError: string | null;
78
- availableTools: import("@inkeep/agents-core").McpToolDefinition[] | null;
79
+ availableTools: McpToolDefinition[] | null;
79
80
  lastToolsSync: string | null;
80
81
  }>[]>;
81
82
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/data/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAUnB,MAAM,qBAAqB,CAAC;AAgD7B,eAAO,MAAM,gBAAgB,GAAU,iDAMpC;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;EAmBA,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,OAAO,KACZ,OAAO,CAAC;IACT,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC,CAkGA,CAAC;AAGF,eAAO,MAAM,uBAAuB,GAAU,MAAM,OAAO,KAAG,OAAO,CAAC,iBAAiB,EAAE,CAoFxF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,kCAIvC;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;EA+CA,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAU,UAAU,MAAM,EAAE,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;KAiB5E,CAAC"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/data/tools.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAUlB,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAgD7B,eAAO,MAAM,gBAAgB,GAAU,iDAMpC;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;EAmBA,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,OAAO,EACb,0BAA0B,uBAAuB,KAChD,OAAO,CAAC;IACT,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC,CAqGA,CAAC;AAGF,eAAO,MAAM,uBAAuB,GAAU,MAAM,OAAO,EAAE,0BAA0B,uBAAuB,KAAG,OAAO,CAAC,iBAAiB,EAAE,CAuF3I,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,2DAKvC;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;;;;;;;;;;;;;;;;;;;;EA+CA,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAU,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,0BAA0B,uBAAuB;;;;;;;;;;;;;;;;;;;;KAiB/H,CAAC"}
@@ -1,4 +1,3 @@
1
- import { managementServer } from '../index.js';
2
1
  import { getLogger } from '../logger.js';
3
2
  import dbClient from './db/dbClient.js';
4
3
  import { McpClient, CredentialStuffer, getCredentialReference, updateTool, dbResultToMcpTool, listTools, getToolById, detectAuthenticationRequired, ContextResolver, } from '@inkeep/agents-core';
@@ -58,7 +57,7 @@ export const updateToolHealth = async ({ tenantId, projectId, toolId, status, er
58
57
  });
59
58
  return tool;
60
59
  };
61
- export const checkToolHealth = async (tool) => {
60
+ export const checkToolHealth = async (tool, credentialStoreRegistry) => {
62
61
  try {
63
62
  const transportType = tool.config.mcp.transport?.type || 'streamable_http';
64
63
  const baseConfig = {
@@ -81,8 +80,11 @@ export const checkToolHealth = async (tool) => {
81
80
  retrievalParams: credentialReference.retrievalParams || {},
82
81
  };
83
82
  // Use CredentialStuffer to build proper config with auth headers
84
- const contextResolver = new ContextResolver(tool.tenantId, tool.projectId, dbClient, managementServer);
85
- const credentialStuffer = new CredentialStuffer(managementServer, contextResolver);
83
+ if (!credentialStoreRegistry) {
84
+ throw new Error('CredentialStoreRegistry is required for authenticated tools');
85
+ }
86
+ const contextResolver = new ContextResolver(tool.tenantId, tool.projectId, dbClient, credentialStoreRegistry);
87
+ const credentialStuffer = new CredentialStuffer(credentialStoreRegistry, contextResolver);
86
88
  serverConfig = await credentialStuffer.buildMcpServerConfig({ tenantId: tool.tenantId, projectId: tool.projectId }, convertToMCPToolConfig(tool), storeReference);
87
89
  }
88
90
  else {
@@ -140,7 +142,7 @@ export const checkToolHealth = async (tool) => {
140
142
  }
141
143
  };
142
144
  // Tool discovery
143
- export const discoverToolsFromServer = async (tool) => {
145
+ export const discoverToolsFromServer = async (tool, credentialStoreRegistry) => {
144
146
  try {
145
147
  const credentialReferenceId = tool.credentialReferenceId;
146
148
  let serverConfig;
@@ -159,8 +161,11 @@ export const discoverToolsFromServer = async (tool) => {
159
161
  retrievalParams: credentialReference.retrievalParams || {},
160
162
  };
161
163
  // Use CredentialStuffer to build proper config with auth headers
162
- const contextResolver = new ContextResolver(tool.tenantId, tool.projectId, dbClient, managementServer);
163
- const credentialStuffer = new CredentialStuffer(managementServer, contextResolver);
164
+ if (!credentialStoreRegistry) {
165
+ throw new Error('CredentialStoreRegistry is required for authenticated tools');
166
+ }
167
+ const contextResolver = new ContextResolver(tool.tenantId, tool.projectId, dbClient, credentialStoreRegistry);
168
+ const credentialStuffer = new CredentialStuffer(credentialStoreRegistry, contextResolver);
164
169
  serverConfig = (await credentialStuffer.buildMcpServerConfig({ tenantId: tool.tenantId, projectId: tool.projectId }, convertToMCPToolConfig(tool), storeReference));
165
170
  }
166
171
  else {
@@ -207,14 +212,14 @@ export const discoverToolsFromServer = async (tool) => {
207
212
  throw error;
208
213
  }
209
214
  };
210
- export const syncToolDefinitions = async ({ tenantId, projectId, toolId, }) => {
215
+ export const syncToolDefinitions = async ({ tenantId, projectId, toolId, credentialStoreRegistry, }) => {
211
216
  const tool = await getToolById(dbClient)({ scopes: { tenantId, projectId }, toolId });
212
217
  if (!tool) {
213
218
  throw new Error(`Tool ${toolId} not found`);
214
219
  }
215
220
  const mcpTool = dbResultToMcpTool(tool);
216
221
  try {
217
- const availableTools = await discoverToolsFromServer(mcpTool);
222
+ const availableTools = await discoverToolsFromServer(mcpTool, credentialStoreRegistry);
218
223
  const updatedTool = await updateTool(dbClient)({
219
224
  scopes: { tenantId, projectId },
220
225
  toolId,
@@ -250,10 +255,10 @@ export const syncToolDefinitions = async ({ tenantId, projectId, toolId, }) => {
250
255
  }
251
256
  };
252
257
  // Bulk health checking
253
- export const checkAllToolsHealth = async (tenantId, projectId) => {
258
+ export const checkAllToolsHealth = async (tenantId, projectId, credentialStoreRegistry) => {
254
259
  const toolsList = await listTools(dbClient)({ scopes: { tenantId, projectId } });
255
260
  const results = await Promise.allSettled(toolsList.data.map(async (tool) => {
256
- const healthResult = await checkToolHealth(dbResultToMcpTool(tool));
261
+ const healthResult = await checkToolHealth(dbResultToMcpTool(tool), credentialStoreRegistry);
257
262
  return await updateToolHealth({
258
263
  tenantId,
259
264
  projectId: tool.projectId,
package/dist/env.d.ts CHANGED
@@ -7,8 +7,8 @@ declare const envSchema: z.ZodObject<{
7
7
  }>>;
8
8
  ENVIRONMENT: z.ZodOptional<z.ZodEnum<{
9
9
  development: "development";
10
- production: "production";
11
10
  pentest: "pentest";
11
+ production: "production";
12
12
  test: "test";
13
13
  }>>;
14
14
  DB_FILE_NAME: z.ZodDefault<z.ZodString>;
@@ -16,11 +16,11 @@ declare const envSchema: z.ZodObject<{
16
16
  MANAGEMENT_PORT: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
17
17
  AGENT_BASE_URL: z.ZodOptional<z.ZodString>;
18
18
  LOG_LEVEL: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
19
- trace: "trace";
19
+ error: "error";
20
20
  debug: "debug";
21
21
  info: "info";
22
+ trace: "trace";
22
23
  warn: "warn";
23
- error: "error";
24
24
  }>>>;
25
25
  NANGO_SECRET_KEY: z.ZodOptional<z.ZodString>;
26
26
  INKEEP_AGENTS_MANAGE_API_SECRET: z.ZodOptional<z.ZodString>;
@@ -29,9 +29,9 @@ export declare const env: {
29
29
  DB_FILE_NAME: string;
30
30
  PORT: number;
31
31
  MANAGEMENT_PORT: number;
32
- LOG_LEVEL: "trace" | "debug" | "info" | "warn" | "error";
32
+ LOG_LEVEL: "error" | "debug" | "info" | "trace" | "warn";
33
33
  NODE_ENV?: "development" | "production" | "test" | undefined;
34
- ENVIRONMENT?: "development" | "production" | "pentest" | "test" | undefined;
34
+ ENVIRONMENT?: "development" | "pentest" | "production" | "test" | undefined;
35
35
  AGENT_BASE_URL?: string | undefined;
36
36
  NANGO_SECRET_KEY?: string | undefined;
37
37
  INKEEP_AGENTS_MANAGE_API_SECRET?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,20 @@
1
- import { ManagementServer } from './ManagementServer.js';
2
- export declare const MANAGEMENT_API_PORT = 3002;
3
- export declare const managementServer: ManagementServer;
1
+ import { createManagementHono } from './app.js';
2
+ import { CredentialStoreRegistry, type CredentialStore, type ServerConfig } from '@inkeep/agents-core';
3
+ declare const app: import("@hono/zod-openapi").OpenAPIHono<{
4
+ Variables: {
5
+ serverConfig: ServerConfig;
6
+ credentialStores: CredentialStoreRegistry;
7
+ };
8
+ }, {}, "/">;
9
+ export default app;
10
+ export { createManagementHono };
11
+ export declare function createManagementApp(config?: {
12
+ serverConfig?: ServerConfig;
13
+ credentialStores?: CredentialStore[];
14
+ }): import("@hono/zod-openapi").OpenAPIHono<{
15
+ Variables: {
16
+ serverConfig: ServerConfig;
17
+ credentialStores: CredentialStoreRegistry;
18
+ };
19
+ }, {}, "/">;
4
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAUzD,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAgBxC,eAAO,MAAM,gBAAgB,kBAQ3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,uBAAuB,EAEvB,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAiB7B,QAAA,MAAM,GAAG;;;;;WAAuD,CAAC;AAGjE,eAAe,GAAG,CAAC;AAGnB,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAGhC,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE;IAC3C,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACtC;;;;;YAMA"}
package/dist/index.js CHANGED
@@ -1,42 +1,27 @@
1
- import { ManagementServer } from './ManagementServer.js';
2
- import { InMemoryCredentialStore, createNangoCredentialStore, createKeyChainStore, } from '@inkeep/agents-core';
3
- import { env } from './env.js';
4
- import { getLogger } from './logger.js';
5
- const logger = getLogger('management-api');
6
- export const MANAGEMENT_API_PORT = 3002;
7
- // Create credential stores
8
- const credentialStores = [
9
- new InMemoryCredentialStore('memory-default'), // In-memory store + env vars
10
- // Nango store (only loads if NANGO_SECRET_KEY is set)
11
- ...(process.env.NANGO_SECRET_KEY
12
- ? [
13
- createNangoCredentialStore('nango-default', {
14
- apiUrl: process.env.NANGO_HOST || 'https://api.nango.dev',
15
- secretKey: process.env.NANGO_SECRET_KEY,
16
- }),
17
- ]
18
- : []),
19
- createKeyChainStore('keychain-default'),
20
- ];
21
- // Initialize Management Server
22
- export const managementServer = new ManagementServer({
23
- port: MANAGEMENT_API_PORT,
24
- credentialStores,
1
+ import { createManagementHono } from './app.js';
2
+ import { CredentialStoreRegistry, createDefaultCredentialStores, } from '@inkeep/agents-core';
3
+ // Create default configuration
4
+ const defaultConfig = {
5
+ port: 3002,
25
6
  serverOptions: {
26
- requestTimeout: 60000, // 60 seconds
7
+ requestTimeout: 60000, // 60 seconds for management requests
27
8
  keepAliveTimeout: 60000,
28
9
  keepAlive: true,
29
10
  },
30
- });
31
- // Start the server only if not in test environment
32
- if (env.ENVIRONMENT !== 'test') {
33
- managementServer
34
- .serve()
35
- .then(() => {
36
- logger.info(`📝 OpenAPI documentation available at http://localhost:${MANAGEMENT_API_PORT}/openapi.json`);
37
- })
38
- .catch((error) => {
39
- logger.error('Failed to start Management API server:', error);
40
- process.exit(1);
41
- });
11
+ };
12
+ // Create default credential stores
13
+ const defaultStores = createDefaultCredentialStores();
14
+ const defaultRegistry = new CredentialStoreRegistry(defaultStores);
15
+ // Create default app instance for simple usage
16
+ const app = createManagementHono(defaultConfig, defaultRegistry);
17
+ // Export the default app for Vite dev server and simple deployments
18
+ export default app;
19
+ // Also export the factory function for advanced usage
20
+ export { createManagementHono };
21
+ // Export a helper to create app with custom credential stores
22
+ export function createManagementApp(config) {
23
+ const serverConfig = config?.serverConfig ?? defaultConfig;
24
+ const stores = config?.credentialStores ?? defaultStores;
25
+ const registry = new CredentialStoreRegistry(stores);
26
+ return createManagementHono(serverConfig, registry);
42
27
  }
@@ -1,4 +1,10 @@
1
1
  import { OpenAPIHono } from '@hono/zod-openapi';
2
- declare const app: OpenAPIHono<import("hono").Env, {}, "/">;
2
+ import { type CredentialStoreRegistry } from '@inkeep/agents-core';
3
+ type AppVariables = {
4
+ credentialStores: CredentialStoreRegistry;
5
+ };
6
+ declare const app: OpenAPIHono<{
7
+ Variables: AppVariables;
8
+ }, {}, "/">;
3
9
  export default app;
4
10
  //# sourceMappingURL=credentials.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/routes/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAsB7D,QAAA,MAAM,GAAG,0CAAoB,CAAC;AA8P9B,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/routes/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAoB7B,KAAK,YAAY,GAAG;IAClB,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,QAAA,MAAM,GAAG;eAAgC,YAAY;WAAK,CAAC;AA+P3D,eAAe,GAAG,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { createRoute, OpenAPIHono } from '@hono/zod-openapi';
2
- import { commonGetErrorResponses, createApiError } from '@inkeep/agents-core';
3
- import { managementServer } from '../index.js';
2
+ import { commonGetErrorResponses, createApiError, } from '@inkeep/agents-core';
4
3
  import { CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, ErrorResponseSchema, IdParamsSchema, ListResponseSchema, PaginationQueryParamsSchema, SingleResponseSchema, TenantProjectParamsSchema, createCredentialReference, deleteCredentialReference, getCredentialReferenceById, listCredentialReferencesPaginated, updateCredentialReference, getCredentialStoreLookupKeyFromRetrievalParams, } from '@inkeep/agents-core';
5
4
  import dbClient from '../data/db/dbClient.js';
6
5
  const app = new OpenAPIHono();
@@ -184,7 +183,8 @@ app.openapi(createRoute({
184
183
  message: 'Credential not found',
185
184
  });
186
185
  }
187
- const credentialStore = managementServer.getCredentialStore(credential.credentialStoreId);
186
+ const credentialStores = c.get('credentialStores');
187
+ const credentialStore = credentialStores.get(credential.credentialStoreId);
188
188
  if (credentialStore && credential.retrievalParams) {
189
189
  const lookupKey = getCredentialStoreLookupKeyFromRetrievalParams({
190
190
  retrievalParams: credential.retrievalParams,
@@ -9,6 +9,13 @@
9
9
  * - Redirects users back to frontend
10
10
  */
11
11
  import { OpenAPIHono } from '@hono/zod-openapi';
12
- declare const app: OpenAPIHono<import("hono").Env, {}, "/">;
12
+ import { type CredentialStoreRegistry, type ServerConfig } from '@inkeep/agents-core';
13
+ type AppVariables = {
14
+ serverConfig: ServerConfig;
15
+ credentialStores: CredentialStoreRegistry;
16
+ };
17
+ declare const app: OpenAPIHono<{
18
+ Variables: AppVariables;
19
+ }, {}, "/">;
13
20
  export default app;
14
21
  //# sourceMappingURL=oauth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/routes/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAe,WAAW,EAAK,MAAM,mBAAmB,CAAC;AAehE,QAAA,MAAM,GAAG,0CAAoB,CAAC;AA6M9B,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/routes/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAe,WAAW,EAAK,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAOL,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAK7B,KAAK,YAAY,GAAG;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,QAAA,MAAM,GAAG;eAAgC,YAAY;WAAK,CAAC;AA8M3D,eAAe,GAAG,CAAC"}
@@ -10,7 +10,6 @@
10
10
  */
11
11
  import { createRoute, OpenAPIHono, z } from '@hono/zod-openapi';
12
12
  import { dbResultToMcpTool, getToolById, updateTool, createCredentialReference, getCredentialReference, updateCredentialReference, } from '@inkeep/agents-core';
13
- import { managementServer } from '../index.js';
14
13
  import { getLogger } from '../logger.js';
15
14
  import { oauthService, retrievePKCEVerifier } from '../utils/oauth-service.js';
16
15
  import dbClient from '../data/db/dbClient.js';
@@ -93,7 +92,8 @@ app.openapi(createRoute({
93
92
  });
94
93
  logger.info({ toolId, tokenType: tokens.token_type, hasRefresh: !!tokens.refresh_token }, 'Token exchange successful');
95
94
  // Store access token in keychain
96
- const keychainStore = managementServer.getCredentialStore('keychain-default');
95
+ const credentialStores = c.get('credentialStores');
96
+ const keychainStore = credentialStores.get('keychain-default');
97
97
  const keychainKey = `oauth_token_${toolId}`;
98
98
  await keychainStore?.set(keychainKey, JSON.stringify(tokens));
99
99
  const credentialId = tool.name;
@@ -1,4 +1,11 @@
1
1
  import { OpenAPIHono } from '@hono/zod-openapi';
2
- declare const app: OpenAPIHono<import("hono").Env, {}, "/">;
2
+ import type { CredentialStoreRegistry, ServerConfig } from '@inkeep/agents-core';
3
+ type AppVariables = {
4
+ serverConfig: ServerConfig;
5
+ credentialStores: CredentialStoreRegistry;
6
+ };
7
+ declare const app: OpenAPIHono<{
8
+ Variables: AppVariables;
9
+ }, {}, "/">;
3
10
  export default app;
4
11
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/routes/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmC7D,QAAA,MAAM,GAAG,0CAAoB,CAAC;AAioB9B,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/routes/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAmCjF,KAAK,YAAY,GAAG;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,QAAA,MAAM,GAAG;eAAgC,YAAY;WAAK,CAAC;AAyoB3D,eAAe,GAAG,CAAC"}
@@ -272,7 +272,8 @@ app.openapi(createRoute({
272
272
  message: 'Tool not found',
273
273
  });
274
274
  }
275
- const healthResult = await checkToolHealth(dbResultToMcpTool(tool));
275
+ const credentialStores = c.get('credentialStores');
276
+ const healthResult = await checkToolHealth(dbResultToMcpTool(tool), credentialStores);
276
277
  const updatedTool = await updateToolHealth({
277
278
  tenantId,
278
279
  projectId,
@@ -320,7 +321,8 @@ app.openapi(createRoute({
320
321
  },
321
322
  }), async (c) => {
322
323
  const { tenantId, projectId } = c.req.valid('param');
323
- const results = await checkAllToolsHealth(tenantId, projectId);
324
+ const credentialStores = c.get('credentialStores');
325
+ const results = await checkAllToolsHealth(tenantId, projectId, credentialStores);
324
326
  const summary = {
325
327
  total: results.length,
326
328
  successful: results.filter((r) => r.status === 'fulfilled').length,
@@ -375,7 +377,13 @@ app.openapi(createRoute({
375
377
  message: 'Tool not found',
376
378
  });
377
379
  }
378
- const updatedTool = await syncToolDefinitions({ tenantId, projectId, toolId: id });
380
+ const credentialStores = c.get('credentialStores');
381
+ const updatedTool = await syncToolDefinitions({
382
+ tenantId,
383
+ projectId,
384
+ toolId: id,
385
+ credentialStoreRegistry: credentialStores,
386
+ });
379
387
  return c.json({
380
388
  data: dbResultToMcpTool(updatedTool),
381
389
  message: 'Tool definitions synchronized successfully',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-manage-api",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Management API for Inkeep Agent Framework - handles CRUD operations and OAuth",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,21 +9,10 @@
9
9
  ".": "./dist/index.js"
10
10
  },
11
11
  "type": "module",
12
- "scripts": {
13
- "dev": "nodemon --watch src --ext ts --exec 'tsx src/index.ts'",
14
- "dev:apis": "nodemon --watch src --ext ts --exec 'tsx src/index.ts'",
15
- "build": "tsc",
16
- "start": "node dist/index.js",
17
- "test": "ENVIRONMENT=test vitest --run",
18
- "test:watch": "ENVIRONMENT=test vitest",
19
- "test:coverage": "ENVIRONMENT=test vitest --run --coverage",
20
- "typecheck": "tsc --noEmit"
21
- },
22
12
  "dependencies": {
23
13
  "@hono/node-server": "^1.14.3",
24
14
  "@hono/swagger-ui": "^0.5.1",
25
15
  "@hono/zod-openapi": "^1.0.2",
26
- "@inkeep/agents-core": "workspace:*",
27
16
  "@nangohq/node": "^0.66.0",
28
17
  "@nangohq/types": "^0.66.0",
29
18
  "dotenv": "^17.2.1",
@@ -35,19 +24,22 @@
35
24
  "openid-client": "^6.6.4",
36
25
  "pino": "^9.7.0",
37
26
  "pino-pretty": "^13.0.0",
38
- "zod": "^4.1.5"
27
+ "zod": "^4.1.5",
28
+ "@inkeep/agents-core": "^0.1.2"
39
29
  },
40
30
  "devDependencies": {
41
31
  "@biomejs/biome": "2.1.4",
32
+ "@hono/vite-dev-server": "^0.20.1",
42
33
  "@types/node": "^20.11.24",
43
34
  "@vitest/coverage-v8": "^2.0.0",
44
35
  "drizzle-kit": "^0.31.4",
45
36
  "nodemon": "^3.1.0",
46
37
  "tsx": "^4.7.1",
47
38
  "typescript": "^5.3.3",
39
+ "vite": "^7.1.4",
40
+ "vite-tsconfig-paths": "^5.1.4",
48
41
  "vitest": "^3.1.4"
49
42
  },
50
- "packageManager": "pnpm@10.11.0",
51
43
  "engines": {
52
44
  "node": ">=22.0.0"
53
45
  },
@@ -64,5 +56,14 @@
64
56
  "type": "git",
65
57
  "url": "git+https://github.com/inkeep/agent-framework.git",
66
58
  "directory": "agents-manage-api"
59
+ },
60
+ "scripts": {
61
+ "dev": "vite",
62
+ "build": "tsc",
63
+ "start": "node dist/server.js",
64
+ "test": "ENVIRONMENT=test vitest --run",
65
+ "test:watch": "ENVIRONMENT=test vitest",
66
+ "test:coverage": "ENVIRONMENT=test vitest --run --coverage",
67
+ "typecheck": "tsc --noEmit"
67
68
  }
68
- }
69
+ }