@inkeep/agents-core 0.1.8 → 0.1.10
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 +5 -6
- package/dist/index.js +5 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var zod = require('zod');
|
|
4
4
|
var zodOpenapi = require('@hono/zod-openapi');
|
|
5
5
|
var drizzleZod = require('drizzle-zod');
|
|
6
6
|
var drizzleOrm = require('drizzle-orm');
|
|
@@ -22,7 +22,6 @@ var types_js = require('@modelcontextprotocol/sdk/types.js');
|
|
|
22
22
|
var ai = require('ai');
|
|
23
23
|
var exitHook = require('exit-hook');
|
|
24
24
|
var tsPattern = require('ts-pattern');
|
|
25
|
-
var zod = require('zod');
|
|
26
25
|
var node = require('@nangohq/node');
|
|
27
26
|
|
|
28
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -1634,7 +1633,7 @@ var PaginationQueryParamsSchema = zodOpenapi.z.object({
|
|
|
1634
1633
|
var logger = getLogger("context-config");
|
|
1635
1634
|
function convertZodToJsonSchema(zodSchema) {
|
|
1636
1635
|
try {
|
|
1637
|
-
return
|
|
1636
|
+
return zod.z.toJSONSchema(zodSchema, { target: "draft-7" });
|
|
1638
1637
|
} catch (error) {
|
|
1639
1638
|
logger.error(
|
|
1640
1639
|
{
|
|
@@ -1663,7 +1662,7 @@ var ContextConfigBuilder = class {
|
|
|
1663
1662
|
"Converting request headers schema to JSON Schema for database storage"
|
|
1664
1663
|
);
|
|
1665
1664
|
let schema = options.requestContextSchema;
|
|
1666
|
-
if (schema instanceof
|
|
1665
|
+
if (schema instanceof zod.z.ZodObject) {
|
|
1667
1666
|
schema = schema.loose();
|
|
1668
1667
|
logger.debug(
|
|
1669
1668
|
{ schemaType: "ZodObject" },
|
|
@@ -1762,7 +1761,7 @@ var ContextConfigBuilder = class {
|
|
|
1762
1761
|
});
|
|
1763
1762
|
return { valid: true, errors: [] };
|
|
1764
1763
|
} catch (error) {
|
|
1765
|
-
if (error instanceof
|
|
1764
|
+
if (error instanceof zod.z.ZodError) {
|
|
1766
1765
|
return {
|
|
1767
1766
|
valid: false,
|
|
1768
1767
|
errors: error.issues.map((e) => `${e.path.join(".")}: ${e.message}`)
|
|
@@ -8467,7 +8466,7 @@ function contextValidationMiddleware(dbClient) {
|
|
|
8467
8466
|
if (!tenantId || !projectId || !graphId) {
|
|
8468
8467
|
return next();
|
|
8469
8468
|
}
|
|
8470
|
-
const body =
|
|
8469
|
+
const body = c.get("requestBody") || {};
|
|
8471
8470
|
const conversationId = body.conversationId || "";
|
|
8472
8471
|
const headers = {};
|
|
8473
8472
|
c.req.raw.headers.forEach((value, key) => {
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataCom
|
|
|
8
8
|
import { CredentialStoreType, MCPServerType, MCPTransportType } from './chunk-SVGQSPW4.js';
|
|
9
9
|
export { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from './chunk-SVGQSPW4.js';
|
|
10
10
|
import { __publicField } from './chunk-MKBO26DX.js';
|
|
11
|
-
import { z as z$
|
|
11
|
+
import { z as z$1 } from 'zod';
|
|
12
12
|
import jmespath from 'jmespath';
|
|
13
13
|
import { createClient } from '@libsql/client';
|
|
14
14
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
@@ -28,7 +28,6 @@ import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
|
28
28
|
import { tool } from 'ai';
|
|
29
29
|
import { asyncExitHook, gracefulExit } from 'exit-hook';
|
|
30
30
|
import { match } from 'ts-pattern';
|
|
31
|
-
import { z as z$1 } from 'zod';
|
|
32
31
|
import { Nango } from '@nangohq/node';
|
|
33
32
|
|
|
34
33
|
// src/utils/logger.ts
|
|
@@ -113,7 +112,7 @@ function configureLogging(config) {
|
|
|
113
112
|
var logger = getLogger("context-config");
|
|
114
113
|
function convertZodToJsonSchema(zodSchema) {
|
|
115
114
|
try {
|
|
116
|
-
return z$
|
|
115
|
+
return z$1.toJSONSchema(zodSchema, { target: "draft-7" });
|
|
117
116
|
} catch (error) {
|
|
118
117
|
logger.error(
|
|
119
118
|
{
|
|
@@ -142,7 +141,7 @@ var ContextConfigBuilder = class {
|
|
|
142
141
|
"Converting request headers schema to JSON Schema for database storage"
|
|
143
142
|
);
|
|
144
143
|
let schema = options.requestContextSchema;
|
|
145
|
-
if (schema instanceof z$
|
|
144
|
+
if (schema instanceof z$1.ZodObject) {
|
|
146
145
|
schema = schema.loose();
|
|
147
146
|
logger.debug(
|
|
148
147
|
{ schemaType: "ZodObject" },
|
|
@@ -241,7 +240,7 @@ var ContextConfigBuilder = class {
|
|
|
241
240
|
});
|
|
242
241
|
return { valid: true, errors: [] };
|
|
243
242
|
} catch (error) {
|
|
244
|
-
if (error instanceof z$
|
|
243
|
+
if (error instanceof z$1.ZodError) {
|
|
245
244
|
return {
|
|
246
245
|
valid: false,
|
|
247
246
|
errors: error.issues.map((e) => `${e.path.join(".")}: ${e.message}`)
|
|
@@ -6827,7 +6826,7 @@ function contextValidationMiddleware(dbClient) {
|
|
|
6827
6826
|
if (!tenantId || !projectId || !graphId) {
|
|
6828
6827
|
return next();
|
|
6829
6828
|
}
|
|
6830
|
-
const body =
|
|
6829
|
+
const body = c.get("requestBody") || {};
|
|
6831
6830
|
const conversationId = body.conversationId || "";
|
|
6832
6831
|
const headers = {};
|
|
6833
6832
|
c.req.raw.headers.forEach((value, key) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|